Skip to content

Commit c901190

Browse files
committed
internal/lsp/source/genapijson: add 'gopls_' prefix to commands
This CL adjusts the genapijson program as the follow up of the command name change cls. The program loads the command list by parsing the source code and uses the result to compute the codelens list. Involved data types are also used for JSON marshalling, so I just update the command name after codelens list loading is done using the command data. Updates golang/go#41187 Fixes golang/go#41985 Change-Id: Ic5e818e11b09c649f462fe87dabee0be64c96c2a Reviewed-on: https://go-review.googlesource.com/c/tools/+/262354 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
1 parent a5d9e45 commit c901190

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

gopls/doc/commands.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,75 +4,75 @@ This document describes the LSP-level commands supported by `gopls`. They cannot
44

55
<!-- BEGIN Commands: DO NOT MANUALLY EDIT THIS SECTION -->
66
### **Run go generate**
7-
Identifier: `generate`
7+
Identifier: `gopls_generate`
88

99
generate runs `go generate` for a given directory.
1010

1111

1212
### **Fill struct**
13-
Identifier: `fill_struct`
13+
Identifier: `gopls_fill_struct`
1414

1515
fill_struct is a gopls command to fill a struct with default
1616
values.
1717

1818

1919
### **Regenerate cgo**
20-
Identifier: `regenerate_cgo`
20+
Identifier: `gopls_regenerate_cgo`
2121

2222
regenerate_cgo regenerates cgo definitions.
2323

2424

2525
### **Run test(s)**
26-
Identifier: `test`
26+
Identifier: `gopls_test`
2727

2828
test runs `go test` for a specific test function.
2929

3030

3131
### **Run go mod tidy**
32-
Identifier: `tidy`
32+
Identifier: `gopls_tidy`
3333

3434
tidy runs `go mod tidy` for a module.
3535

3636

3737
### **Undeclared name**
38-
Identifier: `undeclared_name`
38+
Identifier: `gopls_undeclared_name`
3939

4040
undeclared_name adds a variable declaration for an undeclared
4141
name.
4242

4343

4444
### **Upgrade dependency**
45-
Identifier: `upgrade_dependency`
45+
Identifier: `gopls_upgrade_dependency`
4646

4747
upgrade_dependency upgrades a dependency.
4848

4949

5050
### **Run go mod vendor**
51-
Identifier: `vendor`
51+
Identifier: `gopls_vendor`
5252

5353
vendor runs `go mod vendor` for a module.
5454

5555

5656
### **Extract to variable**
57-
Identifier: `extract_variable`
57+
Identifier: `gopls_extract_variable`
5858

5959
extract_variable extracts an expression to a variable.
6060

6161

6262
### **Extract to function**
63-
Identifier: `extract_function`
63+
Identifier: `gopls_extract_function`
6464

6565
extract_function extracts statements to a function.
6666

6767

6868
### **Toggle gc_details**
69-
Identifier: `gc_details`
69+
Identifier: `gopls_gc_details`
7070

7171
gc_details controls calculation of gc annotations.
7272

7373

7474
### **Generate gopls.mod**
75-
Identifier: `generate_gopls_mod`
75+
Identifier: `gopls_generate_gopls_mod`
7676

7777
generate_gopls_mod (re)generates the gopls.mod file.
7878

0 commit comments

Comments
 (0)