nvim: Improve lazy-loading of select plugins
Aerial (on command), test-runners (on python only) and other plugins are now only loaded when actually required.
This commit is contained in:
parent
643deaebec
commit
8b603b8c66
7 changed files with 70 additions and 23 deletions
|
|
@ -8,7 +8,20 @@ return {
|
|||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
cmd = {
|
||||
"AerialToggle",
|
||||
"AerialOpen",
|
||||
"AerialOpenAll",
|
||||
"AerialClose",
|
||||
"AerialCloseAll",
|
||||
"AerialNext",
|
||||
"AerialPrev",
|
||||
"AerialGo",
|
||||
"AerialInfo",
|
||||
"AerialNavToggle",
|
||||
"AerialNavOpen",
|
||||
"AerialNavClose",
|
||||
},
|
||||
opts = {
|
||||
backends = { "treesitter", "lsp", "markdown", "man" },
|
||||
},
|
||||
|
|
@ -103,7 +116,7 @@ return {
|
|||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
-- with coverage requires coverage.py and pytest-cov installed
|
||||
-- with coverage requires coverage.py and pytest-cov installed
|
||||
args = { "--cov" },
|
||||
}),
|
||||
},
|
||||
|
|
@ -113,6 +126,7 @@ return {
|
|||
wk.register({ ["<localleader>t"] = { name = "+test" } })
|
||||
end
|
||||
end,
|
||||
ft = { "python" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>st",
|
||||
|
|
@ -179,9 +193,10 @@ return {
|
|||
},
|
||||
config = function()
|
||||
require("coverage").setup({
|
||||
lang = { python = { coverage_command = "poetry run coverage json -q -o -" } } ,
|
||||
lang = { python = { coverage_command = "poetry run coverage json -q -o -" } },
|
||||
})
|
||||
end,
|
||||
ft = { "python" },
|
||||
cmd = {
|
||||
"Coverage",
|
||||
"CoverageLoad",
|
||||
|
|
@ -211,6 +226,6 @@ return {
|
|||
desc = "show coverage summary",
|
||||
silent = true,
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue