aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md116
1 files changed, 22 insertions, 94 deletions
diff --git a/README.md b/README.md
index 5bc90a3f0..3a0c9dee1 100644
--- a/README.md
+++ b/README.md
@@ -13,32 +13,37 @@ Work on the Rust Analyzer is sponsored by
13 13
14[![Ferrous Systems](https://ferrous-systems.com/images/ferrous-logo-text.svg)](https://ferrous-systems.com/) 14[![Ferrous Systems](https://ferrous-systems.com/images/ferrous-logo-text.svg)](https://ferrous-systems.com/)
15 15
16## Quick Start 16## Language Server Quick Start
17 17
18Rust analyzer builds on Rust >= 1.31.0 and uses the 2018 edition. 18Rust Analyzer is a work-in-progress, so you'll have to build it from source, and
19you might encounter critical bugs. That said, it is complete enough to provide a
20useful IDE experience and some people use it as a daily driver.
19 21
20``` 22To build rust-analyzer, you need:
21# run tests
22$ cargo test
23 23
24# show syntax tree of a Rust file 24* latest stable rust for language server itself
25$ cargo run --package ra_cli parse < crates/ra_syntax/src/lib.rs 25* latest stable npm and VS Code for VS Code extension (`code` should be in path)
26 26
27# show symbols of a Rust file 27For setup for other editors, see [./docs/user](./docs/user).
28$ cargo run --package ra_cli symbols < crates/ra_syntax/src/lib.rs
29 28
30# install the language server
31$ cargo install-lsp
32or
33$ cargo install --path crates/ra_lsp_server
34``` 29```
30# clone the repo
31$ git clone https://github.com/rust-analyzer/rust-analyzer && cd rust-analyzer
32
33# install both the language server and VS Code extension
34$ cargo install-code
35 35
36See [these instructions](./editors/README.md) for VS Code setup and the list of 36# alternatively, install only the server. Binary name is `ra_lsp_server`.
37features (some of which are VS Code specific). 37$ cargo install-lsp
38```
39## Documentation
38 40
39## Debugging 41If you want to **contribute** to rust-analyzer or just curious about how things work
42under the hood, check the [./docs/dev](./docs/dev) folder.
40 43
41See [these instructions](./DEBUGGING.md) on how to debug the vscode extension and the lsp server. 44If you want to **use** rust-analyzer's language server with your editor of
45choice, check [./docs/user](./docs/user) folder. It also contains some tips & tricks to help
46you be more productive when using rust-analyzer.
42 47
43## Getting in touch 48## Getting in touch
44 49
@@ -46,83 +51,6 @@ We are on the rust-lang Zulip!
46 51
47https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0 52https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0
48 53
49## Contributing
50
51See [CONTRIBUTING.md](./CONTRIBUTING.md) and [ARCHITECTURE.md](./ARCHITECTURE.md)
52
53## Supported LSP features
54
55### General
56- [x] [initialize](https://microsoft.github.io/language-server-protocol/specification#initialize)
57- [x] [initialized](https://microsoft.github.io/language-server-protocol/specification#initialized)
58- [x] [shutdown](https://microsoft.github.io/language-server-protocol/specification#shutdown)
59- [ ] [exit](https://microsoft.github.io/language-server-protocol/specification#exit)
60- [x] [$/cancelRequest](https://microsoft.github.io/language-server-protocol/specification#cancelRequest)
61
62### Workspace
63- [ ] [workspace/workspaceFolders](https://microsoft.github.io/language-server-protocol/specification#workspace_workspaceFolders)
64- [ ] [workspace/didChangeWorkspaceFolders](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWorkspaceFolders)
65- [x] [workspace/didChangeConfiguration](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeConfiguration)
66- [ ] [workspace/configuration](https://microsoft.github.io/language-server-protocol/specification#workspace_configuration)
67- [x] [workspace/didChangeWatchedFiles](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles)
68- [x] [workspace/symbol](https://microsoft.github.io/language-server-protocol/specification#workspace_symbol)
69- [x] [workspace/executeCommand](https://microsoft.github.io/language-server-protocol/specification#workspace_executeCommand)
70 - `apply_code_action`
71- [ ] [workspace/applyEdit](https://microsoft.github.io/language-server-protocol/specification#workspace_applyEdit)
72
73### Text Synchronization
74- [x] [textDocument/didOpen](https://microsoft.github.io/language-server-protocol/specification#textDocument_didOpen)
75- [x] [textDocument/didChange](https://microsoft.github.io/language-server-protocol/specification#textDocument_didChange)
76- [ ] [textDocument/willSave](https://microsoft.github.io/language-server-protocol/specification#textDocument_willSave)
77- [ ] [textDocument/willSaveWaitUntil](https://microsoft.github.io/language-server-protocol/specification#textDocument_willSaveWaitUntil)
78- [x] [textDocument/didSave](https://microsoft.github.io/language-server-protocol/specification#textDocument_didSave)
79- [x] [textDocument/didClose](https://microsoft.github.io/language-server-protocol/specification#textDocument_didClose)
80
81### Diagnostics
82- [x] [textDocument/publishDiagnostics](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics)
83
84### Lanuguage Features
85- [x] [textDocument/completion](https://microsoft.github.io/language-server-protocol/specification#textDocument_completion)
86 - open close: false
87 - change: Full
88 - will save: false
89 - will save wait until: false
90 - save: false
91- [x] [completionItem/resolve](https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve)
92 - resolve provider: none
93 - trigger characters: `:`, `.`
94- [x] [textDocument/hover](https://microsoft.github.io/language-server-protocol/specification#textDocument_hover)
95- [x] [textDocument/signatureHelp](https://microsoft.github.io/language-server-protocol/specification#textDocument_signatureHelp)
96 - trigger characters: `(`, `,`, `)`
97- [ ] [textDocument/declaration](https://microsoft.github.io/language-server-protocol/specification#textDocument_declaration)
98- [x] [textDocument/definition](https://microsoft.github.io/language-server-protocol/specification#textDocument_definition)
99- [ ] [textDocument/typeDefinition](https://microsoft.github.io/language-server-protocol/specification#textDocument_typeDefinition)
100- [x] [textDocument/implementation](https://microsoft.github.io/language-server-protocol/specification#textDocument_implementation)
101- [x] [textDocument/references](https://microsoft.github.io/language-server-protocol/specification#textDocument_references)
102- [x] [textDocument/documentHighlight](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight)
103- [x] [textDocument/documentSymbol](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol)
104- [x] [textDocument/codeAction](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction)
105 - rust-analyzer.syntaxTree
106 - rust-analyzer.extendSelection
107 - rust-analyzer.matchingBrace
108 - rust-analyzer.parentModule
109 - rust-analyzer.joinLines
110 - rust-analyzer.run
111 - rust-analyzer.analyzerStatus
112- [x] [textDocument/codeLens](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens)
113- [ ] [textDocument/documentLink](https://microsoft.github.io/language-server-protocol/specification#codeLens_resolve)
114- [ ] [documentLink/resolve](https://microsoft.github.io/language-server-protocol/specification#documentLink_resolve)
115- [ ] [textDocument/documentColor](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentColor)
116- [ ] [textDocument/colorPresentation](https://microsoft.github.io/language-server-protocol/specification#textDocument_colorPresentation)
117- [x] [textDocument/formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_formatting)
118- [ ] [textDocument/rangeFormatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_rangeFormatting)
119- [x] [textDocument/onTypeFormatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_onTypeFormatting)
120 - first trigger character: `=`
121 - more trigger character `.`
122- [x] [textDocument/rename](https://microsoft.github.io/language-server-protocol/specification#textDocument_rename)
123- [x] [textDocument/prepareRename](https://microsoft.github.io/language-server-protocol/specification#textDocument_prepareRename)
124- [x] [textDocument/foldingRange](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange)
125
126## License 54## License
127 55
128Rust analyzer is primarily distributed under the terms of both the MIT 56Rust analyzer is primarily distributed under the terms of both the MIT