From 924c36069f9d74965e40380a9c46c0ccfa5bf617 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Fri, 2 Feb 2024 16:20:30 -0800 Subject: [PATCH] Add go to neovim config --- dot_config/nvim/lua/plugins/autocompletion.lua | 2 ++ dot_config/nvim/lua/plugins/go.lua | 17 +++++++++++++++++ dot_config/nvim/lua/plugins/lsp.lua.tmpl | 1 + dot_config/nvim/lua/plugins/treesitter.lua | 1 + 4 files changed, 21 insertions(+) create mode 100644 dot_config/nvim/lua/plugins/go.lua diff --git a/dot_config/nvim/lua/plugins/autocompletion.lua b/dot_config/nvim/lua/plugins/autocompletion.lua index e1ad2a0..41f622a 100644 --- a/dot_config/nvim/lua/plugins/autocompletion.lua +++ b/dot_config/nvim/lua/plugins/autocompletion.lua @@ -53,9 +53,11 @@ end return { 'hrsh7th/nvim-cmp', + name = 'cmp', config = config, dependencies = { 'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-nvim-lsp', }, + } diff --git a/dot_config/nvim/lua/plugins/go.lua b/dot_config/nvim/lua/plugins/go.lua new file mode 100644 index 0000000..5480c69 --- /dev/null +++ b/dot_config/nvim/lua/plugins/go.lua @@ -0,0 +1,17 @@ +local function config() + require('go').setup() +end + +return { + 'ray-x/go.nvim', + name = 'go', + import = 'plugins.go', + config = config, + event = {'CmdlineEnter'}, + ft = {'go', 'gomod'}, + dependencies = { + 'ray-x/guihua.lua', + 'lspconfig', + 'treesitter', + }, +} diff --git a/dot_config/nvim/lua/plugins/lsp.lua.tmpl b/dot_config/nvim/lua/plugins/lsp.lua.tmpl index 7dd184c..c1a44e1 100644 --- a/dot_config/nvim/lua/plugins/lsp.lua.tmpl +++ b/dot_config/nvim/lua/plugins/lsp.lua.tmpl @@ -101,6 +101,7 @@ end return { 'neovim/nvim-lspconfig', + name = 'lspconfig', config = config, dependencies = { { 'williamboman/mason.nvim', tag = 'v1.*' }, diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua index 4a3e32c..f33cfa8 100644 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -85,6 +85,7 @@ end return { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', + name = 'treesitter', config = config, build = ':TSUpdate', dependencies = {