main
59c7d64 ยท 8 days ago 139 commits
 1return {
 2	{
 3		"mason-org/mason.nvim",
 4		lazy = false,
 5		config = function()
 6			require("mason").setup()
 7		end,
 8	},
 9	{
10		"mason-org/mason-lspconfig.nvim",
11		config = function()
12			require("mason-lspconfig").setup({
13				ensure_installed = {
14					"lua_ls",
15					"gopls",
16					"ts_ls",
17				},
18			})
19		end,
20	},
21	{
22		"neovim/nvim-lspconfig",
23		dependencies = {
24			"saghen/blink.cmp",
25		},
26		opts = {
27			servers = {
28				clangd = {
29					cmd = {
30						"clangd",
31						"--query-driver=/home/robin/.arduino15/packages/esp32/tools/esp-x32/*/bin/xtensa-esp32s3-elf-g++",
32					}
33				},
34				lua_ls = {
35					settings = {
36						Lua = {
37							diagnostics = { globals = { "vim" } },
38							workspace = { library = { [vim.fn.expand("/usr/share/hypr/stubs/hl.meta.lua")] = true } }
39						}
40					},
41				},
42				gopls = {},
43				ts_ls = {},
44			},
45		},
46		config = function(_, opts)
47			local capabilities = require("blink.cmp").get_lsp_capabilities()
48
49			vim.lsp.config("*", { capabilities = capabilities })
50			for server, config in pairs(opts.servers) do
51				vim.lsp.config(server, config)
52				vim.lsp.enable(server)
53			end
54		end,
55	},
56}