refactor(LSP): use the new vim.lsp.* functions to set up LSP servers

This commit is contained in:
2025-06-05 11:30:14 +02:00
parent c569c12ae7
commit e8ff3fed7c
29 changed files with 556 additions and 1744 deletions
+6 -15
View File
@@ -1,6 +1,6 @@
vim.loader.enable()
local utils = require("ow.utils")
local log = require("ow.log")
local files = {
"globals",
@@ -13,28 +13,19 @@ for _, file in ipairs(files) do
local pkg = "ow.core." .. file
local ok, err = pcall(require, pkg)
if not ok then
utils.err("Error while loading package " .. pkg)
utils.err(err)
log.error("Error while loading package " .. pkg)
log.error(err)
return
end
end
local ok, err = pcall(require, "ow.bootstrap")
if not ok then
utils.err("Error during bootstrap")
utils.err(err:gsub("\t", " "))
log.error("Error during bootstrap")
log.error(err:gsub("\t", " "))
return
end
---@type LazyPluginSpec[]
local plugins = {
{
"neovim/nvim-lspconfig",
config = require("ow.lsp").setup,
},
{ import = "ow.plugins" },
}
---@type LazyConfig
local opts = {
install = {
@@ -69,4 +60,4 @@ local opts = {
},
}
require("lazy").setup(plugins, opts)
require("lazy").setup("ow.plugins", opts)