File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ when making significant changes to existing features or when adding new ones.
4242 - [ Symbol] ( navigation.md#symbol ) : fuzzy search for symbol by name
4343 - [ Selection Range] ( navigation.md#selection-range ) : select enclosing unit of syntax
4444 - [ Call Hierarchy] ( navigation.md#call-hierarchy ) : show outgoing/incoming calls to the current function
45+ - [ Type Hierarchy] ( navigation.md#type-hierarchy ) : show interfaces/implementations of the current type
4546- [ Completion] ( completion.md ) : context-aware completion of identifiers, statements
4647- [ Code transformation] ( transformation.md ) : fixes and refactorings
4748 - [ Formatting] ( transformation.md#formatting ) : format the source code
@@ -58,6 +59,7 @@ when making significant changes to existing features or when adding new ones.
5859- Support for non-Go files:
5960 - [ Template files] ( templates.md ) : files parsed by ` text/template ` and ` html/template `
6061 - [ go.mod and go.work files] ( modfiles.md ) : Go module and workspace manifests
62+ - [ Go * .s assembly files] ( assembly.ms ) : Go assembly files
6163- [ Command-line interface] ( ../command-line.md ) : CLI for debugging and scripting (unstable)
6264
6365You can find this page from within your editor by executing the
Original file line number Diff line number Diff line change 1+ # Gopls: Support for Go * .s assembly files
2+
3+ Gopls has rudimentary support for LSP operations in Go assembly files.
4+
5+ Go assembly files have a ` .s ` file name extension. LSP clients need to
6+ be configured to recognize ` .s ` files as Go assembly files, since this
7+ file name extension is also used for assembly files in other
8+ languages. A good heuristic is that if a file named ` *.s ` belongs to a
9+ directory containing at least one ` *.go ` file, then the ` .s ` file is
10+ Go assembly, and its appropriate language server is gopls.
11+
12+ Only Definition (` textDocument/definition ` ) requests are currently
13+ supported. For example, a Definition request on the ` sigpanic `
14+ symbol in this file in GOROOT/src/runtime/asm.s:
15+
16+ ``` asm
17+ JMP ·sigpanic<ABIInternal>(SB)
18+ ```
19+
20+ returns the location of the function declaration in
21+ GOROOT/src/runtime/signal_unix.go:
22+
23+ ``` go
24+ // go:linkname sigpanic
25+ func sigpanic () {
26+ ` ` `
27+
28+ See also issue golang/go#71754, which tracks the development of LSP
29+ features in Go assembly files.
You can’t perform that action at this time.
0 commit comments