mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +02:00
perf(util): split lazyvim.util in smaller separate modules
This commit is contained in:
parent
5f5acb5b88
commit
c8c929c9fd
20 changed files with 442 additions and 283 deletions
|
@ -66,7 +66,7 @@ end
|
|||
---@param method string
|
||||
function M.has(buffer, method)
|
||||
method = method:find("/") and method or "textDocument/" .. method
|
||||
local clients = require("lazyvim.util").get_clients({ bufnr = buffer })
|
||||
local clients = require("lazyvim.util").lsp.get_clients({ bufnr = buffer })
|
||||
for _, client in ipairs(clients) do
|
||||
if client.supports_method(method) then
|
||||
return true
|
||||
|
@ -83,7 +83,7 @@ function M.resolve(buffer)
|
|||
end
|
||||
local spec = M.get()
|
||||
local opts = require("lazyvim.util").opts("nvim-lspconfig")
|
||||
local clients = require("lazyvim.util").get_clients({ bufnr = buffer })
|
||||
local clients = require("lazyvim.util").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