45 lines
858 B
Lua
45 lines
858 B
Lua
require("mason").setup()
|
|
|
|
vim.lsp.enable("lua_ls")
|
|
vim.lsp.config("lua_ls", {
|
|
on_init = function(client)
|
|
if client.workspace_folders then
|
|
local path = client.workspace_folders[1].name
|
|
if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
|
|
return
|
|
end
|
|
end
|
|
|
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
|
runtime = {
|
|
version = 'LuaJIT'
|
|
},
|
|
workspace = {
|
|
checkThirdParty = false,
|
|
library = {
|
|
vim.env.VIMRUNTIME
|
|
}
|
|
}
|
|
})
|
|
end,
|
|
settings = {
|
|
Lua = {}
|
|
}
|
|
})
|
|
|
|
vim.lsp.enable("clangd")
|
|
|
|
vim.lsp.enable("rust_analyzer")
|
|
|
|
vim.lsp.enable("pyright")
|
|
|
|
vim.lsp.enable("html")
|
|
|
|
vim.lsp.enable("vtsls")
|
|
|
|
vim.lsp.enable("svelte")
|
|
|
|
vim.lsp.enable("tailwindcss")
|
|
|
|
vim.lsp.enable("jdtls")
|