mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-27 20:35:09 +00:00
Remove executeCommandProvider: apply_code_action.
This appears to have been introduced ages ago inbe742a5877
but has since been removed. As it stands, it is problematic if multiple instances of the rust-analyzer LSP are launched during the same VS Code session because VS Code complains about multiple LSP servers trying to register the same command. Most LSP servers workaround this by parameterizing the command by the process id. For example, this is where `rls` does this:ff0b9057c8/rls/src/server/mod.rs (L413-L421)
Though `apply_code_action` does not seems to be used, so it seems better to delete it than to parameterize it.
This commit is contained in:
parent
a814883cd4
commit
e81a47b8eb
3 changed files with 8 additions and 12 deletions
|
@ -1,8 +1,8 @@
|
|||
use lsp_types::{
|
||||
CodeActionProviderCapability, CodeLensOptions, CompletionOptions,
|
||||
DocumentOnTypeFormattingOptions, ExecuteCommandOptions, FoldingRangeProviderCapability,
|
||||
GenericCapability, ImplementationProviderCapability, RenameOptions, RenameProviderCapability,
|
||||
ServerCapabilities, SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind,
|
||||
DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability,
|
||||
ImplementationProviderCapability, RenameOptions, RenameProviderCapability, ServerCapabilities,
|
||||
SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind,
|
||||
TextDocumentSyncOptions, TypeDefinitionProviderCapability,
|
||||
};
|
||||
|
||||
|
@ -44,9 +44,7 @@ pub fn server_capabilities() -> ServerCapabilities {
|
|||
prepare_provider: Some(true),
|
||||
})),
|
||||
color_provider: None,
|
||||
execute_command_provider: Some(ExecuteCommandOptions {
|
||||
commands: vec!["apply_code_action".to_string()],
|
||||
}),
|
||||
execute_command_provider: None,
|
||||
workspace: None,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ use url_serde;
|
|||
pub use lsp_types::{
|
||||
notification::*, request::*, ApplyWorkspaceEditParams, CodeActionParams, CodeLens,
|
||||
CodeLensParams, CompletionParams, CompletionResponse, DidChangeConfigurationParams,
|
||||
DocumentOnTypeFormattingParams, DocumentSymbolParams, DocumentSymbolResponse,
|
||||
ExecuteCommandParams, Hover, InitializeResult, MessageType, PublishDiagnosticsParams,
|
||||
ReferenceParams, ShowMessageParams, SignatureHelp, TextDocumentEdit,
|
||||
TextDocumentPositionParams, TextEdit, WorkspaceEdit, WorkspaceSymbolParams,
|
||||
DocumentOnTypeFormattingParams, DocumentSymbolParams, DocumentSymbolResponse, Hover,
|
||||
InitializeResult, MessageType, PublishDiagnosticsParams, ReferenceParams, ShowMessageParams,
|
||||
SignatureHelp, TextDocumentEdit, TextDocumentPositionParams, TextEdit, WorkspaceEdit,
|
||||
WorkspaceSymbolParams,
|
||||
};
|
||||
|
||||
pub enum AnalyzerStatus {}
|
||||
|
|
|
@ -16,8 +16,6 @@ This list documents LSP features, supported by rust-analyzer.
|
|||
- [ ] [workspace/configuration](https://microsoft.github.io/language-server-protocol/specification#workspace_configuration)
|
||||
- [x] [workspace/didChangeWatchedFiles](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles)
|
||||
- [x] [workspace/symbol](https://microsoft.github.io/language-server-protocol/specification#workspace_symbol)
|
||||
- [x] [workspace/executeCommand](https://microsoft.github.io/language-server-protocol/specification#workspace_executeCommand)
|
||||
- `apply_code_action`
|
||||
- [ ] [workspace/applyEdit](https://microsoft.github.io/language-server-protocol/specification#workspace_applyEdit)
|
||||
|
||||
## Text Synchronization
|
||||
|
|
Loading…
Reference in a new issue