mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-29 14:28:18 +02:00
refactor: use more flexible paths (#1381)
This commit is contained in:
parent
38b0c3d860
commit
8eed75d67f
15 changed files with 216 additions and 153 deletions
|
@ -1,16 +1,6 @@
|
|||
local M = {}
|
||||
local Log = require "core.log"
|
||||
|
||||
function M.config()
|
||||
vim.lsp.protocol.CompletionItemKind = lvim.lsp.completion.item_kind
|
||||
|
||||
for _, sign in ipairs(lvim.lsp.diagnostics.signs.values) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = sign.name })
|
||||
end
|
||||
|
||||
require("lsp.handlers").setup()
|
||||
end
|
||||
|
||||
local function lsp_highlight_document(client)
|
||||
if lvim.lsp.document_highlight == false then
|
||||
return -- we don't need further
|
||||
|
@ -159,4 +149,29 @@ function M.setup(lang)
|
|||
end
|
||||
end
|
||||
|
||||
function M.global_setup()
|
||||
vim.lsp.protocol.CompletionItemKind = lvim.lsp.completion.item_kind
|
||||
|
||||
for _, sign in ipairs(lvim.lsp.diagnostics.signs.values) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = sign.name })
|
||||
end
|
||||
|
||||
require("lsp.handlers").setup()
|
||||
|
||||
local null_status_ok, null_ls = pcall(require, "null-ls")
|
||||
if null_status_ok then
|
||||
null_ls.config()
|
||||
require("lspconfig")["null-ls"].setup(lvim.lsp.null_ls.setup)
|
||||
end
|
||||
|
||||
local utils = require "utils"
|
||||
|
||||
local lsp_settings_status_ok, lsp_settings = pcall(require, "nlspsettings")
|
||||
if lsp_settings_status_ok then
|
||||
lsp_settings.setup {
|
||||
config_home = utils.join_paths(get_config_dir(), "lsp-settings"),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue