mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
refactor(lsp)!: lua lsp renamed (#3836)
Need to run `:LvimCacheReset` after this for lua ftplugin regenration * chore: bump plugins version * refactor(loader): update lazy's cache setup * chore: bump plugins version * chore(lsp): skip antlerls for html * fix(lsp): lua lsp renamed (#3841) * fix(loader): lazy's cache is now a directory * fix: LvimUpdate should bump core plugins (#3846) * chore: bump plugins version * fix(cmp): handle deprecated tree-sitter api (#3853) * fix(loader): wrap cache invocation with pcall avoid problems when lazy hasn't been updated yet * chore(lsp): skip docker-compose ls * chore: bump plugins --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> Co-authored-by: Jieru Mei <meijieru@gmail.com> Co-authored-by: LostNeophyte <lostneophyte@tuta.io>
This commit is contained in:
parent
ddc86f3a8a
commit
f43cc8e20b
5 changed files with 46 additions and 43 deletions
|
@ -1,10 +1,12 @@
|
||||||
local skipped_servers = {
|
local skipped_servers = {
|
||||||
"angularls",
|
"angularls",
|
||||||
"ansiblels",
|
"ansiblels",
|
||||||
|
"antlersls",
|
||||||
"ccls",
|
"ccls",
|
||||||
"csharp_ls",
|
"csharp_ls",
|
||||||
"cssmodules_ls",
|
"cssmodules_ls",
|
||||||
"denols",
|
"denols",
|
||||||
|
"docker_compose_language_service",
|
||||||
"ember",
|
"ember",
|
||||||
"emmet_ls",
|
"emmet_ls",
|
||||||
"eslint",
|
"eslint",
|
||||||
|
|
|
@ -30,7 +30,7 @@ local make_on_new_config = function(on_new_config, _)
|
||||||
return lspconfig.util.add_hook_before(on_new_config, function(new_config, _)
|
return lspconfig.util.add_hook_before(on_new_config, function(new_config, _)
|
||||||
local server_name = new_config.name
|
local server_name = new_config.name
|
||||||
|
|
||||||
if server_name ~= "sumneko_lua" then
|
if server_name ~= "lua_ls" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local plugins = { "plenary.nvim", "telescope.nvim", "nvim-treesitter", "LuaSnip" }
|
local plugins = { "plenary.nvim", "telescope.nvim", "nvim-treesitter", "LuaSnip" }
|
|
@ -17,7 +17,7 @@ function plugin_loader.init(opts)
|
||||||
local core_plugins_dir = join_paths(get_lvim_base_dir(), "plugins")
|
local core_plugins_dir = join_paths(get_lvim_base_dir(), "plugins")
|
||||||
if utils.is_directory(core_plugins_dir) then
|
if utils.is_directory(core_plugins_dir) then
|
||||||
vim.fn.mkdir(plugins_dir, "p")
|
vim.fn.mkdir(plugins_dir, "p")
|
||||||
vim.loop.fs_rmdir(plugins_dir)
|
vim.fn.delete(plugins_dir, "rf")
|
||||||
require("lvim.utils").fs_copy(core_plugins_dir, plugins_dir)
|
require("lvim.utils").fs_copy(core_plugins_dir, plugins_dir)
|
||||||
else
|
else
|
||||||
vim.fn.system {
|
vim.fn.system {
|
||||||
|
@ -47,21 +47,22 @@ function plugin_loader.init(opts)
|
||||||
vim.opt.runtimepath:append(lazy_install_dir)
|
vim.opt.runtimepath:append(lazy_install_dir)
|
||||||
vim.opt.runtimepath:append(join_paths(plugins_dir, "*"))
|
vim.opt.runtimepath:append(join_paths(plugins_dir, "*"))
|
||||||
|
|
||||||
|
pcall(function()
|
||||||
|
-- set a custom path for lazy's cache and enable it
|
||||||
local lazy_cache = require "lazy.core.cache"
|
local lazy_cache = require "lazy.core.cache"
|
||||||
lazy_cache.setup {
|
lazy_cache.path = join_paths(get_cache_dir(), "lazy", "luac")
|
||||||
performance = {
|
lazy_cache.enable()
|
||||||
cache = {
|
end)
|
||||||
enabled = true,
|
|
||||||
path = join_paths(get_cache_dir(), "lazy", "cache"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
-- HACK: Don't allow lazy to call setup second time
|
|
||||||
lazy_cache.setup = function() end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function plugin_loader.reset_cache()
|
function plugin_loader.reset_cache()
|
||||||
os.remove(require("lazy.core.cache").config.path)
|
-- TODO(kylo252): is this really necessary anymore?
|
||||||
|
local lazy_cache = require "lazy.core.cache"
|
||||||
|
local cache_path = lazy_cache.path
|
||||||
|
if utils.is_directory(cache_path) then
|
||||||
|
vim.fn.delete(cache_path, "rf")
|
||||||
|
vim.fn.mkdir(cache_path, "p")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function plugin_loader.reload(spec)
|
function plugin_loader.reload(spec)
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
{
|
{
|
||||||
"Comment.nvim": {
|
"Comment.nvim": {
|
||||||
"commit": "eab2c83"
|
"commit": "6821b3a"
|
||||||
},
|
},
|
||||||
"LuaSnip": {
|
"LuaSnip": {
|
||||||
"commit": "d404ec3"
|
"commit": "58fbfc6"
|
||||||
},
|
},
|
||||||
"alpha-nvim": {
|
"alpha-nvim": {
|
||||||
"commit": "21a0f25"
|
"commit": "b3eef69"
|
||||||
},
|
},
|
||||||
"bigfile.nvim": {
|
"bigfile.nvim": {
|
||||||
"commit": "c1bad34"
|
"commit": "c1bad34"
|
||||||
},
|
},
|
||||||
"bufferline.nvim": {
|
"bufferline.nvim": {
|
||||||
"commit": "c7492a7"
|
"commit": "84b0822"
|
||||||
},
|
},
|
||||||
"cmp-buffer": {
|
"cmp-buffer": {
|
||||||
"commit": "3022dbc"
|
"commit": "3022dbc"
|
||||||
},
|
},
|
||||||
"cmp-cmdline": {
|
"cmp-cmdline": {
|
||||||
"commit": "23c51b2"
|
"commit": "8fcc934"
|
||||||
},
|
},
|
||||||
"cmp-nvim-lsp": {
|
"cmp-nvim-lsp": {
|
||||||
"commit": "0e6b2ed"
|
"commit": "0e6b2ed"
|
||||||
|
@ -30,70 +30,70 @@
|
||||||
"commit": "1809552"
|
"commit": "1809552"
|
||||||
},
|
},
|
||||||
"friendly-snippets": {
|
"friendly-snippets": {
|
||||||
"commit": "a6f7a16"
|
"commit": "1645e7c"
|
||||||
},
|
},
|
||||||
"gitsigns.nvim": {
|
"gitsigns.nvim": {
|
||||||
"commit": "ec4742a"
|
"commit": "f388995"
|
||||||
},
|
},
|
||||||
"indent-blankline.nvim": {
|
"indent-blankline.nvim": {
|
||||||
"commit": "8299fe7"
|
"commit": "8299fe7"
|
||||||
},
|
},
|
||||||
"lazy.nvim": {
|
"lazy.nvim": {
|
||||||
"commit": "9b20869"
|
"commit": "8186cc5"
|
||||||
},
|
},
|
||||||
"lir.nvim": {
|
"lir.nvim": {
|
||||||
"commit": "3aa6c20"
|
"commit": "248f6b1"
|
||||||
},
|
},
|
||||||
"lualine.nvim": {
|
"lualine.nvim": {
|
||||||
"commit": "0050b30"
|
"commit": "e99d733"
|
||||||
},
|
},
|
||||||
"lunar.nvim": {
|
"lunar.nvim": {
|
||||||
"commit": "29eedf7"
|
"commit": "29eedf7"
|
||||||
},
|
},
|
||||||
"mason-lspconfig.nvim": {
|
"mason-lspconfig.nvim": {
|
||||||
"commit": "53f3a8b"
|
"commit": "93e58e1"
|
||||||
},
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
"commit": "357ef66"
|
"commit": "d5ad4bb"
|
||||||
},
|
},
|
||||||
"neodev.nvim": {
|
"neodev.nvim": {
|
||||||
"commit": "b3b22cf"
|
"commit": "a81e749"
|
||||||
},
|
},
|
||||||
"nlsp-settings.nvim": {
|
"nlsp-settings.nvim": {
|
||||||
"commit": "d0b7caa"
|
"commit": "3f31cac"
|
||||||
},
|
},
|
||||||
"null-ls.nvim": {
|
"null-ls.nvim": {
|
||||||
"commit": "60b4a71"
|
"commit": "a82aa08"
|
||||||
},
|
},
|
||||||
"nvim-autopairs": {
|
"nvim-autopairs": {
|
||||||
"commit": "28f57e6"
|
"commit": "bde7a1b"
|
||||||
},
|
},
|
||||||
"nvim-cmp": {
|
"nvim-cmp": {
|
||||||
"commit": "cfafe0a"
|
"commit": "ea9eaff"
|
||||||
},
|
},
|
||||||
"nvim-dap": {
|
"nvim-dap": {
|
||||||
"commit": "0e376f0"
|
"commit": "049eebe"
|
||||||
},
|
},
|
||||||
"nvim-dap-ui": {
|
"nvim-dap-ui": {
|
||||||
"commit": "6f18751"
|
"commit": "ffe3e58"
|
||||||
},
|
},
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"commit": "d3c82d2"
|
"commit": "649137c"
|
||||||
},
|
},
|
||||||
"nvim-navic": {
|
"nvim-navic": {
|
||||||
"commit": "7e9d2b2"
|
"commit": "7e9d2b2"
|
||||||
},
|
},
|
||||||
"nvim-tree.lua": {
|
"nvim-tree.lua": {
|
||||||
"commit": "02fdc26"
|
"commit": "08a0aa1"
|
||||||
},
|
},
|
||||||
"nvim-treesitter": {
|
"nvim-treesitter": {
|
||||||
"commit": "df6f322"
|
"commit": "be26661"
|
||||||
},
|
},
|
||||||
"nvim-ts-context-commentstring": {
|
"nvim-ts-context-commentstring": {
|
||||||
"commit": "a0f8956"
|
"commit": "a0f8956"
|
||||||
},
|
},
|
||||||
"nvim-web-devicons": {
|
"nvim-web-devicons": {
|
||||||
"commit": "ade34ca"
|
"commit": "bb6d4fd"
|
||||||
},
|
},
|
||||||
"onedarker.nvim": {
|
"onedarker.nvim": {
|
||||||
"commit": "b00dd21"
|
"commit": "b00dd21"
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
"commit": "685bc8e"
|
"commit": "685bc8e"
|
||||||
},
|
},
|
||||||
"schemastore.nvim": {
|
"schemastore.nvim": {
|
||||||
"commit": "fd5ddd8"
|
"commit": "a4798a9"
|
||||||
},
|
},
|
||||||
"structlog.nvim": {
|
"structlog.nvim": {
|
||||||
"commit": "45b26a2"
|
"commit": "45b26a2"
|
||||||
|
@ -120,15 +120,15 @@
|
||||||
"commit": "a1bd686"
|
"commit": "a1bd686"
|
||||||
},
|
},
|
||||||
"toggleterm.nvim": {
|
"toggleterm.nvim": {
|
||||||
"commit": "19aad0f"
|
"commit": "5576648"
|
||||||
},
|
},
|
||||||
"tokyonight.nvim": {
|
"tokyonight.nvim": {
|
||||||
"commit": "affb21a"
|
"commit": "a0abe53"
|
||||||
},
|
},
|
||||||
"vim-illuminate": {
|
"vim-illuminate": {
|
||||||
"commit": "d6ca7f7"
|
"commit": "49062ab"
|
||||||
},
|
},
|
||||||
"which-key.nvim": {
|
"which-key.nvim": {
|
||||||
"commit": "684e96c"
|
"commit": "5224c26"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ _G.load_config = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add the server that troubles you here, e.g. "clangd", "pyright", "tsserver"
|
-- Add the server that troubles you here, e.g. "clangd", "pyright", "tsserver"
|
||||||
local name = "sumneko_lua"
|
local name = "lua_ls"
|
||||||
|
|
||||||
local setup_opts = {
|
local setup_opts = {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
|
Loading…
Reference in a new issue