diff --git a/lua/autocmds.lua b/lua/autocmds.lua index c55c2bf..d799ae8 100644 --- a/lua/autocmds.lua +++ b/lua/autocmds.lua @@ -151,9 +151,5 @@ autocmd('BufUnload', { end, }) - --- auto format on write -vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] - -- syntax fix vim.cmd("syntax sync fromstart") diff --git a/lua/lsp_settings.lua b/lua/lsp_settings.lua index cb5835b..e41b539 100644 --- a/lua/lsp_settings.lua +++ b/lua/lsp_settings.lua @@ -61,9 +61,6 @@ require('mason-lspconfig').setup_handlers { globals = { 'vim' } } }, - gopls = { - gofumpt = true - } } } end diff --git a/lua/plugins.lua b/lua/plugins.lua index 7a58184..f2e0c16 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -26,8 +26,24 @@ return require('packer').startup({ function(use) --nim use 'alaviss/nim.nvim' - -- golang - use 'fatih/vim-go' + use 'nvim-treesitter/nvim-treesitter' + + use 'ray-x/guihua.lua' + + use { + 'ray-x/go.nvim', + ft = { "go" }, + config = function() + require("go").setup({ + max_line_len = 120, + tag_transform = false, + test_dir = '', + comment_placeholder = '  ', + lsp_cfg = true, -- false: use your own lspconfig + dap_debug = true, + }) + end + } -- obsession use 'tpope/vim-obsession'