35 lines
848 B
Lua
35 lines
848 B
Lua
require("lspconfig").basedpyright.setup({})
|
|
require("lspconfig").ruff.setup({})
|
|
|
|
require("lspconfig").lua_ls.setup({
|
|
on_init = function(client)
|
|
if client.workspace_folders then
|
|
local path = client.workspace_folders[1].name
|
|
if
|
|
path ~= vim.fn.stdpath("config")
|
|
and (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 = {
|
|
-- Tell the language server which version of Lua you're using
|
|
-- (most likely LuaJIT in the case of Neovim)
|
|
version = "LuaJIT",
|
|
},
|
|
-- Make the server aware of Neovim runtime files
|
|
workspace = {
|
|
checkThirdParty = false,
|
|
library = {
|
|
vim.env.VIMRUNTIME,
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
settings = {
|
|
Lua = {},
|
|
},
|
|
})
|