diff options
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/lsp-extensions.md | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 48147b173..209f470eb 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -87,6 +87,40 @@ Invoking code action at this position will yield two code actions for importing | |||
87 | * Is a fixed two-level structure enough? | 87 | * Is a fixed two-level structure enough? |
88 | * Should we devise a general way to encode custom interaction protocols for GUI refactorings? | 88 | * Should we devise a general way to encode custom interaction protocols for GUI refactorings? |
89 | 89 | ||
90 | ## Parent Module | ||
91 | |||
92 | **Issue:** https://github.com/microsoft/language-server-protocol/issues/1002 | ||
93 | |||
94 | **Server Capability:** `{ "parentModule": boolean }` | ||
95 | |||
96 | This request is send from client to server to handle "Goto Parent Module" editor action. | ||
97 | |||
98 | **Method:** `experimental/parentModule` | ||
99 | |||
100 | **Request:** `TextDocumentPositionParams` | ||
101 | |||
102 | **Response:** `Location | Location[] | LocationLink[] | null` | ||
103 | |||
104 | |||
105 | ### Example | ||
106 | |||
107 | ```rust | ||
108 | // src/main.rs | ||
109 | mod foo; | ||
110 | // src/foo.rs | ||
111 | |||
112 | /* cursor here*/ | ||
113 | ``` | ||
114 | |||
115 | `experimental/parentModule` returns a single `Link` to the `mod foo;` declaration. | ||
116 | |||
117 | ### Unresolved Question | ||
118 | |||
119 | * An alternative would be to use a more general "gotoSuper" request, which would work for super methods, super classes and super modules. | ||
120 | This is the approach IntelliJ Rust is takeing. | ||
121 | However, experience shows that super module (which generally has a feeling of navigation between files) should be separate. | ||
122 | If you want super module, but the cursor happens to be inside an overriden function, the behavior with single "gotoSuper" request is surprising. | ||
123 | |||
90 | ## Join Lines | 124 | ## Join Lines |
91 | 125 | ||
92 | **Issue:** https://github.com/microsoft/language-server-protocol/issues/992 | 126 | **Issue:** https://github.com/microsoft/language-server-protocol/issues/992 |
@@ -108,11 +142,7 @@ interface JoinLinesParams { | |||
108 | } | 142 | } |
109 | ``` | 143 | ``` |
110 | 144 | ||
111 | **Response:** | 145 | **Response:** `TextEdit[]` |
112 | |||
113 | ```typescript | ||
114 | TextEdit[] | ||
115 | ``` | ||
116 | 146 | ||
117 | ### Example | 147 | ### Example |
118 | 148 | ||