Setup go with nvim
This commit is contained in:
@@ -56,6 +56,22 @@ local plugins = {
|
||||
end,
|
||||
},
|
||||
-- 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",
|
||||
event = "VimEnter",
|
||||
|
||||
9
lua/taken/plugins/lazy/go.lua
Normal file
9
lua/taken/plugins/lazy/go.lua
Normal 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)
|
||||
@@ -22,6 +22,7 @@ mason_lspconfig.setup({
|
||||
"cssls",
|
||||
"lua_ls",
|
||||
"pyright",
|
||||
"gopls",
|
||||
"powershell_es",
|
||||
},
|
||||
automatic_installation = true,
|
||||
|
||||
Reference in New Issue
Block a user