Advertisement
Guest User

Untitled

a guest
Apr 27th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1.  
  2.     {
  3.         "williamboman/mason.nvim",
  4.         opts = {},
  5.         keys = {
  6.             { "<leader>m", "<cmd>Mason<cr>", desc = "Open Mason dashboard" },
  7.         },
  8.     },
  9.  
  10.     {
  11.         "neovim/nvim-lspconfig",
  12.         dependencies = {
  13.             "williamboman/mason.nvim",
  14.             "williamboman/mason-lspconfig.nvim",
  15.             "saghen/blink.cmp",
  16.         },
  17.  
  18.         event = "LazyFile",
  19.         config = function()
  20.             local lspconfig = require "lspconfig"
  21.             local mason_lspconfig = require "mason-lspconfig"
  22.             local blink = require "blink.cmp"
  23.  
  24.             local servers = {}
  25.             mason_lspconfig.setup_handlers {
  26.                 function(name)
  27.                     local config = servers[name] or {}
  28.                     config.capabilities = vim.tbl_deep_extend(
  29.                         "force",
  30.                         vim.lsp.protocol.make_client_capabilities(),
  31.                         blink.get_lsp_capabilities(config.capabilities)
  32.                     )
  33.                     lspconfig[name].setup(config)
  34.                 end,
  35.             }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement