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: gopls/doc/features/navigation.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
This page documents gopls features for navigating your source code.
4
4
5
+
<!-- TODO: screenshots -->
6
+
5
7
## Definition
6
8
7
9
The LSP [`textDocument/definition`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_definition)
@@ -35,7 +37,7 @@ Client support:
35
37
## References
36
38
37
39
The LSP [`textDocument/references`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_references)
38
-
request returns the locations of all identifiers that refers to the symbol under the cursor.
40
+
request returns the locations of all identifiers that refer to the symbol under the cursor.
39
41
40
42
The references algorithm handles various parts of syntax as follows:
41
43
@@ -169,7 +171,7 @@ LSP query searches an index of all the symbols in the workspace.
169
171
170
172
The default symbol matching algorithm (`fastFuzzy`), inspired by the
171
173
popular fuzzy matcher [FZF](https://github.com/junegunn/fzf), attempts
172
-
a variety of inexact matches to correct for misspellings in your
174
+
a variety of inexact matches to correct for misspellings or abbreviations in your
173
175
query. For example, it considers `DocSym` a match for `DocumentSymbol`.
174
176
175
177
<!--
@@ -185,8 +187,6 @@ However, VS Code does its own fuzzy matching afterward, so these
185
187
aren't effective in that client; see golang/vscode-go#647.
186
188
-->
187
189
188
-
TODO: screenshot
189
-
190
190
Settings:
191
191
- The [`symbolMatcher`](../settings.md#symbolMatcher) setting controls the algorithm used for symbol matching.
192
192
- The [`symbolStyle`](../settings.md#symbolStyle) setting controls how symbols are qualified in symbol responses.
Copy file name to clipboardExpand all lines: gopls/doc/features/passive.md
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,15 @@ considered passive features.
13
13
## Hover
14
14
15
15
The LSP [`textDocument/hover`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_hover)
16
-
query returns description of the code currently under the cursor, such
16
+
query returns a description of the code currently under the cursor, such
17
17
as its name, kind, type, value (for a constant), abbreviated
18
-
declaration (for a type), its doc comment, if any, and a link to the
18
+
declaration (for a type), doc comment (if any), and a link to the
19
19
symbol's documentation on `pkg.go.dev`. The client may request either
20
20
plain text or Markdown.
21
21
22
22
<imgsrc='../assets/hover-basic.png'>
23
23
24
-
Depending on the selection, it may include additional information.
24
+
Depending on the selection, the response may include additional information.
25
25
For example, hovering over a type shows its declared methods,
26
26
plus any methods promoted from embedded fields.
27
27
@@ -132,8 +132,8 @@ select any one member, gopls will highlight the complete set:
132
132
- the `switch` and `break` tokens of the same switch statement;
133
133
- the `func` keyword of a function and all of its `return` statements.
134
134
135
-
More than one of these rules may be activated by the same selection,
136
-
for example, an identifier that is also a return operand.
135
+
More than one of these rules may be activated by a single selection,
136
+
for example, by an identifier that is also a return operand.
137
137
138
138
<imgsrc='../assets/document-highlight.png'>
139
139
@@ -155,7 +155,7 @@ that reveal implicit information.
155
155
156
156
Examples:
157
157
158
-
- In a function call `f(1, 2)`, gopls will provide hints for the
158
+
- In a function call `f(1, 2)`, hints provide the
159
159
names of the parameters (`parameterNames`), as in the screenshot above.
160
160
- In a call to a generic function, hints provide the type arguments
161
161
(`functionTypeParameters`).
@@ -172,10 +172,12 @@ Examples:
172
172
173
173
See [Inlay hints](../inlayHints.md) for a complete list with examples.
174
174
175
+
<!--
175
176
TODO: Do we really need that separate doc? We could put all the
176
177
information here with much less fuss. It changes so rarely that a
177
178
culture of "update the tests and docs in every CL" should be sufficient.
178
179
IIUC, VS Code needs only the api-json representation.
180
+
-->
179
181
180
182
Settings:
181
183
- The [`hints`](../settings.md#hints) setting indicates the desired set of hints.
@@ -202,7 +204,7 @@ a portion of it.
202
204
The client may use this information to provide syntax highlighting
203
205
that conveys semantic distinctions between, for example, functions and
204
206
types, constants and variables, or library functions and built-ins.
205
-
The client specifies the sets of types and modifiers they are interested in.
207
+
The client specifies the sets of types and modifiers it is interested in.
206
208
207
209
Settings:
208
210
- The [`semanticTokens`](../settings.md#semanticTokens) setting determines whether
@@ -249,7 +251,7 @@ Client support:
249
251
250
252
The LSP [`textDocument/documentLink`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentLink)
251
253
query uses heuristics to extracts URLs from doc comments and string
252
-
literals in the current file so that client can present them as
254
+
literals in the current file so that the client can present them as
0 commit comments