]> git.lizzy.rs Git - rust.git/blob - README.md
show message in client's UI if workspace fails to load
[rust.git] / README.md
1 # Rust Analyzer
2
3 [![Build Status](https://travis-ci.org/rust-analyzer/rust-analyzer.svg?branch=master)](https://travis-ci.org/rust-analyzer/rust-analyzer)
4
5 Rust Analyzer is an **experimental** modular compiler frontend for the Rust
6 language. It is a part of a larger rls-2.0 effort to create excellent IDE
7 support for Rust. If you want to get involved, check rls-2.0 working group repository:
8
9 https://github.com/rust-analyzer/WG-rls2.0
10
11 Work on the Rust Analyzer is sponsored by
12
13 [![Ferrous Systems](https://ferrous-systems.com/images/ferrous-logo-text.svg)](https://ferrous-systems.com/)
14
15 ## Quick Start
16
17 Rust analyzer builds on Rust >= 1.31.0 and uses the 2018 edition.
18
19 ```
20 # run tests
21 $ cargo test
22
23 # show syntax tree of a Rust file
24 $ cargo run --package ra_cli parse < crates/ra_syntax/src/lib.rs
25
26 # show symbols of a Rust file
27 $ cargo run --package ra_cli symbols < crates/ra_syntax/src/lib.rs
28
29 # install the language server
30 $ cargo install-lsp
31 or
32 $ cargo install --path crates/ra_lsp_server
33 ```
34
35 See [these instructions](./editors/README.md) for VS Code setup and the list of
36 features (some of which are VS Code specific).
37
38 ## Debugging
39
40 See [these instructions](./DEBUGGING.md) on how to debug the vscode extension and the lsp server.
41
42 ## Getting in touch
43
44 We are on the rust-lang Zulip!
45
46 https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0
47
48 ## Contributing
49
50 See [CONTRIBUTING.md](./CONTRIBUTING.md) and [ARCHITECTURE.md](./ARCHITECTURE.md)
51
52 ## Supported LSP features
53
54 ### General
55 - [x] [initialize](https://microsoft.github.io/language-server-protocol/specification#initialize)
56 - [x] [initialized](https://microsoft.github.io/language-server-protocol/specification#initialized)
57 - [x] [shutdown](https://microsoft.github.io/language-server-protocol/specification#shutdown)
58 - [ ] [exit](https://microsoft.github.io/language-server-protocol/specification#exit)
59 - [x] [$/cancelRequest](https://microsoft.github.io/language-server-protocol/specification#cancelRequest)
60
61 ### Workspace
62 - [ ] [workspace/workspaceFolders](https://microsoft.github.io/language-server-protocol/specification#workspace_workspaceFolders)
63 - [ ] [workspace/didChangeWorkspaceFolders](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWorkspaceFolders)
64 - [x] [workspace/didChangeConfiguration](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeConfiguration)
65 - [ ] [workspace/configuration](https://microsoft.github.io/language-server-protocol/specification#workspace_configuration)
66 - [x] [workspace/didChangeWatchedFiles](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles)
67 - [x] [workspace/symbol](https://microsoft.github.io/language-server-protocol/specification#workspace_symbol)
68 - [x] [workspace/executeCommand](https://microsoft.github.io/language-server-protocol/specification#workspace_executeCommand)
69  - `apply_code_action`
70 - [ ] [workspace/applyEdit](https://microsoft.github.io/language-server-protocol/specification#workspace_applyEdit)
71
72 ### Text Synchronization
73 - [x] [textDocument/didOpen](https://microsoft.github.io/language-server-protocol/specification#textDocument_didOpen)
74 - [x] [textDocument/didChange](https://microsoft.github.io/language-server-protocol/specification#textDocument_didChange)
75 - [ ] [textDocument/willSave](https://microsoft.github.io/language-server-protocol/specification#textDocument_willSave)
76 - [ ] [textDocument/willSaveWaitUntil](https://microsoft.github.io/language-server-protocol/specification#textDocument_willSaveWaitUntil)
77 - [x] [textDocument/didSave](https://microsoft.github.io/language-server-protocol/specification#textDocument_didSave)
78 - [x] [textDocument/didClose](https://microsoft.github.io/language-server-protocol/specification#textDocument_didClose)
79
80 ### Diagnostics
81 - [x] [textDocument/publishDiagnostics](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics)
82
83 ### Lanuguage Features
84 - [x] [textDocument/completion](https://microsoft.github.io/language-server-protocol/specification#textDocument_completion)
85  - open close: false
86  - change: Full
87  - will save: false
88  - will save wait until: false
89  - save: false
90 - [x] [completionItem/resolve](https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve)
91  - resolve provider: none
92  - trigger characters: `:`, `.`
93 - [x] [textDocument/hover](https://microsoft.github.io/language-server-protocol/specification#textDocument_hover)
94 - [x] [textDocument/signatureHelp](https://microsoft.github.io/language-server-protocol/specification#textDocument_signatureHelp)
95  - trigger characters: `(`,  `,`,  `)`
96 - [ ] [textDocument/declaration](https://microsoft.github.io/language-server-protocol/specification#textDocument_declaration)
97 - [x] [textDocument/definition](https://microsoft.github.io/language-server-protocol/specification#textDocument_definition)
98 - [ ] [textDocument/typeDefinition](https://microsoft.github.io/language-server-protocol/specification#textDocument_typeDefinition)
99 - [x] [textDocument/implementation](https://microsoft.github.io/language-server-protocol/specification#textDocument_implementation)
100 - [x] [textDocument/references](https://microsoft.github.io/language-server-protocol/specification#textDocument_references)
101 - [x] [textDocument/documentHighlight](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight)
102 - [x] [textDocument/documentSymbol](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentSymbol)
103 - [x] [textDocument/codeAction](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction)
104  - rust-analyzer.syntaxTree
105  - rust-analyzer.extendSelection
106  - rust-analyzer.matchingBrace
107  - rust-analyzer.parentModule
108  - rust-analyzer.joinLines
109  - rust-analyzer.run
110  - rust-analyzer.analyzerStatus
111 - [x] [textDocument/codeLens](https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens)
112 - [ ] [textDocument/documentLink](https://microsoft.github.io/language-server-protocol/specification#codeLens_resolve)
113 - [ ] [documentLink/resolve](https://microsoft.github.io/language-server-protocol/specification#documentLink_resolve)
114 - [ ] [textDocument/documentColor](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentColor)
115 - [ ] [textDocument/colorPresentation](https://microsoft.github.io/language-server-protocol/specification#textDocument_colorPresentation)
116 - [x] [textDocument/formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_formatting)
117 - [ ] [textDocument/rangeFormatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_rangeFormatting)
118 - [x] [textDocument/onTypeFormatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_onTypeFormatting)
119  - first trigger character: `=`
120  - more trigger character `.`
121 - [x] [textDocument/rename](https://microsoft.github.io/language-server-protocol/specification#textDocument_rename)
122 - [x] [textDocument/prepareRename](https://microsoft.github.io/language-server-protocol/specification#textDocument_prepareRename)
123 - [x] [textDocument/foldingRange](https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange)
124
125 ## License
126
127 Rust analyzer is primarily distributed under the terms of both the MIT
128 license and the Apache License (Version 2.0).
129
130 See LICENSE-APACHE and LICENSE-MIT for details.