.config/nvim/lua/plugins/lsp.lua

Sun, 12 Mar 2023 03:03:49 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 12 Mar 2023 03:03:49 -0500
changeset 1080
83c9f8460bde
parent 1068
537a428597b5
child 1084
76588dcdb04a
permissions
-rw-r--r--

continue to confuse the verymagic options

return {
  -- mason is nonlazy so my executable tests works
  { "williamboman/mason.nvim", config = true },

  {
    "neovim/nvim-lspconfig",
    event = { "BufReadPre", "BufNewFile" },
    dependencies = {
      "williamboman/mason-lspconfig.nvim",
      { "j-hui/fidget.nvim", config = true },
    },
    config = function(plugin, opts)
      require("mason-lspconfig").setup()
      require("mason-lspconfig").setup_handlers({
        function(server)
          require("lspconfig")[server].setup({
            capabilities = require("cmp_nvim_lsp").default_capabilities(),
          })
        end,
        gopls = function()
          require("lspconfig").gopls.setup({
            capabilities = require("cmp_nvim_lsp").default_capabilities(),
            settings = { gopls = { gofumpt = true } },
          })
        end,
        solargraph = function()
          require("lspconfig").solargraph.setup({
            capabilities = require("cmp_nvim_lsp").default_capabilities(),
            init_options = { formatting = false },
          })
        end,
      })
    end,
  },
}

mercurial