Setup go with nvim

This commit is contained in:
2023-09-02 20:17:57 +02:00
parent 8771270f3c
commit ca8edeba83
3 changed files with 26 additions and 0 deletions

View File

@@ -56,6 +56,22 @@ local plugins = {
end, end,
}, },
-- development -- development
{
"ray-x/go.nvim",
dependencies = {
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("taken.plugins.lazy.go")
end,
ft = { "go", "gomod" },
build = function()
require("go.install").update_all_sync()
end,
},
{ {
"github/copilot.vim", "github/copilot.vim",
event = "VimEnter", event = "VimEnter",

View File

@@ -0,0 +1,9 @@
local go_status, go = pcall(require, "go")
if not go_status then
return
end
local lspconfig = require("lspconfig")
local cfg = require("go.lsp").config()
lspconfig["gopls"].setup(cfg)

View File

@@ -22,6 +22,7 @@ mason_lspconfig.setup({
"cssls", "cssls",
"lua_ls", "lua_ls",
"pyright", "pyright",
"gopls",
"powershell_es", "powershell_es",
}, },
automatic_installation = true, automatic_installation = true,