From 163a4f927514ad6ea1aa06db2ad754fb954d87f5 Mon Sep 17 00:00:00 2001 From: Jonas Holst Damtoft Date: Wed, 24 May 2023 08:55:03 +0200 Subject: [PATCH] feat(go): add go lang extras (#795) * feat(go): add go lang extras * fix(go): update plugin * fix(go): add neotest adapter to adapters * fix(go): pr changes --- lua/lazyvim/plugins/extras/lang/go.lua | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/go.lua diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua new file mode 100644 index 00000000..73081e52 --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -0,0 +1,50 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed, { + "go", + "gomod", + "gowork", + "gosum", + }) + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + gopls = { + semanticTokens = true, + }, + }, + }, + }, + { + "mfussenegger/nvim-dap", + optional = true, + dependencies = { + { + "mason.nvim", + opts = { + ensure_installed = { "delve" }, + }, + }, + }, + }, + { + "nvim-neotest/neotest", + optional = true, + dependencies = { + "nvim-neotest/neotest-go", + }, + opts = { + adapters = { + ["neotest-go"] = { + -- Here we can set options for neotest-go, e.g. + -- args = { "-tags=integration" } + }, + }, + }, + }, +}