mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-29 12:00:04 +02:00
plugins/virt-column: init
This commit is contained in:
parent
4395556669
commit
f876a0a2e9
3 changed files with 136 additions and 0 deletions
|
@ -109,6 +109,7 @@
|
||||||
./ui/image.nix
|
./ui/image.nix
|
||||||
./ui/noice.nix
|
./ui/noice.nix
|
||||||
./ui/transparent.nix
|
./ui/transparent.nix
|
||||||
|
./ui/virt-column.nix
|
||||||
|
|
||||||
./utils/alpha.nix
|
./utils/alpha.nix
|
||||||
./utils/auto-save.nix
|
./utils/auto-save.nix
|
||||||
|
|
88
plugins/ui/virt-column.nix
Normal file
88
plugins/ui/virt-column.nix
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
helpers,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
helpers.neovim-plugin.mkNeovimPlugin config
|
||||||
|
{
|
||||||
|
name = "virt-column";
|
||||||
|
originalName = "virt-column.nvim";
|
||||||
|
defaultPackage = pkgs.vimPlugins.virt-column-nvim;
|
||||||
|
|
||||||
|
maintainers = [helpers.maintainers.alisonjenkins];
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
Enables or disables virt-column.
|
||||||
|
'';
|
||||||
|
|
||||||
|
char = helpers.defaultNullOpts.mkNullable (with types; either str (listOf str)) ''["┃"]'' ''
|
||||||
|
Character, or list of characters, that get used to display the virtual column.
|
||||||
|
Each character has to have a display width of 0 or 1.
|
||||||
|
'';
|
||||||
|
|
||||||
|
virtcolumn = helpers.defaultNullOpts.mkStr "" ''
|
||||||
|
Comma-separated list of screen columns same syntax as `:help colorcolumn`.
|
||||||
|
'';
|
||||||
|
|
||||||
|
highlight = helpers.defaultNullOpts.mkNullable (with types; either str (listOf str)) "NonText" ''
|
||||||
|
Highlight group, or list of highlight groups, that get applied to the virtual column.
|
||||||
|
'';
|
||||||
|
|
||||||
|
exclude = {
|
||||||
|
filetypes =
|
||||||
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
''
|
||||||
|
[
|
||||||
|
"lspinfo"
|
||||||
|
"packer"
|
||||||
|
"checkhealth"
|
||||||
|
"help"
|
||||||
|
"man"
|
||||||
|
"TelescopePrompt"
|
||||||
|
"TelescopeResults"
|
||||||
|
]
|
||||||
|
''
|
||||||
|
"List of `filetype`s for which virt-column is disabled.";
|
||||||
|
|
||||||
|
buftypes =
|
||||||
|
helpers.defaultNullOpts.mkListOf types.str
|
||||||
|
''
|
||||||
|
[
|
||||||
|
"nofile"
|
||||||
|
"quickfix"
|
||||||
|
"terminal"
|
||||||
|
"prompt"
|
||||||
|
]
|
||||||
|
''
|
||||||
|
"List of `buftype`s for which virt-column is disabled.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
enabled = true;
|
||||||
|
char = "┃";
|
||||||
|
virtcolumn = "";
|
||||||
|
highlight = "NonText";
|
||||||
|
exclude = {
|
||||||
|
filetypes = [
|
||||||
|
"lspinfo"
|
||||||
|
"packer"
|
||||||
|
"checkhealth"
|
||||||
|
"help"
|
||||||
|
"man"
|
||||||
|
"TelescopePrompt"
|
||||||
|
"TelescopeResults"
|
||||||
|
];
|
||||||
|
buftypes = [
|
||||||
|
"nofile"
|
||||||
|
"quickfix"
|
||||||
|
"terminal"
|
||||||
|
"prompt"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
47
tests/test-sources/plugins/ui/virt-column.nix
Normal file
47
tests/test-sources/plugins/ui/virt-column.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.virt-column.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.virt-column = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
enabled = true;
|
||||||
|
char = "┃";
|
||||||
|
virtcolumn = "";
|
||||||
|
highlight = "NonText";
|
||||||
|
exclude = {
|
||||||
|
filetypes = [
|
||||||
|
"lspinfo"
|
||||||
|
"packer"
|
||||||
|
"checkhealth"
|
||||||
|
"help"
|
||||||
|
"man"
|
||||||
|
"TelescopePrompt"
|
||||||
|
"TelescopeResults"
|
||||||
|
];
|
||||||
|
buftypes = [
|
||||||
|
"nofile"
|
||||||
|
"quickfix"
|
||||||
|
"terminal"
|
||||||
|
"prompt"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins.virt-column = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
char = ["#" "!"];
|
||||||
|
virtcolumn = "80,90,100";
|
||||||
|
highlight = "NonText";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue