mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat: use LazyVim everywhere instead of require("lazyvim.util")
This commit is contained in:
parent
3a87c08cda
commit
7a5dbeae75
41 changed files with 188 additions and 229 deletions
|
@ -41,7 +41,7 @@ function M.get()
|
|||
has = "codeAction",
|
||||
}
|
||||
}
|
||||
if require("lazyvim.util").has("inc-rename.nvim") then
|
||||
if LazyVim.has("inc-rename.nvim") then
|
||||
M._keys[#M._keys + 1] = {
|
||||
"<leader>cr",
|
||||
function()
|
||||
|
@ -61,7 +61,7 @@ end
|
|||
---@param method string
|
||||
function M.has(buffer, method)
|
||||
method = method:find("/") and method or "textDocument/" .. method
|
||||
local clients = require("lazyvim.util").lsp.get_clients({ bufnr = buffer })
|
||||
local clients = LazyVim.lsp.get_clients({ bufnr = buffer })
|
||||
for _, client in ipairs(clients) do
|
||||
if client.supports_method(method) then
|
||||
return true
|
||||
|
@ -77,8 +77,8 @@ function M.resolve(buffer)
|
|||
return {}
|
||||
end
|
||||
local spec = M.get()
|
||||
local opts = require("lazyvim.util").opts("nvim-lspconfig")
|
||||
local clients = require("lazyvim.util").lsp.get_clients({ bufnr = buffer })
|
||||
local opts = LazyVim.opts("nvim-lspconfig")
|
||||
local clients = LazyVim.lsp.get_clients({ bufnr = buffer })
|
||||
for _, client in ipairs(clients) do
|
||||
local maps = opts.servers[client.name] and opts.servers[client.name].keys or {}
|
||||
vim.list_extend(spec, maps)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue