mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
dev: improve nvim-navic and navbuddy loading logic
This commit is contained in:
parent
cd54a8f890
commit
f01d6c2949
2 changed files with 7 additions and 6 deletions
|
@ -49,16 +49,17 @@ in {
|
||||||
lualine_z = ${cfg.inactiveSection.z},
|
lualine_z = ${cfg.inactiveSection.z},
|
||||||
},
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
|
|
||||||
|
${optionalString (config.vim.ui.breadcrumbs.source == "nvim-navic") ''
|
||||||
winbar = {
|
winbar = {
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
"navic",
|
"navic",
|
||||||
color_correction = nil,
|
|
||||||
navic_opts = nil,
|
|
||||||
draw_empty = ${toString config.vim.ui.breadcrumbs.alwaysRender}
|
draw_empty = ${toString config.vim.ui.breadcrumbs.alwaysRender}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
''}
|
||||||
extensions = {${
|
extensions = {${
|
||||||
if (config.vim.filetree.nvimTreeLua.enable)
|
if (config.vim.filetree.nvimTreeLua.enable)
|
||||||
then "\"nvim-tree\""
|
then "\"nvim-tree\""
|
||||||
|
|
|
@ -8,10 +8,10 @@ in {
|
||||||
options.vim.ui.breadcrumbs = {
|
options.vim.ui.breadcrumbs = {
|
||||||
enable = lib.mkEnableOption "breadcrumbs";
|
enable = lib.mkEnableOption "breadcrumbs";
|
||||||
source = mkOption {
|
source = mkOption {
|
||||||
type = types.enum ["nvim-navic"]; # TODO: lspsaga and dropbar
|
type = with types; nullOr (enum ["nvim-navic"]); # TODO: lspsaga and dropbar
|
||||||
default = "nvim-navic";
|
default = "nvim-navic";
|
||||||
description = ''
|
description = ''
|
||||||
The source to be used for breadcrumbs component
|
The source to be used for breadcrumbs component. Null means no breadcrumbs.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,13 +24,13 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
navbuddy = {
|
navbuddy = {
|
||||||
enable = mkEnableOption "navbuddy LSP UI";
|
enable = mkEnableOption "navbuddy LSP helper UI. Enabling this option automatically loads and enables nvim-navic";
|
||||||
|
|
||||||
# this option is interpreted as null if mkEnableOption is used, and therefore cannot be converted to a string in config.nix
|
# this option is interpreted as null if mkEnableOption is used, and therefore cannot be converted to a string in config.nix
|
||||||
useDefaultMappings = mkOption {
|
useDefaultMappings = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "default Navbuddy keybindings (disables user-specified keybinds)";
|
description = "use default Navbuddy keybindings (disables user-specified keybinds)";
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings = {
|
mappings = {
|
||||||
|
|
Loading…
Reference in a new issue