Skip to content

Instantly share code, notes, and snippets.

@wjkoh
Last active October 20, 2023 08:45
Show Gist options
  • Save wjkoh/b5677ccfd23cda39a4e7dae9bb736031 to your computer and use it in GitHub Desktop.
Save wjkoh/b5677ccfd23cda39a4e7dae9bb736031 to your computer and use it in GitHub Desktop.
LazyVim: Install go.nvim plugin
-- Copy this file to your ~/.config/nvim/lua/plugins/.
-- Add $GOPATH/bin to $PATH. For example, `set -Ux GOPATH $HOME/go && fish_add_path $GOPATH/bin`
-- Consider using https://github.com/fatih/vim-go instead of go.nvim.
return {
{
"ray-x/go.nvim",
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("go").setup()
end,
event = { "CmdlineEnter" },
ft = { "go", "gomod" },
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment