From e9d771410ebc462fe2a10bd536cc0cd5f45dd0de Mon Sep 17 00:00:00 2001 From: mjhika <1zzt6ovh@mojica.anonaddy.com> Date: Thu, 24 Aug 2023 19:03:23 -0400 Subject: [PATCH] add go support --- init.lua | 4 ++-- lua/custom/plugins/golang.lua | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/golang.lua diff --git a/init.lua b/init.lua index 76b2c450..08a60544 100644 --- a/init.lua +++ b/init.lua @@ -285,7 +285,7 @@ vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { de -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'vimdoc', 'vim', 'clojure', 'commonlisp' }, + ensure_installed = { 'c', 'go', 'gomod', 'gosum', 'gowork', 'lua', 'vimdoc', 'vim', 'clojure', 'commonlisp' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = true, @@ -408,7 +408,7 @@ end -- define the property 'filetypes' to the map in question. local servers = { -- clangd = {}, - -- gopls = {}, + gopls = {}, -- pyright = {}, -- rust_analyzer = {}, -- tsserver = {}, diff --git a/lua/custom/plugins/golang.lua b/lua/custom/plugins/golang.lua new file mode 100644 index 00000000..c6507c90 --- /dev/null +++ b/lua/custom/plugins/golang.lua @@ -0,0 +1,4 @@ +return { + "fatih/vim-go", + ft = "go" +}