mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
merge main into breadcrumbs
This commit is contained in:
commit
d96d885fdd
20 changed files with 205 additions and 63 deletions
43
modules/ui/borders/borders.nix
Normal file
43
modules/ui/borders/borders.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption mkEnableOption types;
|
||||
|
||||
cfg = config.vim.ui.borders;
|
||||
|
||||
defaultStyles = ["none" "single" "double" "rounded"];
|
||||
in {
|
||||
options.vim.ui.borders = {
|
||||
enable = mkEnableOption "visible borders for most windows";
|
||||
|
||||
globalStyle = mkOption {
|
||||
type = types.enum defaultStyles;
|
||||
default = "rounded";
|
||||
description = ''
|
||||
global border style to use
|
||||
'';
|
||||
};
|
||||
|
||||
# TODO: make per-plugin borders configurable
|
||||
plugins = let
|
||||
mkPluginStyleOption = name: {
|
||||
enable = mkEnableOption "whether to enable borders for the ${name} plugin" // {default = cfg.enable;};
|
||||
|
||||
style = mkOption {
|
||||
type = types.enum (defaultStyles ++ lib.optionals (name != "which-key") ["shadow"]);
|
||||
default = cfg.globalStyle;
|
||||
description = "border style to use for the ${name} plugin";
|
||||
};
|
||||
};
|
||||
in {
|
||||
# despite not having it listed in example configuration, which-key does support the rounded type
|
||||
# additionall, it supports a "shadow" type that is similar to none but is of higher contrast
|
||||
which-key = mkPluginStyleOption "which-key";
|
||||
lspsaga = mkPluginStyleOption "lspsaga";
|
||||
nvim-cmp = mkPluginStyleOption "nvim-cmp";
|
||||
lsp-signature = mkPluginStyleOption "lsp-signature";
|
||||
};
|
||||
};
|
||||
}
|
5
modules/ui/borders/default.nix
Normal file
5
modules/ui/borders/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./borders.nix
|
||||
];
|
||||
}
|
|
@ -66,7 +66,7 @@ in {
|
|||
|
||||
lsp = {
|
||||
auto_attach = ${boolToString nb.lsp.autoAttach},
|
||||
preference = nil, -- TODO: convert list to lua table if not null
|
||||
-- preference = nil, -- TODO: convert list to lua table if not null
|
||||
},
|
||||
|
||||
source_buffer = {
|
||||
|
|
|
@ -7,5 +7,6 @@ _: {
|
|||
./colorizer
|
||||
./illuminate
|
||||
./breadcrumbs
|
||||
./borders
|
||||
];
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ in {
|
|||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
lsp_doc_border = ${boolToString (config.vim.ui.borders.enable)}, -- add a border to hover docs and signature help
|
||||
},
|
||||
|
||||
format = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue