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

Mon, 20 May 2024 12:53:43 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 20 May 2024 12:53:43 -0500
changeset 1170
915a78d501d5
parent 1167
f5f84f890974
child 1174
753971334371
permissions
-rw-r--r--

Bump nvim-treesitter to more recent commit

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

  {
    "neovim/nvim-lspconfig",
    branch = "master",
    event = { "BufReadPre", "BufNewFile" },
    dependencies = {
      { "williamboman/mason-lspconfig.nvim", config = true },
      { "folke/neodev.nvim", config = true },
    },
    config = function(_, _)
      local capabilities = require("cmp_nvim_lsp").default_capabilities()

      require("mason-lspconfig").setup_handlers({
        function(server)
          require("lspconfig")[server].setup({ capabilities = capabilities })
        end,
        gopls = function()
          require("lspconfig").gopls.setup({
            capabilities = capabilities,
            settings = { gopls = { gofumpt = true } },
          })
        end,
        solargraph = function()
          require("lspconfig").solargraph.setup({
            capabilities = capabilities,
            init_options = { formatting = false },
          })
        end,
      })
    end,
  },

  { "j-hui/fidget.nvim", event = "LspAttach", config = true },

  -- Support pull diagnostics until 0.10
  { "catlee/pull_diags.nvim", event = "LspAttach", config = true, cond = (vim.fn.has("nvim-0.10") == 0) },

  {
    "aznhe21/actions-preview.nvim",
    event = "LspAttach",
    opts = {
      nui = {
        keymap = { close = { "<ESC>", "<C-c>", "q" } },
      },
    },
  },

  {
    "ray-x/lsp_signature.nvim",
    branch = "master",
    event = "VeryLazy",
    opts = {
      toggle_key = "<C-S>",
      select_signature_key = "<M-n>",
      toggle_key_flip_floatwin_setting = true,
      doc_lines = 0,
      floating_window = true,
      fix_pos = true,
      hint_enable = false,
    },
  },
}

mercurial