mirror of
https://github.com/He4eT/dotfiles.git
synced 2026-06-18 19:04:26 +00:00
nvim: copy lua_ls from kickstart.nvim
This commit is contained in:
parent
e2cc701edd
commit
8f55e5d525
1 changed files with 24 additions and 1 deletions
|
|
@ -487,7 +487,30 @@ require('lazy').setup({
|
||||||
|
|
||||||
--[[ cfg_lazy_lsp_servers ]]
|
--[[ cfg_lazy_lsp_servers ]]
|
||||||
local servers = {
|
local servers = {
|
||||||
lua_ls = {},
|
lua_ls = {
|
||||||
|
on_init = function(client)
|
||||||
|
if client.workspace_folders then
|
||||||
|
local path = client.workspace_folders[1].name
|
||||||
|
if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.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',
|
||||||
|
path = { 'lua/?.lua', 'lua/?/init.lua' },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = vim.tbl_extend('force', vim.api.nvim_get_runtime_file('', true), {
|
||||||
|
'${3rd}/luv/library',
|
||||||
|
'${3rd}/busted/library',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
ts_ls = {
|
ts_ls = {
|
||||||
filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'vue' },
|
filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'vue' },
|
||||||
init_options = {
|
init_options = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue