-
-
Notifications
You must be signed in to change notification settings - Fork 126
/
samplevimrc.vim
46 lines (39 loc) · 1.86 KB
/
samplevimrc.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
call plug#begin('~/.vim/plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'ray-x/go.nvim'
Plug 'ray-x/guihua.lua'
" Plug '~/github/go.nvim'
Plug 'mfussenegger/nvim-dap'
Plug 'rcarriga/nvim-dap-ui'
Plug 'theHamsta/nvim-dap-virtual-text'
" Plug 'hrsh7th/nvim-compe' and other plugins you commenly use...
" optional, if you need treesitter symbol support
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
call plug#end()
" No need for rquire('lspconfig'), navigator will configure it for you
lua <<EOF
require('go').setup({
goimports = 'goimports', -- goimports command
gofmt = 'gofumpt', --gofmt cmd,
tag_transform = false, -- tag_transfer check gomodifytags for details
verbose = true, -- output loginf in messages
log_path = vim.fn.expand("$HOME") .. "/tmp/gonvim.log",
lsp_cfg = true, -- true: apply go.nvim non-default gopls setup
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
-- true: will use go.nvim on_attach if true
-- nil/false do nothing
lsp_codelens = true,
-- gopls_remote_auto = true, -- set to false is you do not want to pass -remote=auto to gopls(enable share)
-- gopls_cmd = nil,
-- if you need to specify gopls path and cmd, e.g {"/home/user/lsp/gopls", "-logfile", "/var/log/gopls.log" }
lsp_diag_hdlr = true, -- hook lsp diag handler
dap_debug = true, -- set to true to enable dap
dap_debug_keymap = true, -- set keymaps for debugger
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
test_runner = 'richgo', -- richgo, go test, richgo, dlv, ginkgo
verbose_tests = true, -- set to add verbose flag to tests
run_in_floaterm = true -- set to true to run in float window.
})
EOF