mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 18:59:00 +02:00
refactor: use LazyVim.opts
This commit is contained in:
parent
58cf6f971b
commit
76f9dbb40c
3 changed files with 3 additions and 7 deletions
|
@ -6,8 +6,7 @@ return {
|
|||
"echasnovski/mini.surround",
|
||||
keys = function(_, keys)
|
||||
-- Populate the keys based on the user's options
|
||||
local plugin = require("lazy.core.config").spec.plugins["mini.surround"]
|
||||
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
|
||||
local opts = LazyVim.opts("mini.surround")
|
||||
local mappings = {
|
||||
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
|
||||
{ opts.mappings.delete, desc = "Delete Surrounding" },
|
||||
|
|
|
@ -54,9 +54,7 @@ return {
|
|||
priority = 100,
|
||||
primary = true,
|
||||
format = function(buf)
|
||||
local plugin = require("lazy.core.config").plugins["conform.nvim"]
|
||||
local Plugin = require("lazy.core.plugin")
|
||||
local opts = Plugin.values(plugin, "opts", false)
|
||||
local opts = LazyVim.opts("conform.nvim")
|
||||
require("conform").format(LazyVim.merge({}, opts.format, { bufnr = buf }))
|
||||
end,
|
||||
sources = function(buf)
|
||||
|
|
|
@ -106,8 +106,7 @@ return {
|
|||
---@param opts PluginLspOpts
|
||||
config = function(_, opts)
|
||||
if LazyVim.has("neoconf.nvim") then
|
||||
local plugin = require("lazy.core.config").spec.plugins["neoconf.nvim"]
|
||||
require("neoconf").setup(require("lazy.core.plugin").values(plugin, "opts", false))
|
||||
require("neoconf").setup(LazyVim.opts("neoconf.nvim"))
|
||||
end
|
||||
|
||||
-- setup autoformat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue