Initial Commit
This commit is contained in:
commit
bcb5556f7c
10 changed files with 166 additions and 0 deletions
34
lua/config/lsp.lua
Normal file
34
lua/config/lsp.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
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 = {},
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue