dev: clean up breadcrumbs module

potentially avoid unwanted plugin loads
This commit is contained in:
raf 2023-08-10 19:35:45 +03:00
parent 2ce28cbb85
commit a9430961e8
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29

View file

@ -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
},
}
''}
'';
};
}