|
|
@ -31,7 +31,6 @@ if nothing shows up, you can add the following to your shell config file
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
export PATH=$PATH:$GOPATH/bin
|
|
|
|
export PATH=$PATH:$GOPATH/bin
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
add 'ray-x/go.nvim' to your package manager, the dependency is `treesitter` (and optionally, treesitter-objects)
|
|
|
|
add 'ray-x/go.nvim' to your package manager, the dependency is `treesitter` (and optionally, treesitter-objects)
|
|
|
|
related binaries will be installed the first time you use it
|
|
|
|
related binaries will be installed the first time you use it
|
|
|
|
Add format in your vimrc.
|
|
|
|
Add format in your vimrc.
|
|
|
@ -313,7 +312,7 @@ Configure from lua suggested, The default setup:
|
|
|
|
|
|
|
|
|
|
|
|
```lua
|
|
|
|
```lua
|
|
|
|
require('go').setup({
|
|
|
|
require('go').setup({
|
|
|
|
goimport='gofumports', -- goimport command
|
|
|
|
goimport='gopls', -- goimport command, can be gopls[default], gofumports[deprecated] or goimport
|
|
|
|
gofmt = 'gofumpt', --gofmt cmd,
|
|
|
|
gofmt = 'gofumpt', --gofmt cmd,
|
|
|
|
max_line_len = 120, -- max line length in goline format
|
|
|
|
max_line_len = 120, -- max line length in goline format
|
|
|
|
tag_transform = false, -- tag_transfer check gomodifytags for details
|
|
|
|
tag_transform = false, -- tag_transfer check gomodifytags for details
|
|
|
@ -321,7 +320,8 @@ require('go').setup({
|
|
|
|
test_template_dir = '', -- default to nil if not set; g:go_nvim_tests_template_dir check gotests for details
|
|
|
|
test_template_dir = '', -- default to nil if not set; g:go_nvim_tests_template_dir check gotests for details
|
|
|
|
comment_placeholder = '' , -- comment_placeholder your cool placeholder e.g. ﳑ
|
|
|
|
comment_placeholder = '' , -- comment_placeholder your cool placeholder e.g. ﳑ
|
|
|
|
verbose = false, -- output loginf in messages
|
|
|
|
verbose = false, -- output loginf in messages
|
|
|
|
lsp_cfg = false, -- true: apply go.nvim non-default gopls setup
|
|
|
|
lsp_cfg = false, -- true: apply go.nvim non-default gopls setup, if it is a list, will merge with gopls setup e.g.
|
|
|
|
|
|
|
|
-- lsp_cfg = {settings={gopls={matcher='CaseInsensitive', ['local'] = 'your_local_module_path', gofumpt = true }}}
|
|
|
|
lsp_gofumpt = false, -- true: set default gofmt in gopls format to gofumpt
|
|
|
|
lsp_gofumpt = false, -- true: set default gofmt in gopls format to gofumpt
|
|
|
|
lsp_on_attach = true, -- if a on_attach function provided: attach on_attach function to gopls
|
|
|
|
lsp_on_attach = true, -- if a on_attach function provided: attach on_attach function to gopls
|
|
|
|
-- true: will use go.nvim on_attach if true
|
|
|
|
-- true: will use go.nvim on_attach if true
|
|
|
@ -335,7 +335,6 @@ require('go').setup({
|
|
|
|
dap_debug_keymap = true, -- set keymaps for debugger
|
|
|
|
dap_debug_keymap = true, -- set keymaps for debugger
|
|
|
|
dap_debug_gui = true, -- set to true to enable dap gui, highly recommand
|
|
|
|
dap_debug_gui = true, -- set to true to enable dap gui, highly recommand
|
|
|
|
dap_debug_vt = true, -- set to true to enable dap virtual text
|
|
|
|
dap_debug_vt = true, -- set to true to enable dap virtual text
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|