lua optimization
parent
1cb0dab7ff
commit
04e5478570
|
|
@ -120,11 +120,10 @@ setup_server("rust_analyzer", {
|
||||||
["rust-analyzer"] = { checkOnSave = true },
|
["rust-analyzer"] = { checkOnSave = true },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
setup_server("lua_ls", { filetypes = { "lua" } })
|
|
||||||
-- setup_server("slint_lsp", { filetypes = { "slint" } })
|
|
||||||
|
|
||||||
-- PHP LSPs
|
-- PHP LSPs
|
||||||
local util = require("lspconfig.util")
|
local util = vim.lsp.util
|
||||||
root_dir = function(fname)
|
root_dir = function(fname)
|
||||||
return util.root_pattern("composer.json", ".git")(fname)
|
return util.root_pattern("composer.json", ".git")(fname)
|
||||||
or util.path.dirname(fname)
|
or util.path.dirname(fname)
|
||||||
|
|
@ -139,6 +138,17 @@ setup_server("phpactor", {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("lua_ls", {
|
||||||
|
filetypes = { "lua" },
|
||||||
|
root_dir = util.root_pattern(".git", ".lua_ls.json", "lua"),
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = {
|
||||||
|
globals = { "vim" } }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
setup_server("intelephense", {
|
setup_server("intelephense", {
|
||||||
filetypes = { "php" },
|
filetypes = { "php" },
|
||||||
root_dir = fallback_root_dir,
|
root_dir = fallback_root_dir,
|
||||||
|
|
@ -177,14 +187,6 @@ elseif vim.loop.fs_stat(phpcs_config) then
|
||||||
vim.g.nvim_phpcs_config_phpcs_standard = phpcs_config
|
vim.g.nvim_phpcs_config_phpcs_standard = phpcs_config
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.lsp.config("lua_ls", {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" } }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
-- === ENABLE: tell Neovim to autostart these configs lazily (filetype + root_dir)
|
-- === ENABLE: tell Neovim to autostart these configs lazily (filetype + root_dir)
|
||||||
-- call this early in your init (so FileType autocommands are installed before opening files)
|
-- call this early in your init (so FileType autocommands are installed before opening files)
|
||||||
local enabled_servers = {
|
local enabled_servers = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue