diff --git a/dots/.config/nvim/lua/plugins/configs/go.lua b/dots/.config/nvim/lua/plugins/configs/go.lua new file mode 100644 index 00000000..b4d17808 --- /dev/null +++ b/dots/.config/nvim/lua/plugins/configs/go.lua @@ -0,0 +1,25 @@ +return { + { + "ray-x/go.nvim", + dependencies = { -- optional packages + "ray-x/guihua.lua", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter", + }, + config = function() + require("go").setup({ + max_line_len = vim.opt.textwidth, + lsp_keymaps = false, + dap_debug_keymap = false, + lsp_codelens = false, + icons = false, + run_in_floaterm = true, + trouble = true, + luasnip = true + }) + end, + event = { "CmdlineEnter" }, + ft = { "go", "gomod" }, + build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries + }, +} diff --git a/dots/.config/nvim/lua/plugins/configs/lsp.lua b/dots/.config/nvim/lua/plugins/configs/lsp.lua index 7bf4bf40..39912ebe 100644 --- a/dots/.config/nvim/lua/plugins/configs/lsp.lua +++ b/dots/.config/nvim/lua/plugins/configs/lsp.lua @@ -446,19 +446,9 @@ return { lspconfig.gopls.setup({ capabilities = lsp_capabilities, on_attach = on_attach, - settings = { - gopls = { - hints = { - assignVariableTypes = true, - compositeLiteralFields = true, - compositeLiteralTypes = true, - constantValues = true, - functionTypeParameters = true, - parameterNames = true, - rangeVariableTypes = true, - }, - }, - }, + fillstruct = 'gopls', + dap_debug = true, + dap_debug_gui = true }) -- NOTE: GENERIC LSP SERVERS