aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/README.md10
-rw-r--r--docs/dev/lsp-extensions.md7
-rw-r--r--docs/dev/syntax.md4
-rw-r--r--docs/user/manual.adoc2
4 files changed, 19 insertions, 4 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 2bb2f75bd..417352c9d 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -369,6 +369,16 @@ env UPDATE_EXPECT=1 cargo qt
369 369
370After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above. 370After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above.
371 371
372## TypeScript Tests
373
374If you change files under `editors/code` and would like to run the tests and linter, install npm and run:
375
376```bash
377cd editors/code
378npm ci
379npm run lint
380```
381
372# Logging 382# Logging
373 383
374Logging is done by both rust-analyzer and VS Code, so it might be tricky to 384Logging is done by both rust-analyzer and VS Code, so it might be tricky to
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md
index 98d14450b..1be01fd88 100644
--- a/docs/dev/lsp-extensions.md
+++ b/docs/dev/lsp-extensions.md
@@ -274,6 +274,11 @@ interface SsrParams {
274 query: string, 274 query: string,
275 /// If true, only check the syntax of the query and don't compute the actual edit. 275 /// If true, only check the syntax of the query and don't compute the actual edit.
276 parseOnly: bool, 276 parseOnly: bool,
277 /// The current text document. This and `position` will be used to determine in what scope
278 /// paths in `query` should be resolved.
279 textDocument: lc.TextDocumentIdentifier;
280 /// Position where SSR was invoked.
281 position: lc.Position;
277} 282}
278``` 283```
279 284
@@ -285,7 +290,7 @@ WorkspaceEdit
285 290
286### Example 291### Example
287 292
288SSR with query `foo($a:expr, $b:expr) ==>> ($a).foo($b)` will transform, eg `foo(y + 5, z)` into `(y + 5).foo(z)`. 293SSR with query `foo($a, $b) ==>> ($a).foo($b)` will transform, eg `foo(y + 5, z)` into `(y + 5).foo(z)`.
289 294
290### Unresolved Question 295### Unresolved Question
291 296
diff --git a/docs/dev/syntax.md b/docs/dev/syntax.md
index c2864bbbc..d4bc4b07c 100644
--- a/docs/dev/syntax.md
+++ b/docs/dev/syntax.md
@@ -82,7 +82,7 @@ Points of note:
82An input like `fn f() { 90 + 2 }` might be parsed as 82An input like `fn f() { 90 + 2 }` might be parsed as
83 83
84``` 84```
85FN_DEF@0..17 85[email protected]
86 [email protected] "fn" 86 [email protected] "fn"
87 [email protected] " " 87 [email protected] " "
88 [email protected] 88 [email protected]
@@ -342,7 +342,7 @@ pub struct FnDef {
342impl AstNode for FnDef { 342impl AstNode for FnDef {
343 fn cast(syntax: SyntaxNode) -> Option<Self> { 343 fn cast(syntax: SyntaxNode) -> Option<Self> {
344 match kind { 344 match kind {
345 FN_DEF => Some(FnDef { syntax }), 345 FN => Some(FnDef { syntax }),
346 _ => None, 346 _ => None,
347 } 347 }
348 } 348 }
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 4b31145de..cfc0ad81c 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -300,7 +300,7 @@ interface Crate {
300 /// `include_dirs` are included recursively, unless a subdirectory is in `exclude_dirs`. 300 /// `include_dirs` are included recursively, unless a subdirectory is in `exclude_dirs`.
301 /// 301 ///
302 /// Different crates can share the same `source`. 302 /// Different crates can share the same `source`.
303 303 ///
304 /// If two crates share an `.rs` file in common, they *must* have the same `source`. 304 /// If two crates share an `.rs` file in common, they *must* have the same `source`.
305 /// rust-analyzer assumes that files from one source can't refer to files in another source. 305 /// rust-analyzer assumes that files from one source can't refer to files in another source.
306 source?: { 306 source?: {