mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat(lsp): allow overriding options for vim.lsp.buf.format. Fixes #51
This commit is contained in:
parent
688436c9af
commit
40d363cf3f
3 changed files with 20 additions and 2 deletions
|
@ -20,6 +20,16 @@ function M.has(plugin)
|
|||
return require("lazy.core.config").plugins[plugin] ~= nil
|
||||
end
|
||||
|
||||
---@param name string
|
||||
function M.opts(name)
|
||||
local plugin = require("lazy.core.config").plugins[name]
|
||||
if not plugin then
|
||||
return {}
|
||||
end
|
||||
local Plugin = require("lazy.core.plugin")
|
||||
return Plugin.values(plugin, "opts", false)
|
||||
end
|
||||
|
||||
-- returns the root directory based on:
|
||||
-- * lsp workspace folders
|
||||
-- * lsp root_dir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue