merge main into breadcrumbs

This commit is contained in:
raf 2023-07-28 16:00:40 +03:00
commit d96d885fdd
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
20 changed files with 205 additions and 63 deletions

View 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";
};
};
}

View file

@ -0,0 +1,5 @@
_: {
imports = [
./borders.nix
];
}

View file

@ -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 = {

View file

@ -7,5 +7,6 @@ _: {
./colorizer
./illuminate
./breadcrumbs
./borders
];
}

View file

@ -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 = {