mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
dev: clean up breadcrumbs module
potentially avoid unwanted plugin loads
This commit is contained in:
parent
2ce28cbb85
commit
a9430961e8
1 changed files with 137 additions and 131 deletions
|
@ -18,24 +18,29 @@ in {
|
|||
[
|
||||
"nvim-lspconfig"
|
||||
]
|
||||
++ lib.optionals (cfg.source == "nvim-navic") [
|
||||
"nvim-navic"
|
||||
]
|
||||
++ lib.optionals (config.vim.lsp.lspsaga.enable && cfg.source == "lspsaga") [
|
||||
"lspsaga"
|
||||
]
|
||||
++ lib.optionals (cfg.navbuddy.enable || cfg.source == "nvim-navic") [
|
||||
++ lib.optionals cfg.navbuddy.enable [
|
||||
"nvim-navbuddy"
|
||||
"nvim-navic"
|
||||
"nui-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.breadcrumbs = nvim.dag.entryAfter ["lspconfig"] ''
|
||||
local navbuddy = require("nvim-navbuddy")
|
||||
local navic = require("nvim-navic")
|
||||
local actions = require("nvim-navbuddy.actions")
|
||||
|
||||
${lib.optionalString (cfg.source == "nvim-navic") ''
|
||||
local navic = require("nvim-navic")
|
||||
require("nvim-navic").setup {
|
||||
highlight = true
|
||||
}
|
||||
''}
|
||||
|
||||
-- TODO: wrap this in an optional string with navbuddy as the enable condition
|
||||
${lib.optionalString cfg.navbuddy.enable ''
|
||||
local navbuddy = require("nvim-navbuddy")
|
||||
local actions = require("nvim-navbuddy.actions")
|
||||
navbuddy.setup {
|
||||
window = {
|
||||
border = "${nb.window.border}", -- "rounded", "double", "solid", "none"
|
||||
|
@ -158,6 +163,7 @@ in {
|
|||
["${cfg.navbuddy.mappings.help}"] = actions.help(), -- Open mappings help window
|
||||
},
|
||||
}
|
||||
''}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue