go.nvim/samplevimrc.vim

48 lines
1.9 KiB
VimL
Raw Normal View History

call plug#begin('~/.vim/plugged')
Plug 'neovim/nvim-lspconfig'
2021-11-24 09:47:21 +00:00
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({
2021-09-25 02:44:52 +00:00
goimport='goimport', -- goimport command
gofmt = 'gofumpt', --gofmt cmd,
max_line_len = 120, -- max line length in goline format
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
2021-11-24 09:47:21 +00:00
test_runner = 'richgo', -- richgo, go test, richgo, dlv, ginkgo
verbose_tests = true, -- set to add verbose flag to tests
2021-11-24 09:47:21 +00:00
run_in_floaterm = true -- set to true to run in float window.
})
EOF