2024-04-01 16:13:40 +03:00
|
|
|
-- Run gofmt + goimports on save
|
|
|
|
|
|
|
|
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
|
|
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
|
|
pattern = "*.go",
|
|
|
|
callback = function()
|
|
|
|
require('go.format').goimports()
|
|
|
|
end,
|
|
|
|
group = format_sync_grp,
|
|
|
|
})
|
|
|
|
|
2024-04-01 10:41:54 +03:00
|
|
|
return {
|
|
|
|
{
|
|
|
|
"stevearc/conform.nvim",
|
|
|
|
-- event = 'BufWritePre', -- uncomment for format on save
|
|
|
|
config = function()
|
|
|
|
require "configs.conform"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"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
|
|
|
|
},
|
|
|
|
-- These are some examples, uncomment them if you want to see them work!
|
|
|
|
{
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
config = function()
|
|
|
|
require("nvchad.configs.lspconfig").defaults()
|
|
|
|
require "configs.lspconfig"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
2024-07-16 15:22:42 +03:00
|
|
|
-- {"sindrets/diffview.nvim", lazy = false},
|
|
|
|
|
2024-08-04 01:43:04 +03:00
|
|
|
{
|
|
|
|
"williamboman/mason.nvim",
|
|
|
|
opts = {
|
|
|
|
ensure_installed = {
|
|
|
|
"lua-language-server",
|
|
|
|
"clangd",
|
2024-09-09 14:34:02 +03:00
|
|
|
"clang-format",
|
2024-08-04 01:43:04 +03:00
|
|
|
"stylua",
|
|
|
|
"gopls",
|
|
|
|
"golangci-lint",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-09-09 14:34:02 +03:00
|
|
|
{
|
|
|
|
"jose-elias-alvarez/null-ls.nvim",
|
|
|
|
event = "VeryLazy",
|
|
|
|
opts = function ()
|
|
|
|
return require "configs.null-ls"
|
|
|
|
end
|
|
|
|
}
|
2024-04-01 10:41:54 +03:00
|
|
|
}
|