File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11use crate :: { language_client:: LanguageClient , utils:: ToUrl } ;
22use anyhow:: Result ;
33use jsonrpc_core:: Value ;
4- use lsp_types:: TextDocumentIdentifier ;
4+ use lsp_types:: { request :: Request , TextDocumentIdentifier } ;
55
66pub mod request {
7- pub const SWITCH_SOURCE_HEADER : & str = "textDocument/switchSourceHeader" ;
7+ use lsp_types:: { request:: Request , TextDocumentIdentifier } ;
8+
9+ pub enum SwitchSourceHeader { }
10+
11+ impl Request for SwitchSourceHeader {
12+ type Params = TextDocumentIdentifier ;
13+ type Result = String ;
14+ const METHOD : & ' static str = "textDocument/switchSourceHeader" ;
15+ }
816}
917
1018impl LanguageClient {
@@ -17,7 +25,7 @@ impl LanguageClient {
1725
1826 let response: String = self
1927 . get_client ( & Some ( language_id) ) ?
20- . call ( request:: SWITCH_SOURCE_HEADER , params) ?;
28+ . call ( request:: SwitchSourceHeader :: METHOD , params) ?;
2129
2230 let path = std:: path:: Path :: new ( & response) ;
2331 self . vim ( ) ?. edit ( & None , path) ?;
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ impl LanguageClient {
119119 REQUEST_SEMANTIC_SCOPES => self . semantic_scopes ( & params) ,
120120 REQUEST_SHOW_SEMANTIC_HL_SYMBOLS => self . semantic_highlight_symbols ( & params) ,
121121
122- clangd:: request:: SWITCH_SOURCE_HEADER => {
122+ clangd:: request:: SwitchSourceHeader :: METHOD => {
123123 self . text_document_switch_source_header ( & params)
124124 }
125125
You can’t perform that action at this time.
0 commit comments