1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:54:40 -07:00
go/gopls/doc
Rohan Challa 136c3617b6 internal/lsp: support textDocument/formatting for .mod extension
This change implements support for textDocument/formatting when it comes to go.mod files. It also adds formatting on save ability.

To enable formatting on save for go.mod files, you need to include the following settings inside of your VSCode settings.json:

...
"[go.mod]": {
	"editor.codeActionsOnSave": {
		"source.organizeImports": true,
	},
	"editor.formatOnSave": true,
},
...

Updates golang/go#36501

Change-Id: I60ac14d0e99b2b086fe9a8581770771aafc2173c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/221223
Run-TryBot: Rohan Challa <rohan@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-03-06 13:51:27 +00:00
..
acme.md cmd/gopls: add documentation 2019-08-27 15:23:08 +00:00
atom.md gopls/doc: add documentation for gopls with Atom 2019-11-27 06:49:51 +00:00
command-line.md gopls/doc: add and make minor changes to documentation 2019-09-16 01:38:12 +00:00
contributing.md gopls/doc: add and make minor changes to documentation 2019-09-16 01:38:12 +00:00
daemon.md gopls/doc: add documentation for running gopls as a daemon 2020-02-27 22:23:43 +00:00
design.md gopls/doc: minor fixes in design.md and implementation.md 2020-01-14 23:33:23 +00:00
emacs.md gopls/doc: expand Emacs docs 2019-11-12 19:56:55 +00:00
faq.md cmd/gopls: add documentation 2019-08-27 15:23:08 +00:00
implementation.md gopls/doc: minor fixes in design.md and implementation.md 2020-01-14 23:33:23 +00:00
integrating.md all: fix broken links to LSP specification 2019-10-02 18:32:53 +00:00
settings.md gopls/doc: fix it's/its typo 2020-01-15 15:48:44 +00:00
status.md gopls/doc: Clear out fixed issues 2020-02-24 23:14:51 +00:00
subl.md cmd/gopls: add documentation 2019-08-27 15:23:08 +00:00
troubleshooting.md gopls/doc: improve troubleshooting docs with specifics 2020-01-15 20:40:27 +00:00
user.md gopls/doc: document updating to an unstable version 2020-01-25 22:37:03 +00:00
vim.md gopls/doc: fix issue links for vim-lsc 2019-10-17 10:18:17 +00:00
vscode.md internal/lsp: support textDocument/formatting for .mod extension 2020-03-06 13:51:27 +00:00