-- 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, }) 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, }, -- { -- "williamboman/mason.nvim", -- opts = { -- ensure_installed = { -- "lua-language-server", "stylua", -- "html-lsp", "css-lsp" , "prettier" -- }, -- }, -- }, -- -- { -- "nvim-treesitter/nvim-treesitter", -- opts = { -- ensure_installed = { -- "vim", "lua", "vimdoc", -- "html", "css" -- }, -- }, -- }, }