mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-20 13:48:41 +00:00
Move entirely to Lua
This commit is contained in:
@@ -1,5 +1,37 @@
|
||||
local coq = require('coq')
|
||||
|
||||
require('lspconfig')['lua_ls'].setup({
|
||||
on_init = function(client)
|
||||
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
|
||||
|
||||
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
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
}
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||
}
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {}
|
||||
}
|
||||
})
|
||||
|
||||
require('lspconfig').pyright.setup(coq.lsp_ensure_capabilities({
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = function(...)
|
||||
|
Reference in New Issue
Block a user