You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
654 B

1 year ago
1 year ago
1 year ago
1 year ago
4 months ago
1 year ago
  1. return {
  2. "ray-x/go.nvim",
  3. dependencies = {
  4. "ray-x/guihua.lua",
  5. "neovim/nvim-lspconfig",
  6. "nvim-treesitter/nvim-treesitter",
  7. },
  8. event = { "CmdlineEnter" },
  9. ft = { "go", 'gomod' },
  10. build = ':lua require("go.install").update_all_sync()',
  11. config = function()
  12. require("go").setup()
  13. local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
  14. vim.api.nvim_create_autocmd("BufWritePre", {
  15. pattern = "*.go",
  16. callback = function()
  17. require('go.format').goimports()
  18. end,
  19. group = format_sync_grp,
  20. })
  21. end
  22. }