You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rascal-lsp/src/main/rascal/library/util/LanguageServer.rsc
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ alias Implementer = set[loc] (loc _origin, Tree _fullTree, Tree _lexicalAtCursor
158
158
@synopsis{Each kind of service contibutes the implementation of one (or several) IDE features.}
159
159
@description{
160
160
Each LanguageService constructor provides one aspect of definining the language server protocol (LSP).
161
-
Their names coincide exactly with the services which are documented [here](https://microsoft.github.io/language-server-protocol/).
161
+
Their names coincide with the services which are documented [here](https://microsoft.github.io/language-server-protocol/).
162
162
163
163
* The ((parsing)) service that maps source code strings to a ((ParseTree::Tree)) is essential and non-optional.
164
164
All other other services are optional.
@@ -208,6 +208,9 @@ hover documentation, definition with uses, references to declarations, implement
208
208
* The ((execution)) service executes the commands registered by ((lenses)) and ((inlayHinter))s.
209
209
* The ((actions)) service discovers places in the editor to add "code actions" (little hints in the margin next to where the action is relevant) and connects ((CodeAction))s to execute when the users selects the action from a menu.
210
210
* The ((selectionRange)) service discovers selections around a cursor, that a user might want to select. It expects the list of source locations to be in ascending order of size (each location should be contained by the next) - similar to ((Focus)) trees.
211
+
* The ((callHierarchy)) service discovers callable definitions and call sites. It consists of two subservices.
212
+
1. The first argument, `callableItem`, computes ((CallHierarchyItem))s (definitions) for a given cursor.
213
+
2. The second argument, `calculateCalls`, computes ((incoming)) or ((outgoing)) calls (uses) of a given ((CallHierarchyItem)) `ci`. It returns a list relation of ((CallHierarchyItem))s and the location(s) of the call(s) to `ci` these definitions have.
211
214
212
215
Many services receive a ((Focus)) parameter. The focus lists the syntactical constructs under the current cursor, from the current
213
216
leaf all the way up to the root of the tree. This list helps to create functionality that is syntax-directed, and always relevant to the
0 commit comments