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.
42
42
- [ Symbol] ( navigation.md#symbol ) : fuzzy search for symbol by name
43
43
- [ Selection Range] ( navigation.md#selection-range ) : select enclosing unit of syntax
44
44
- [ 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
45
46
- [ Completion] ( completion.md ) : context-aware completion of identifiers, statements
46
47
- [ Code transformation] ( transformation.md ) : fixes and refactorings
47
48
- [ Formatting] ( transformation.md#formatting ) : format the source code
@@ -58,6 +59,7 @@ when making significant changes to existing features or when adding new ones.
58
59
- Support for non-Go files:
59
60
- [ Template files] ( templates.md ) : files parsed by ` text/template ` and ` html/template `
60
61
- [ go.mod and go.work files] ( modfiles.md ) : Go module and workspace manifests
62
+ - [ Go * .s assembly files] ( assembly.ms ) : Go assembly files
61
63
- [ Command-line interface] ( ../command-line.md ) : CLI for debugging and scripting (unstable)
62
64
63
65
You 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