main
ef24df8 ยท 1 month ago 145 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				gdscript = {
45					name = "godot",
46					cmd = vim.lsp.rpc.connect("127.0.0.1", 6005),
47					filetpyes = { "gd", "gdscript" },
48					root_makers = {
49						"project.godot",
50					},
51				},
52			},
53		},
54		config = function(_, opts)
55			local capabilities = require("blink.cmp").get_lsp_capabilities()
56
57			vim.lsp.config("*", { capabilities = capabilities })
58			for server, config in pairs(opts.servers) do
59				vim.lsp.config(server, config)
60				vim.lsp.enable(server)
61			end
62		end,
63	},
64}