mirror of
https://github.com/marianozunino/nvim.git
synced 2025-06-28 18:43:50 -03:00
chore: move plugins to an upper level
This commit is contained in:
parent
9569774c7b
commit
99bcb4ca97
50 changed files with 69 additions and 69 deletions
|
@ -23,7 +23,7 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "config.plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
return {
|
|
||||||
"bbjornstad/pretty-fold.nvim",
|
|
||||||
enabled = true,
|
|
||||||
config = function()
|
|
||||||
local global_setup = {
|
|
||||||
sections = {
|
|
||||||
left = { "content" },
|
|
||||||
right = {
|
|
||||||
" ",
|
|
||||||
function()
|
|
||||||
return ("[%dL]"):format(vim.v.foldend - vim.v.foldstart)
|
|
||||||
end,
|
|
||||||
"[",
|
|
||||||
"percentage",
|
|
||||||
"]",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
matchup_patterns = {
|
|
||||||
{ "{", "}" },
|
|
||||||
{ "%(", ")" }, -- % to escape lua pattern char
|
|
||||||
{ "%[", "]" }, -- % to escape lua pattern char
|
|
||||||
},
|
|
||||||
-- add_close_pattern = true,
|
|
||||||
process_comment_signs = ({ "delete", "spaces", false })[2],
|
|
||||||
}
|
|
||||||
|
|
||||||
local function ft_setup(lang, options) -- {{{
|
|
||||||
local opts = vim.tbl_deep_extend("force", global_setup, options)
|
|
||||||
-- combine global and ft specific matchup_patterns
|
|
||||||
if opts and opts.matchup_patterns and global_setup.matchup_patterns then
|
|
||||||
opts.matchup_patterns = vim.list_extend(opts.matchup_patterns, global_setup.matchup_patterns)
|
|
||||||
end
|
|
||||||
require("pretty-fold").ft_setup(lang, opts)
|
|
||||||
end -- }}}
|
|
||||||
|
|
||||||
require("pretty-fold").setup(global_setup)
|
|
||||||
|
|
||||||
ft_setup("lua", { -- {{{
|
|
||||||
matchup_patterns = {
|
|
||||||
{ "^%s*do$", "end" }, -- do ... end blocks
|
|
||||||
{ "^%s*if", "end" }, -- if ... end
|
|
||||||
{ "^%s*for", "end" }, -- for
|
|
||||||
{ "function[^%(]*%(", "end" }, -- 'function( or 'function (''
|
|
||||||
},
|
|
||||||
}) -- }}}
|
|
||||||
|
|
||||||
ft_setup("vim", { -- {{{
|
|
||||||
matchup_patterns = {
|
|
||||||
{ "^%s*function!?[^%(]*%(", "endfunction" },
|
|
||||||
},
|
|
||||||
}) -- }}}
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
local M = {
|
|
||||||
require("config.plugins.ui.colors"),
|
|
||||||
require("config.plugins.ui.alpha"),
|
|
||||||
require("config.plugins.ui.dressing"),
|
|
||||||
require("config.plugins.ui.whichkey"),
|
|
||||||
require("config.plugins.ui.noice"),
|
|
||||||
require("config.plugins.ui.scroll"),
|
|
||||||
require("config.plugins.ui.status"),
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
53
lua/plugins/fold.lua
Normal file
53
lua/plugins/fold.lua
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
local M = {
|
||||||
|
"bbjornstad/pretty-fold.nvim",
|
||||||
|
}
|
||||||
|
|
||||||
|
M.config = function()
|
||||||
|
local global_setup = {
|
||||||
|
sections = {
|
||||||
|
left = { "content" },
|
||||||
|
right = {
|
||||||
|
" ",
|
||||||
|
function()
|
||||||
|
return ("[%dL]"):format(vim.v.foldend - vim.v.foldstart)
|
||||||
|
end,
|
||||||
|
"[",
|
||||||
|
"percentage",
|
||||||
|
"]",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
matchup_patterns = {
|
||||||
|
{ "{", "}" },
|
||||||
|
{ "%(", ")" },
|
||||||
|
{ "%[", "]" },
|
||||||
|
},
|
||||||
|
process_comment_signs = ({ "delete", "spaces", false })[2],
|
||||||
|
}
|
||||||
|
|
||||||
|
local function ft_setup(lang, options) -- {{{
|
||||||
|
local opts = vim.tbl_deep_extend("force", global_setup, options)
|
||||||
|
if opts and opts.matchup_patterns and global_setup.matchup_patterns then
|
||||||
|
opts.matchup_patterns = vim.list_extend(opts.matchup_patterns, global_setup.matchup_patterns)
|
||||||
|
end
|
||||||
|
require("pretty-fold").ft_setup(lang, opts)
|
||||||
|
end -- }}}
|
||||||
|
|
||||||
|
require("pretty-fold").setup(global_setup)
|
||||||
|
|
||||||
|
ft_setup("lua", {
|
||||||
|
matchup_patterns = {
|
||||||
|
{ "^%s*do$", "end" },
|
||||||
|
{ "^%s*if", "end" },
|
||||||
|
{ "^%s*for", "end" },
|
||||||
|
{ "function[^%(]*%(", "end" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
ft_setup("vim", {
|
||||||
|
matchup_patterns = {
|
||||||
|
{ "^%s*function!?[^%(]*%(", "endfunction" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -4,9 +4,9 @@ local M = {
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
require("config.plugins.lsp.extras.lazydev"),
|
require("plugins.lsp.extras.lazydev"),
|
||||||
require("config.plugins.lsp.extras.gopher"),
|
require("plugins.lsp.extras.gopher"),
|
||||||
require("config.plugins.lsp.extras.typescript"),
|
require("plugins.lsp.extras.typescript"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ function M.config()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Try to load server-specific configuration
|
-- Try to load server-specific configuration
|
||||||
local ok, server_opts = pcall(require, "config.plugins.lsp.servers." .. server_name)
|
local ok, server_opts = pcall(require, "plugins.lsp.servers." .. server_name)
|
||||||
if ok then
|
if ok then
|
||||||
base_opts = vim.tbl_deep_extend("force", base_opts, server_opts)
|
base_opts = vim.tbl_deep_extend("force", base_opts, server_opts)
|
||||||
end
|
end
|
11
lua/plugins/ui/init.lua
Normal file
11
lua/plugins/ui/init.lua
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
local M = {
|
||||||
|
require("plugins.ui.colors"),
|
||||||
|
require("plugins.ui.alpha"),
|
||||||
|
require("plugins.ui.dressing"),
|
||||||
|
require("plugins.ui.whichkey"),
|
||||||
|
require("plugins.ui.noice"),
|
||||||
|
require("plugins.ui.scroll"),
|
||||||
|
require("plugins.ui.status"),
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
Loading…
Add table
Add a link
Reference in a new issue