mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-14 11:14:36 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -6,25 +6,25 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "headlines";
|
||||
originalName = "headlines.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.headlines-nvim;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "headlines";
|
||||
originalName = "headlines.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.headlines-nvim;
|
||||
|
||||
maintainers = [maintainers.GaetanLepage];
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
settingsExample = {
|
||||
org.headline_highlights = false;
|
||||
norg = {
|
||||
headline_highlights = ["Headline"];
|
||||
codeblock_highlight = false;
|
||||
};
|
||||
markdown.headline_highlights = ["Headline1"];
|
||||
settingsExample = {
|
||||
org.headline_highlights = false;
|
||||
norg = {
|
||||
headline_highlights = [ "Headline" ];
|
||||
codeblock_highlight = false;
|
||||
};
|
||||
markdown.headline_highlights = [ "Headline1" ];
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings = optional (!config.plugins.treesitter.enable) ''
|
||||
Nixvim (plugins.headlines): headlines requires `plugins.treesitter` to be enabled with the relevant grammars installed.
|
||||
'';
|
||||
};
|
||||
}
|
||||
extraConfig = cfg: {
|
||||
warnings = optional (!config.plugins.treesitter.enable) ''
|
||||
Nixvim (plugins.headlines): headlines requires `plugins.treesitter` to be enabled with the relevant grammars installed.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,27 +5,34 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.image;
|
||||
in {
|
||||
meta.maintainers = [maintainers.GaetanLepage];
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
options.plugins.image =
|
||||
helpers.neovim-plugin.extraOptionsOptions
|
||||
// {
|
||||
enable = mkEnableOption "image.nvim";
|
||||
options.plugins.image = helpers.neovim-plugin.extraOptionsOptions // {
|
||||
enable = mkEnableOption "image.nvim";
|
||||
|
||||
package = helpers.mkPackageOption "image.nvim" pkgs.vimPlugins.image-nvim;
|
||||
package = helpers.mkPackageOption "image.nvim" pkgs.vimPlugins.image-nvim;
|
||||
|
||||
backend = helpers.defaultNullOpts.mkEnumFirstDefault ["kitty" "ueberzug"] ''
|
||||
All the backends support rendering inside Tmux.
|
||||
backend =
|
||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||
[
|
||||
"kitty"
|
||||
"ueberzug"
|
||||
]
|
||||
''
|
||||
All the backends support rendering inside Tmux.
|
||||
|
||||
- kitty - best in class, works great and is very snappy
|
||||
- ueberzug - backed by ueberzugpp, supports any terminal, but has lower performance
|
||||
- Supports multiple images thanks to @jstkdng.
|
||||
'';
|
||||
- kitty - best in class, works great and is very snappy
|
||||
- ueberzug - backed by ueberzugpp, supports any terminal, but has lower performance
|
||||
- Supports multiple images thanks to @jstkdng.
|
||||
'';
|
||||
|
||||
integrations = let
|
||||
integrations =
|
||||
let
|
||||
mkIntegrationOptions = integrationName: filetypesDefault: {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to enable the markdown integration.
|
||||
|
@ -48,91 +55,90 @@ in {
|
|||
'';
|
||||
};
|
||||
in
|
||||
mapAttrs mkIntegrationOptions {
|
||||
markdown = ''["markdown" "vimwiki"]'';
|
||||
neorg = ''["norg"]'';
|
||||
syslang = ''["syslang"]'';
|
||||
};
|
||||
mapAttrs mkIntegrationOptions {
|
||||
markdown = ''["markdown" "vimwiki"]'';
|
||||
neorg = ''["norg"]'';
|
||||
syslang = ''["syslang"]'';
|
||||
};
|
||||
|
||||
maxWidth = helpers.mkNullOrOption types.ints.unsigned "Image maximum width.";
|
||||
maxWidth = helpers.mkNullOrOption types.ints.unsigned "Image maximum width.";
|
||||
|
||||
maxHeight = helpers.mkNullOrOption types.ints.unsigned "Image maximum height.";
|
||||
maxHeight = helpers.mkNullOrOption types.ints.unsigned "Image maximum height.";
|
||||
|
||||
maxWidthWindowPercentage = helpers.mkNullOrOption types.ints.unsigned ''
|
||||
Image maximum width as a percentage of the window width.
|
||||
'';
|
||||
maxWidthWindowPercentage = helpers.mkNullOrOption types.ints.unsigned ''
|
||||
Image maximum width as a percentage of the window width.
|
||||
'';
|
||||
|
||||
maxHeightWindowPercentage = helpers.defaultNullOpts.mkUnsignedInt 50 ''
|
||||
Image maximum height as a percentage of the window height.
|
||||
'';
|
||||
maxHeightWindowPercentage = helpers.defaultNullOpts.mkUnsignedInt 50 ''
|
||||
Image maximum height as a percentage of the window height.
|
||||
'';
|
||||
|
||||
windowOverlapClearEnabled = helpers.defaultNullOpts.mkBool false ''
|
||||
Toggles images when windows are overlapped.
|
||||
'';
|
||||
windowOverlapClearEnabled = helpers.defaultNullOpts.mkBool false ''
|
||||
Toggles images when windows are overlapped.
|
||||
'';
|
||||
|
||||
windowOverlapClearFtIgnore =
|
||||
helpers.defaultNullOpts.mkListOf types.str ''["cmp_menu" "cmp_docs" ""]''
|
||||
windowOverlapClearFtIgnore =
|
||||
helpers.defaultNullOpts.mkListOf types.str ''["cmp_menu" "cmp_docs" ""]''
|
||||
''
|
||||
Toggles images when windows are overlapped.
|
||||
'';
|
||||
|
||||
editorOnlyRenderWhenFocused = helpers.defaultNullOpts.mkBool false ''
|
||||
Auto show/hide images when the editor gains/looses focus.
|
||||
'';
|
||||
editorOnlyRenderWhenFocused = helpers.defaultNullOpts.mkBool false ''
|
||||
Auto show/hide images when the editor gains/looses focus.
|
||||
'';
|
||||
|
||||
tmuxShowOnlyInActiveWindow = helpers.defaultNullOpts.mkBool false ''
|
||||
Auto show/hide images in the correct Tmux window (needs visual-activity off).
|
||||
'';
|
||||
tmuxShowOnlyInActiveWindow = helpers.defaultNullOpts.mkBool false ''
|
||||
Auto show/hide images in the correct Tmux window (needs visual-activity off).
|
||||
'';
|
||||
|
||||
hijackFilePatterns =
|
||||
helpers.defaultNullOpts.mkListOf types.str
|
||||
''["*.png" "*.jpg" "*.jpeg" "*.gif" "*.webp"]''
|
||||
hijackFilePatterns =
|
||||
helpers.defaultNullOpts.mkListOf types.str ''["*.png" "*.jpg" "*.jpeg" "*.gif" "*.webp"]''
|
||||
''
|
||||
Render image files as images when opened.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
extraLuaPackages = ps: [ps.magick];
|
||||
extraPlugins = [ cfg.package ];
|
||||
extraLuaPackages = ps: [ ps.magick ];
|
||||
|
||||
extraPackages =
|
||||
[
|
||||
# In theory, we could remove that if the user explicitly disables `downloadRemoteImages` for
|
||||
# all integrations but shipping `curl` is not too heavy.
|
||||
pkgs.curl
|
||||
]
|
||||
++ optional (cfg.backend == "ueberzug") pkgs.ueberzugpp;
|
||||
extraPackages = [
|
||||
# In theory, we could remove that if the user explicitly disables `downloadRemoteImages` for
|
||||
# all integrations but shipping `curl` is not too heavy.
|
||||
pkgs.curl
|
||||
] ++ optional (cfg.backend == "ueberzug") pkgs.ueberzugpp;
|
||||
|
||||
extraConfigLua = let
|
||||
setupOptions = with cfg;
|
||||
{
|
||||
inherit backend;
|
||||
integrations = let
|
||||
processIntegrationOptions = v: {
|
||||
inherit (v) enabled;
|
||||
clear_in_insert_mode = v.clearInInsertMode;
|
||||
download_remote_images = v.downloadRemoteImages;
|
||||
only_render_image_at_cursor = v.onlyRenderImageAtCursor;
|
||||
inherit (v) filetypes;
|
||||
};
|
||||
in
|
||||
mapAttrs
|
||||
(_: processIntegrationOptions)
|
||||
integrations;
|
||||
max_width = maxWidth;
|
||||
max_height = maxHeight;
|
||||
max_width_window_percentage = maxWidthWindowPercentage;
|
||||
max_height_window_percentage = maxHeightWindowPercentage;
|
||||
window_overlap_clear_enabled = windowOverlapClearEnabled;
|
||||
window_overlap_clear_ft_ignore = windowOverlapClearFtIgnore;
|
||||
editor_only_render_when_focused = editorOnlyRenderWhenFocused;
|
||||
tmux_show_only_in_active_window = tmuxShowOnlyInActiveWindow;
|
||||
hijack_file_patterns = hijackFilePatterns;
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in ''
|
||||
require('image').setup(${helpers.toLuaObject setupOptions})
|
||||
'';
|
||||
extraConfigLua =
|
||||
let
|
||||
setupOptions =
|
||||
with cfg;
|
||||
{
|
||||
inherit backend;
|
||||
integrations =
|
||||
let
|
||||
processIntegrationOptions = v: {
|
||||
inherit (v) enabled;
|
||||
clear_in_insert_mode = v.clearInInsertMode;
|
||||
download_remote_images = v.downloadRemoteImages;
|
||||
only_render_image_at_cursor = v.onlyRenderImageAtCursor;
|
||||
inherit (v) filetypes;
|
||||
};
|
||||
in
|
||||
mapAttrs (_: processIntegrationOptions) integrations;
|
||||
max_width = maxWidth;
|
||||
max_height = maxHeight;
|
||||
max_width_window_percentage = maxWidthWindowPercentage;
|
||||
max_height_window_percentage = maxHeightWindowPercentage;
|
||||
window_overlap_clear_enabled = windowOverlapClearEnabled;
|
||||
window_overlap_clear_ft_ignore = windowOverlapClearFtIgnore;
|
||||
editor_only_render_when_focused = editorOnlyRenderWhenFocused;
|
||||
tmux_show_only_in_active_window = tmuxShowOnlyInActiveWindow;
|
||||
hijack_file_patterns = hijackFilePatterns;
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
''
|
||||
require('image').setup(${helpers.toLuaObject setupOptions})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "neoscroll";
|
||||
originalName = "neoscroll.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.neoscroll-nvim;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "neoscroll";
|
||||
originalName = "neoscroll.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.neoscroll-nvim;
|
||||
|
||||
maintainers = [maintainers.GaetanLepage];
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
settingsOptions = {
|
||||
mappings =
|
||||
helpers.defaultNullOpts.mkListOf types.str
|
||||
settingsOptions = {
|
||||
mappings =
|
||||
helpers.defaultNullOpts.mkListOf types.str
|
||||
''
|
||||
[
|
||||
"<C-u>"
|
||||
|
@ -37,65 +37,65 @@ with lib;
|
|||
```
|
||||
'';
|
||||
|
||||
hide_cursor = helpers.defaultNullOpts.mkBool true ''
|
||||
If 'termguicolors' is set, hide the cursor while scrolling.
|
||||
'';
|
||||
hide_cursor = helpers.defaultNullOpts.mkBool true ''
|
||||
If 'termguicolors' is set, hide the cursor while scrolling.
|
||||
'';
|
||||
|
||||
step_eof = helpers.defaultNullOpts.mkBool true ''
|
||||
When `move_cursor` is `true` scrolling downwards will stop when the bottom line of the
|
||||
window is the last line of the file.
|
||||
'';
|
||||
step_eof = helpers.defaultNullOpts.mkBool true ''
|
||||
When `move_cursor` is `true` scrolling downwards will stop when the bottom line of the
|
||||
window is the last line of the file.
|
||||
'';
|
||||
|
||||
respect_scrolloff = helpers.defaultNullOpts.mkBool false ''
|
||||
The cursor stops at the scrolloff margin.
|
||||
Try combining this option with either `stop_eof` or `cursor_scrolls_alone` (or both).
|
||||
'';
|
||||
respect_scrolloff = helpers.defaultNullOpts.mkBool false ''
|
||||
The cursor stops at the scrolloff margin.
|
||||
Try combining this option with either `stop_eof` or `cursor_scrolls_alone` (or both).
|
||||
'';
|
||||
|
||||
cursor_scrolls_alone = helpers.defaultNullOpts.mkBool true ''
|
||||
The cursor will keep on scrolling even if the window cannot scroll further.
|
||||
'';
|
||||
cursor_scrolls_alone = helpers.defaultNullOpts.mkBool true ''
|
||||
The cursor will keep on scrolling even if the window cannot scroll further.
|
||||
'';
|
||||
|
||||
easing_function = helpers.mkNullOrStr ''
|
||||
Name of the easing function to use by default in all scrolling animamtions.
|
||||
`scroll()` that don't provide the optional `easing` argument will use this easing
|
||||
function.
|
||||
If set to `null` (the default) no easing function will be used in the scrolling animation
|
||||
(constant scrolling speed).
|
||||
'';
|
||||
easing_function = helpers.mkNullOrStr ''
|
||||
Name of the easing function to use by default in all scrolling animamtions.
|
||||
`scroll()` that don't provide the optional `easing` argument will use this easing
|
||||
function.
|
||||
If set to `null` (the default) no easing function will be used in the scrolling animation
|
||||
(constant scrolling speed).
|
||||
'';
|
||||
|
||||
pre_hook = helpers.mkNullOrLuaFn ''
|
||||
Function to run before the scrolling animation starts.
|
||||
The function will be called with the `info` parameter which can be optionally passed to
|
||||
`scroll()` (or any of the provided wrappers).
|
||||
This can be used to conditionally run different hooks for different types of scrolling
|
||||
animations.
|
||||
'';
|
||||
pre_hook = helpers.mkNullOrLuaFn ''
|
||||
Function to run before the scrolling animation starts.
|
||||
The function will be called with the `info` parameter which can be optionally passed to
|
||||
`scroll()` (or any of the provided wrappers).
|
||||
This can be used to conditionally run different hooks for different types of scrolling
|
||||
animations.
|
||||
'';
|
||||
|
||||
post_hook = helpers.mkNullOrLuaFn ''
|
||||
Equivalent to `pre_hook` but the function will run after the scrolling animation ends.
|
||||
'';
|
||||
post_hook = helpers.mkNullOrLuaFn ''
|
||||
Equivalent to `pre_hook` but the function will run after the scrolling animation ends.
|
||||
'';
|
||||
|
||||
performance_mode = helpers.defaultNullOpts.mkBool false ''
|
||||
Option to enable "Performance Mode" on all buffers.
|
||||
'';
|
||||
};
|
||||
performance_mode = helpers.defaultNullOpts.mkBool false ''
|
||||
Option to enable "Performance Mode" on all buffers.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
mappings = [
|
||||
"<C-u>"
|
||||
"<C-d>"
|
||||
"<C-b>"
|
||||
"<C-f>"
|
||||
"<C-y>"
|
||||
"<C-e>"
|
||||
"zt"
|
||||
"zz"
|
||||
"zb"
|
||||
];
|
||||
hide_cursor = true;
|
||||
stop_eof = true;
|
||||
respect_scrolloff = false;
|
||||
cursor_scrolls_alone = true;
|
||||
easing_function = "quadratic";
|
||||
};
|
||||
}
|
||||
settingsExample = {
|
||||
mappings = [
|
||||
"<C-u>"
|
||||
"<C-d>"
|
||||
"<C-b>"
|
||||
"<C-f>"
|
||||
"<C-y>"
|
||||
"<C-e>"
|
||||
"zt"
|
||||
"zz"
|
||||
"zb"
|
||||
];
|
||||
hide_cursor = true;
|
||||
stop_eof = true;
|
||||
respect_scrolloff = false;
|
||||
cursor_scrolls_alone = true;
|
||||
easing_function = "quadratic";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,24 +8,24 @@
|
|||
# TODO: This uses a lot of types.anything because noice.nvim types are quite complex.
|
||||
# It should be possible to map them to nix, but they would not map really well through
|
||||
# toLuaObject, we would maybe need some ad-hoc pre-processing functions.
|
||||
with lib; {
|
||||
options.plugins.noice =
|
||||
helpers.neovim-plugin.extraOptionsOptions
|
||||
// {
|
||||
enable = mkEnableOption ''
|
||||
noice.nvim, an experimental nvim UI.
|
||||
Note that if treesitter is enabled you need the following parsers:
|
||||
vim, regex, lua, bash, markdown, markdown_inline
|
||||
'';
|
||||
with lib;
|
||||
{
|
||||
options.plugins.noice = helpers.neovim-plugin.extraOptionsOptions // {
|
||||
enable = mkEnableOption ''
|
||||
noice.nvim, an experimental nvim UI.
|
||||
Note that if treesitter is enabled you need the following parsers:
|
||||
vim, regex, lua, bash, markdown, markdown_inline
|
||||
'';
|
||||
|
||||
package = helpers.mkPackageOption "noice" pkgs.vimPlugins.noice-nvim;
|
||||
package = helpers.mkPackageOption "noice" pkgs.vimPlugins.noice-nvim;
|
||||
|
||||
cmdline = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enables Noice cmdline UI";
|
||||
view = helpers.defaultNullOpts.mkStr "cmdline_popup" "";
|
||||
opts = helpers.defaultNullOpts.mkNullable types.anything "{}" "";
|
||||
format =
|
||||
helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) ''
|
||||
cmdline = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enables Noice cmdline UI";
|
||||
view = helpers.defaultNullOpts.mkStr "cmdline_popup" "";
|
||||
opts = helpers.defaultNullOpts.mkNullable types.anything "{}" "";
|
||||
format =
|
||||
helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything)
|
||||
''
|
||||
{
|
||||
cmdline = {pattern = "^:"; icon = ""; lang = "vim";};
|
||||
search_down = {kind = "search"; pattern = "^/"; icon = " "; lang = "regex";};
|
||||
|
@ -35,7 +35,8 @@ with lib; {
|
|||
help = {pattern = "^:%s*he?l?p?%s+"; icon = "";};
|
||||
input = {};
|
||||
}
|
||||
'' ''
|
||||
''
|
||||
''
|
||||
conceal: (default=true) This will hide the text in the cmdline that matches the pattern.
|
||||
view: (default is cmdline view)
|
||||
opts: any options passed to the view
|
||||
|
@ -43,211 +44,206 @@ with lib; {
|
|||
title: set to anything or empty string to hide
|
||||
lua = false, to disable a format, set to `false`
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
messages = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Enables the messages UI.
|
||||
NOTE: If you enable messages, then the cmdline is enabled automatically.
|
||||
'';
|
||||
view = helpers.defaultNullOpts.mkStr "notify" "default view for messages";
|
||||
viewError = helpers.defaultNullOpts.mkStr "notify" "default view for errors";
|
||||
viewWarn = helpers.defaultNullOpts.mkStr "notify" "default view for warnings";
|
||||
viewHistory = helpers.defaultNullOpts.mkStr "messages" "view for :messages";
|
||||
viewSearch = helpers.defaultNullOpts.mkStr "virtualtext" "view for search count messages";
|
||||
};
|
||||
messages = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Enables the messages UI.
|
||||
NOTE: If you enable messages, then the cmdline is enabled automatically.
|
||||
'';
|
||||
view = helpers.defaultNullOpts.mkStr "notify" "default view for messages";
|
||||
viewError = helpers.defaultNullOpts.mkStr "notify" "default view for errors";
|
||||
viewWarn = helpers.defaultNullOpts.mkStr "notify" "default view for warnings";
|
||||
viewHistory = helpers.defaultNullOpts.mkStr "messages" "view for :messages";
|
||||
viewSearch = helpers.defaultNullOpts.mkStr "virtualtext" "view for search count messages";
|
||||
};
|
||||
|
||||
popupmenu = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enables the Noice popupmenu UI";
|
||||
backend = helpers.defaultNullOpts.mkEnumFirstDefault ["nui" "cmp"] "";
|
||||
kindIcons =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(types.either types.bool (types.attrsOf types.anything)) "{}"
|
||||
"Icons for completion item kinds. set to `false` to disable icons";
|
||||
};
|
||||
popupmenu = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enables the Noice popupmenu UI";
|
||||
backend = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||
"nui"
|
||||
"cmp"
|
||||
] "";
|
||||
kindIcons = helpers.defaultNullOpts.mkNullable (types.either types.bool (
|
||||
types.attrsOf types.anything
|
||||
)) "{}" "Icons for completion item kinds. set to `false` to disable icons";
|
||||
};
|
||||
|
||||
redirect = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) ''
|
||||
{
|
||||
redirect = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) ''
|
||||
{
|
||||
view = "popup";
|
||||
filter = {event = "msg_show";};
|
||||
}
|
||||
'' "default options for require('noice').redirect";
|
||||
|
||||
commands = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) ''
|
||||
{
|
||||
history = {
|
||||
view = "split";
|
||||
opts = {enter = true; format = "details";};
|
||||
filter = {
|
||||
any = [
|
||||
{event = "notify";}
|
||||
{error = true;}
|
||||
{warning = true;}
|
||||
{event = "msg_show"; kind = [""];}
|
||||
{event = "lsp"; kind = "message";}
|
||||
];
|
||||
};
|
||||
};
|
||||
last = {
|
||||
view = "popup";
|
||||
filter = {event = "msg_show";};
|
||||
}
|
||||
'' "default options for require('noice').redirect";
|
||||
|
||||
commands = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) ''
|
||||
{
|
||||
history = {
|
||||
view = "split";
|
||||
opts = {enter = true; format = "details";};
|
||||
filter = {
|
||||
any = [
|
||||
{event = "notify";}
|
||||
{error = true;}
|
||||
{warning = true;}
|
||||
{event = "msg_show"; kind = [""];}
|
||||
{event = "lsp"; kind = "message";}
|
||||
];
|
||||
};
|
||||
opts = {enter = true; format = "details";};
|
||||
filter = {
|
||||
any = [
|
||||
{event = "notify";}
|
||||
{error = true;}
|
||||
{warning = true;}
|
||||
{event = "msg_show"; kind = [""];}
|
||||
{event = "lsp"; kind = "message";}
|
||||
];
|
||||
};
|
||||
last = {
|
||||
view = "popup";
|
||||
opts = {enter = true; format = "details";};
|
||||
filter = {
|
||||
any = [
|
||||
{event = "notify";}
|
||||
{error = true;}
|
||||
{warning = true;}
|
||||
{event = "msg_show"; kind = [""];}
|
||||
{event = "lsp"; kind = "message";}
|
||||
];
|
||||
};
|
||||
filter_opts = {count = 1;};
|
||||
};
|
||||
errors = {
|
||||
view = "popup";
|
||||
opts = {enter = true; format = "details";};
|
||||
filter = {error = true;};
|
||||
filter_opts = {reverse = true;};
|
||||
};
|
||||
}
|
||||
'' "You can add any custom commands that will be available with `:Noice command`";
|
||||
filter_opts = {count = 1;};
|
||||
};
|
||||
errors = {
|
||||
view = "popup";
|
||||
opts = {enter = true; format = "details";};
|
||||
filter = {error = true;};
|
||||
filter_opts = {reverse = true;};
|
||||
};
|
||||
}
|
||||
'' "You can add any custom commands that will be available with `:Noice command`";
|
||||
|
||||
notify = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Enable notification handling.
|
||||
notify = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Enable notification handling.
|
||||
|
||||
Noice can be used as `vim.notify` so you can route any notification like other messages.
|
||||
Notification messages have their level and other properties set.
|
||||
event is always "notify" and kind can be any log level as a string.
|
||||
The default routes will forward notifications to nvim-notify.
|
||||
Benefit of using Noice for this is the routing and consistent history view.
|
||||
'';
|
||||
view = helpers.defaultNullOpts.mkStr "notify" "";
|
||||
};
|
||||
Noice can be used as `vim.notify` so you can route any notification like other messages.
|
||||
Notification messages have their level and other properties set.
|
||||
event is always "notify" and kind can be any log level as a string.
|
||||
The default routes will forward notifications to nvim-notify.
|
||||
Benefit of using Noice for this is the routing and consistent history view.
|
||||
'';
|
||||
view = helpers.defaultNullOpts.mkStr "notify" "";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
progress = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable LSP progress";
|
||||
lsp = {
|
||||
progress = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable LSP progress";
|
||||
|
||||
format =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(types.either types.str types.anything) ''"lsp_progress"'' ''
|
||||
format =
|
||||
helpers.defaultNullOpts.mkNullable (types.either types.str types.anything) ''"lsp_progress"''
|
||||
''
|
||||
Lsp Progress is formatted using the builtins for lsp_progress
|
||||
'';
|
||||
formatDone =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(types.either types.str types.anything) ''"lsp_progress"'' "";
|
||||
formatDone =
|
||||
helpers.defaultNullOpts.mkNullable (types.either types.str types.anything) ''"lsp_progress"''
|
||||
"";
|
||||
|
||||
throttle =
|
||||
helpers.defaultNullOpts.mkNum "1000 / 30"
|
||||
"frequency to update lsp progress message";
|
||||
throttle = helpers.defaultNullOpts.mkNum "1000 / 30" "frequency to update lsp progress message";
|
||||
|
||||
view = helpers.defaultNullOpts.mkStr "mini" "";
|
||||
view = helpers.defaultNullOpts.mkStr "mini" "";
|
||||
};
|
||||
|
||||
override = helpers.defaultNullOpts.mkNullable (types.attrsOf types.bool) ''
|
||||
{
|
||||
"vim.lsp.util.convert_input_to_markdown_lines" = false;
|
||||
"vim.lsp.util.stylize_markdown" = false;
|
||||
"cmp.entry.get_documentation" = false;
|
||||
}
|
||||
'' "";
|
||||
|
||||
hover = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable hover UI";
|
||||
view =
|
||||
helpers.defaultNullOpts.mkNullable types.str "null"
|
||||
"when null, use defaults from documentation";
|
||||
opts =
|
||||
helpers.defaultNullOpts.mkNullable types.anything "{}"
|
||||
"merged with defaults from documentation";
|
||||
};
|
||||
|
||||
signature = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable signature UI";
|
||||
|
||||
autoOpen = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "";
|
||||
trigger = helpers.defaultNullOpts.mkBool true "Automatically show signature help when typing a trigger character from the LSP";
|
||||
luasnip = helpers.defaultNullOpts.mkBool true "Will open signature help when jumping to Luasnip insert nodes";
|
||||
throttle = helpers.defaultNullOpts.mkNum 50 ''
|
||||
Debounce lsp signature help request by 50ms
|
||||
'';
|
||||
};
|
||||
|
||||
override = helpers.defaultNullOpts.mkNullable (types.attrsOf types.bool) ''
|
||||
view =
|
||||
helpers.defaultNullOpts.mkNullable types.str "null"
|
||||
"when null, use defaults from documentation";
|
||||
opts =
|
||||
helpers.defaultNullOpts.mkNullable types.anything "{}"
|
||||
"merged with defaults from documentation";
|
||||
};
|
||||
|
||||
message = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable display of messages";
|
||||
|
||||
view = helpers.defaultNullOpts.mkStr "notify" "";
|
||||
opts = helpers.defaultNullOpts.mkNullable types.anything "{}" "";
|
||||
};
|
||||
|
||||
documentation = {
|
||||
view = helpers.defaultNullOpts.mkStr "hover" "";
|
||||
|
||||
opts = helpers.defaultNullOpts.mkNullable types.anything ''
|
||||
{
|
||||
"vim.lsp.util.convert_input_to_markdown_lines" = false;
|
||||
"vim.lsp.util.stylize_markdown" = false;
|
||||
"cmp.entry.get_documentation" = false;
|
||||
lang = "markdown";
|
||||
replace = true;
|
||||
render = "plain";
|
||||
format = ["{message}"];
|
||||
win_options = { concealcursor = "n"; conceallevel = 3; };
|
||||
}
|
||||
'' "";
|
||||
|
||||
hover = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable hover UI";
|
||||
view =
|
||||
helpers.defaultNullOpts.mkNullable types.str "null"
|
||||
"when null, use defaults from documentation";
|
||||
opts =
|
||||
helpers.defaultNullOpts.mkNullable types.anything "{}"
|
||||
"merged with defaults from documentation";
|
||||
};
|
||||
|
||||
signature = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable signature UI";
|
||||
|
||||
autoOpen = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "";
|
||||
trigger =
|
||||
helpers.defaultNullOpts.mkBool true
|
||||
"Automatically show signature help when typing a trigger character from the LSP";
|
||||
luasnip =
|
||||
helpers.defaultNullOpts.mkBool true
|
||||
"Will open signature help when jumping to Luasnip insert nodes";
|
||||
throttle = helpers.defaultNullOpts.mkNum 50 ''
|
||||
Debounce lsp signature help request by 50ms
|
||||
'';
|
||||
};
|
||||
|
||||
view =
|
||||
helpers.defaultNullOpts.mkNullable types.str "null"
|
||||
"when null, use defaults from documentation";
|
||||
opts =
|
||||
helpers.defaultNullOpts.mkNullable types.anything "{}"
|
||||
"merged with defaults from documentation";
|
||||
};
|
||||
|
||||
message = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true "enable display of messages";
|
||||
|
||||
view = helpers.defaultNullOpts.mkStr "notify" "";
|
||||
opts = helpers.defaultNullOpts.mkNullable types.anything "{}" "";
|
||||
};
|
||||
|
||||
documentation = {
|
||||
view = helpers.defaultNullOpts.mkStr "hover" "";
|
||||
|
||||
opts = helpers.defaultNullOpts.mkNullable types.anything ''
|
||||
{
|
||||
lang = "markdown";
|
||||
replace = true;
|
||||
render = "plain";
|
||||
format = ["{message}"];
|
||||
win_options = { concealcursor = "n"; conceallevel = 3; };
|
||||
}
|
||||
'' "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
markdown = {
|
||||
hover = helpers.defaultNullOpts.mkNullable (types.attrsOf types.str) ''
|
||||
{
|
||||
"|(%S-)|" = helpers.mkRaw "vim.cmd.help"; // vim help links
|
||||
"%[.-%]%((%S-)%)" = helpers.mkRaw "require("noice.util").open"; // markdown links
|
||||
}
|
||||
'' "set handlers for hover (lua code)";
|
||||
markdown = {
|
||||
hover = helpers.defaultNullOpts.mkNullable (types.attrsOf types.str) ''
|
||||
{
|
||||
"|(%S-)|" = helpers.mkRaw "vim.cmd.help"; // vim help links
|
||||
"%[.-%]%((%S-)%)" = helpers.mkRaw "require("noice.util").open"; // markdown links
|
||||
}
|
||||
'' "set handlers for hover (lua code)";
|
||||
|
||||
highlights = helpers.defaultNullOpts.mkNullable (types.attrsOf types.str) ''
|
||||
{
|
||||
"|%S-|" = "@text.reference";
|
||||
"@%S+" = "@parameter";
|
||||
"^%s*(Parameters:)" = "@text.title";
|
||||
"^%s*(Return:)" = "@text.title";
|
||||
"^%s*(See also:)" = "@text.title";
|
||||
"{%S-}" = "@parameter";
|
||||
}
|
||||
'' "set highlight groups";
|
||||
};
|
||||
highlights = helpers.defaultNullOpts.mkNullable (types.attrsOf types.str) ''
|
||||
{
|
||||
"|%S-|" = "@text.reference";
|
||||
"@%S+" = "@parameter";
|
||||
"^%s*(Parameters:)" = "@text.title";
|
||||
"^%s*(Return:)" = "@text.title";
|
||||
"^%s*(See also:)" = "@text.title";
|
||||
"{%S-}" = "@parameter";
|
||||
}
|
||||
'' "set highlight groups";
|
||||
};
|
||||
|
||||
health = {
|
||||
checker =
|
||||
helpers.defaultNullOpts.mkBool true
|
||||
"Disable if you don't want health checks to run";
|
||||
};
|
||||
health = {
|
||||
checker = helpers.defaultNullOpts.mkBool true "Disable if you don't want health checks to run";
|
||||
};
|
||||
|
||||
smartMove = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Noice tries to move out of the way of existing floating windows.
|
||||
You can disable this behaviour here
|
||||
'';
|
||||
excludedFiletypes =
|
||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
||||
''[ "cmp_menu" "cmp_docs" "notify"]'' ''
|
||||
smartMove = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Noice tries to move out of the way of existing floating windows.
|
||||
You can disable this behaviour here
|
||||
'';
|
||||
excludedFiletypes =
|
||||
helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''[ "cmp_menu" "cmp_docs" "notify"]''
|
||||
''
|
||||
add any filetypes here, that shouldn't trigger smart move
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
presets =
|
||||
helpers.defaultNullOpts.mkNullable (types.either types.bool types.anything) ''
|
||||
presets =
|
||||
helpers.defaultNullOpts.mkNullable (types.either types.bool types.anything)
|
||||
''
|
||||
{
|
||||
bottom_search = false;
|
||||
command_palette = false;
|
||||
|
@ -255,93 +251,128 @@ with lib; {
|
|||
inc_rename = false;
|
||||
lsp_doc_border = false;
|
||||
}
|
||||
'' "
|
||||
''
|
||||
"
|
||||
you can enable a preset by setting it to true, or a table that will override the preset
|
||||
config. you can also add custom presets that you can enable/disable with enabled=true
|
||||
";
|
||||
|
||||
throttle = helpers.defaultNullOpts.mkNum "1000 / 30" ''
|
||||
how frequently does Noice need to check for ui updates? This has no effect when in blocking
|
||||
mode
|
||||
'';
|
||||
throttle = helpers.defaultNullOpts.mkNum "1000 / 30" ''
|
||||
how frequently does Noice need to check for ui updates? This has no effect when in blocking
|
||||
mode
|
||||
'';
|
||||
|
||||
views = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "{}" "";
|
||||
routes = helpers.defaultNullOpts.mkNullable (types.listOf (types.attrsOf types.anything)) "[]" "";
|
||||
status = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "{}" "";
|
||||
format = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "{}" "";
|
||||
};
|
||||
views = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "{}" "";
|
||||
routes = helpers.defaultNullOpts.mkNullable (types.listOf (types.attrsOf types.anything)) "[]" "";
|
||||
status = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "{}" "";
|
||||
format = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "{}" "";
|
||||
};
|
||||
|
||||
config = let
|
||||
cfg = config.plugins.noice;
|
||||
setupOptions = {
|
||||
inherit (cfg) presets views routes status format;
|
||||
cmdline = {
|
||||
inherit (cfg.cmdline) enabled view opts format;
|
||||
};
|
||||
messages = let
|
||||
cfgM = cfg.messages;
|
||||
in {
|
||||
inherit (cfgM) enabled view;
|
||||
view_error = cfgM.viewError;
|
||||
view_warn = cfgM.viewWarn;
|
||||
view_history = cfgM.viewHistory;
|
||||
view_search = cfgM.viewSearch;
|
||||
};
|
||||
popupmenu = let
|
||||
cfgP = cfg.popupmenu;
|
||||
in {
|
||||
inherit (cfgP) enabled backend;
|
||||
kind_icons = cfgP.kindIcons;
|
||||
};
|
||||
inherit (cfg) redirect commands;
|
||||
notify = {
|
||||
inherit (cfg.notify) enabled view;
|
||||
};
|
||||
lsp = let
|
||||
cfgL = cfg.lsp;
|
||||
in {
|
||||
progress = let
|
||||
cfgLP = cfgL.progress;
|
||||
in {
|
||||
inherit (cfgLP) enabled format throttle view;
|
||||
format_done = cfgLP.formatDone;
|
||||
config =
|
||||
let
|
||||
cfg = config.plugins.noice;
|
||||
setupOptions = {
|
||||
inherit (cfg)
|
||||
presets
|
||||
views
|
||||
routes
|
||||
status
|
||||
format
|
||||
;
|
||||
cmdline = {
|
||||
inherit (cfg.cmdline)
|
||||
enabled
|
||||
view
|
||||
opts
|
||||
format
|
||||
;
|
||||
};
|
||||
inherit (cfgL) override;
|
||||
hover = {
|
||||
inherit (cfgL.hover) enabled view opts;
|
||||
};
|
||||
signature = let
|
||||
cfgLS = cfgL.signature;
|
||||
in {
|
||||
inherit (cfgLS) enabled view opts;
|
||||
auto_open = {
|
||||
inherit (cfgLS.autoOpen) enabled trigger luasnip throttle;
|
||||
messages =
|
||||
let
|
||||
cfgM = cfg.messages;
|
||||
in
|
||||
{
|
||||
inherit (cfgM) enabled view;
|
||||
view_error = cfgM.viewError;
|
||||
view_warn = cfgM.viewWarn;
|
||||
view_history = cfgM.viewHistory;
|
||||
view_search = cfgM.viewSearch;
|
||||
};
|
||||
popupmenu =
|
||||
let
|
||||
cfgP = cfg.popupmenu;
|
||||
in
|
||||
{
|
||||
inherit (cfgP) enabled backend;
|
||||
kind_icons = cfgP.kindIcons;
|
||||
};
|
||||
inherit (cfg) redirect commands;
|
||||
notify = {
|
||||
inherit (cfg.notify) enabled view;
|
||||
};
|
||||
message = {
|
||||
inherit (cfgL.message) enabled view opts;
|
||||
lsp =
|
||||
let
|
||||
cfgL = cfg.lsp;
|
||||
in
|
||||
{
|
||||
progress =
|
||||
let
|
||||
cfgLP = cfgL.progress;
|
||||
in
|
||||
{
|
||||
inherit (cfgLP)
|
||||
enabled
|
||||
format
|
||||
throttle
|
||||
view
|
||||
;
|
||||
format_done = cfgLP.formatDone;
|
||||
};
|
||||
inherit (cfgL) override;
|
||||
hover = {
|
||||
inherit (cfgL.hover) enabled view opts;
|
||||
};
|
||||
signature =
|
||||
let
|
||||
cfgLS = cfgL.signature;
|
||||
in
|
||||
{
|
||||
inherit (cfgLS) enabled view opts;
|
||||
auto_open = {
|
||||
inherit (cfgLS.autoOpen)
|
||||
enabled
|
||||
trigger
|
||||
luasnip
|
||||
throttle
|
||||
;
|
||||
};
|
||||
};
|
||||
message = {
|
||||
inherit (cfgL.message) enabled view opts;
|
||||
};
|
||||
documentation = {
|
||||
inherit (cfgL.documentation) view opts;
|
||||
};
|
||||
};
|
||||
markdown = {
|
||||
inherit (cfg.markdown) hover highlights;
|
||||
};
|
||||
documentation = {
|
||||
inherit (cfgL.documentation) view opts;
|
||||
health = {
|
||||
inherit (cfg.health) checker;
|
||||
};
|
||||
smart_move =
|
||||
let
|
||||
cfgS = cfg.smartMove;
|
||||
in
|
||||
{
|
||||
inherit (cfgS) enabled;
|
||||
excluded_filetypes = cfgS.excludedFiletypes;
|
||||
};
|
||||
};
|
||||
markdown = {
|
||||
inherit (cfg.markdown) hover highlights;
|
||||
};
|
||||
health = {
|
||||
inherit (cfg.health) checker;
|
||||
};
|
||||
smart_move = let
|
||||
cfgS = cfg.smartMove;
|
||||
in {
|
||||
inherit (cfgS) enabled;
|
||||
excluded_filetypes = cfgS.excludedFiletypes;
|
||||
};
|
||||
};
|
||||
in
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
# nui-nvim & nvim-notify are dependencies of the vimPlugins.noice-nvim package
|
||||
extraPlugins = [cfg.package];
|
||||
extraPlugins = [ cfg.package ];
|
||||
extraConfigLua = ''
|
||||
require("noice").setup(${helpers.toLuaObject setupOptions})
|
||||
'';
|
||||
|
|
|
@ -6,45 +6,46 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "statuscol";
|
||||
originalName = "statuscol.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.statuscol-nvim;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "statuscol";
|
||||
originalName = "statuscol.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.statuscol-nvim;
|
||||
|
||||
maintainers = [maintainers.GaetanLepage];
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
settingsOptions = {
|
||||
setopt = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to set the `statuscolumn` option, may be set to false for those who want to use the
|
||||
click handlers in their own `statuscolumn`: `_G.Sc[SFL]a()`.
|
||||
Although I recommend just using the segments field below to build your statuscolumn to
|
||||
benefit from the performance optimizations in this plugin.
|
||||
'';
|
||||
settingsOptions = {
|
||||
setopt = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to set the `statuscolumn` option, may be set to false for those who want to use the
|
||||
click handlers in their own `statuscolumn`: `_G.Sc[SFL]a()`.
|
||||
Although I recommend just using the segments field below to build your statuscolumn to
|
||||
benefit from the performance optimizations in this plugin.
|
||||
'';
|
||||
|
||||
thousands = helpers.defaultNullOpts.mkNullable (with types; either str (enum [false])) "false" ''
|
||||
`false` or line number thousands separator string ("." / ",").
|
||||
'';
|
||||
thousands = helpers.defaultNullOpts.mkNullable (with types; either str (enum [ false ])) "false" ''
|
||||
`false` or line number thousands separator string ("." / ",").
|
||||
'';
|
||||
|
||||
relculright = helpers.defaultNullOpts.mkBool false ''
|
||||
Whether to right-align the cursor line number with `relativenumber` set.
|
||||
'';
|
||||
relculright = helpers.defaultNullOpts.mkBool false ''
|
||||
Whether to right-align the cursor line number with `relativenumber` set.
|
||||
'';
|
||||
|
||||
ft_ignore = helpers.defaultNullOpts.mkListOf types.str "null" ''
|
||||
Lua table with 'filetype' values for which `statuscolumn` will be unset.
|
||||
'';
|
||||
ft_ignore = helpers.defaultNullOpts.mkListOf types.str "null" ''
|
||||
Lua table with 'filetype' values for which `statuscolumn` will be unset.
|
||||
'';
|
||||
|
||||
bt_ignore = helpers.defaultNullOpts.mkListOf types.str "null" ''
|
||||
Lua table with 'buftype' values for which `statuscolumn` will be unset.
|
||||
'';
|
||||
bt_ignore = helpers.defaultNullOpts.mkListOf types.str "null" ''
|
||||
Lua table with 'buftype' values for which `statuscolumn` will be unset.
|
||||
'';
|
||||
|
||||
segments = let
|
||||
segments =
|
||||
let
|
||||
segmentType = types.submodule {
|
||||
freeformType = with types; attrsOf anything;
|
||||
options = {
|
||||
text = mkOption {
|
||||
type = with helpers.nixvimTypes; listOf (either str rawLua);
|
||||
description = "Segment text.";
|
||||
example = ["%C"];
|
||||
example = [ "%C" ];
|
||||
};
|
||||
|
||||
click = helpers.mkNullOrStr ''
|
||||
|
@ -55,13 +56,9 @@ with lib;
|
|||
`%#` highlight group label, applies to each text element.
|
||||
'';
|
||||
|
||||
condition =
|
||||
helpers.mkNullOrOption
|
||||
(
|
||||
with helpers.nixvimTypes;
|
||||
listOf (either bool rawLua)
|
||||
)
|
||||
"Table of booleans or functions returning a boolean.";
|
||||
condition = helpers.mkNullOrOption (
|
||||
with helpers.nixvimTypes; listOf (either bool rawLua)
|
||||
) "Table of booleans or functions returning a boolean.";
|
||||
|
||||
sign = {
|
||||
name = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
||||
|
@ -100,86 +97,84 @@ with lib;
|
|||
};
|
||||
};
|
||||
in
|
||||
helpers.defaultNullOpts.mkListOf segmentType
|
||||
''
|
||||
[
|
||||
{
|
||||
text = ["%C"];
|
||||
click = "v:lua.ScFa";
|
||||
}
|
||||
{
|
||||
text = ["%s"];
|
||||
click = "v:lua.ScSa";
|
||||
}
|
||||
{
|
||||
text = [
|
||||
{__raw = "require('statuscol.builtin').lnumfunc";}
|
||||
" "
|
||||
];
|
||||
condition = [
|
||||
true
|
||||
{__raw = "require('statuscol.builtin').not_empty";}
|
||||
];
|
||||
click = "v:lua.ScLa";
|
||||
}
|
||||
]
|
||||
''
|
||||
"The statuscolumn can be customized through the `segments` option.";
|
||||
helpers.defaultNullOpts.mkListOf segmentType ''
|
||||
[
|
||||
{
|
||||
text = ["%C"];
|
||||
click = "v:lua.ScFa";
|
||||
}
|
||||
{
|
||||
text = ["%s"];
|
||||
click = "v:lua.ScSa";
|
||||
}
|
||||
{
|
||||
text = [
|
||||
{__raw = "require('statuscol.builtin').lnumfunc";}
|
||||
" "
|
||||
];
|
||||
condition = [
|
||||
true
|
||||
{__raw = "require('statuscol.builtin').not_empty";}
|
||||
];
|
||||
click = "v:lua.ScLa";
|
||||
}
|
||||
]
|
||||
'' "The statuscolumn can be customized through the `segments` option.";
|
||||
|
||||
clickmod = helpers.defaultNullOpts.mkStr "c" ''
|
||||
Modifier used for certain actions in the builtin clickhandlers:
|
||||
`a` for Alt, `c` for Ctrl and `m` for Meta.
|
||||
clickmod = helpers.defaultNullOpts.mkStr "c" ''
|
||||
Modifier used for certain actions in the builtin clickhandlers:
|
||||
`a` for Alt, `c` for Ctrl and `m` for Meta.
|
||||
'';
|
||||
|
||||
clickhandlers = mkOption {
|
||||
type = with helpers.nixvimTypes; attrsOf strLuaFn;
|
||||
default = { };
|
||||
description = ''
|
||||
Builtin click handlers.
|
||||
'';
|
||||
|
||||
clickhandlers = mkOption {
|
||||
type = with helpers.nixvimTypes; attrsOf strLuaFn;
|
||||
default = {};
|
||||
description = ''
|
||||
Builtin click handlers.
|
||||
'';
|
||||
apply = mapAttrs (_: helpers.mkRaw);
|
||||
example = {
|
||||
Lnum = "require('statuscol.builtin').lnum_click";
|
||||
FoldClose = "require('statuscol.builtin').foldclose_click";
|
||||
FoldOpen = "require('statuscol.builtin').foldopen_click";
|
||||
FoldOther = "require('statuscol.builtin').foldother_click";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
setopt = true;
|
||||
thousands = ".";
|
||||
relculright = true;
|
||||
ft_ignore = null;
|
||||
bt_ignore = null;
|
||||
segments = [
|
||||
{
|
||||
text = ["%C"];
|
||||
click = "v:lua.ScFa";
|
||||
}
|
||||
{
|
||||
text = ["%s"];
|
||||
click = "v:lua.ScSa";
|
||||
}
|
||||
{
|
||||
text = [
|
||||
{__raw = "require('statuscol.builtin').lnumfunc";}
|
||||
" "
|
||||
];
|
||||
condition = [
|
||||
true
|
||||
{__raw = "require('statuscol.builtin').not_empty";}
|
||||
];
|
||||
click = "v:lua.ScLa";
|
||||
}
|
||||
];
|
||||
clickmod = "c";
|
||||
clickhandlers = {
|
||||
apply = mapAttrs (_: helpers.mkRaw);
|
||||
example = {
|
||||
Lnum = "require('statuscol.builtin').lnum_click";
|
||||
FoldClose = "require('statuscol.builtin').foldclose_click";
|
||||
FoldOpen = "require('statuscol.builtin').foldopen_click";
|
||||
FoldOther = "require('statuscol.builtin').foldother_click";
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
setopt = true;
|
||||
thousands = ".";
|
||||
relculright = true;
|
||||
ft_ignore = null;
|
||||
bt_ignore = null;
|
||||
segments = [
|
||||
{
|
||||
text = [ "%C" ];
|
||||
click = "v:lua.ScFa";
|
||||
}
|
||||
{
|
||||
text = [ "%s" ];
|
||||
click = "v:lua.ScSa";
|
||||
}
|
||||
{
|
||||
text = [
|
||||
{ __raw = "require('statuscol.builtin').lnumfunc"; }
|
||||
" "
|
||||
];
|
||||
condition = [
|
||||
true
|
||||
{ __raw = "require('statuscol.builtin').not_empty"; }
|
||||
];
|
||||
click = "v:lua.ScLa";
|
||||
}
|
||||
];
|
||||
clickmod = "c";
|
||||
clickhandlers = {
|
||||
Lnum = "require('statuscol.builtin').lnum_click";
|
||||
FoldClose = "require('statuscol.builtin').foldclose_click";
|
||||
FoldOpen = "require('statuscol.builtin').foldopen_click";
|
||||
FoldOther = "require('statuscol.builtin').foldother_click";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "transparent";
|
||||
originalName = "transparent.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.transparent-nvim;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "transparent";
|
||||
originalName = "transparent.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.transparent-nvim;
|
||||
|
||||
maintainers = [maintainers.GaetanLepage];
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
settingsOptions = {
|
||||
groups =
|
||||
helpers.defaultNullOpts.mkListOf types.str
|
||||
settingsOptions = {
|
||||
groups =
|
||||
helpers.defaultNullOpts.mkListOf types.str
|
||||
''
|
||||
[
|
||||
"Normal"
|
||||
|
@ -49,24 +49,24 @@ with lib;
|
|||
The list of transparent groups.
|
||||
'';
|
||||
|
||||
extra_groups = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
||||
Additional groups that should be cleared.
|
||||
'';
|
||||
extra_groups = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
||||
Additional groups that should be cleared.
|
||||
'';
|
||||
|
||||
exclude_groups = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
||||
Groups that you don't want to clear.
|
||||
'';
|
||||
};
|
||||
exclude_groups = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
||||
Groups that you don't want to clear.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
extra_groups = [
|
||||
"BufferLineTabClose"
|
||||
"BufferLineBufferSelected"
|
||||
"BufferLineFill"
|
||||
"BufferLineBackground"
|
||||
"BufferLineSeparator"
|
||||
"BufferLineIndicatorSelected"
|
||||
];
|
||||
exclude_groups = [];
|
||||
};
|
||||
}
|
||||
settingsExample = {
|
||||
extra_groups = [
|
||||
"BufferLineTabClose"
|
||||
"BufferLineBufferSelected"
|
||||
"BufferLineFill"
|
||||
"BufferLineBackground"
|
||||
"BufferLineSeparator"
|
||||
"BufferLineIndicatorSelected"
|
||||
];
|
||||
exclude_groups = [ ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,76 +6,72 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "twilight";
|
||||
originalName = "twilight.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.twilight-nvim;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "twilight";
|
||||
originalName = "twilight.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.twilight-nvim;
|
||||
|
||||
maintainers = [maintainers.GaetanLepage];
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
settingsOptions = {
|
||||
dimming = {
|
||||
alpha = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.25" ''
|
||||
Amount of dimming.
|
||||
'';
|
||||
|
||||
color = helpers.defaultNullOpts.mkListOf types.str ''["Normal" "#ffffff"]'' ''
|
||||
Highlight groups / colors to use.
|
||||
'';
|
||||
|
||||
term_bg = helpers.defaultNullOpts.mkStr "#000000" ''
|
||||
If `guibg=NONE`, this will be used to calculate text color.
|
||||
'';
|
||||
|
||||
inactive = helpers.defaultNullOpts.mkBool false ''
|
||||
When true, other windows will be fully dimmed (unless they contain the same buffer).
|
||||
'';
|
||||
};
|
||||
|
||||
context = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
||||
Amount of lines we will try to show around the current line.
|
||||
settingsOptions = {
|
||||
dimming = {
|
||||
alpha = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.25" ''
|
||||
Amount of dimming.
|
||||
'';
|
||||
|
||||
treesitter = helpers.defaultNullOpts.mkBool true ''
|
||||
Use `treesitter` when available for the filetype.
|
||||
`treesitter` is used to automatically expand the visible text, but you can further control
|
||||
the types of nodes that should always be fully expanded.
|
||||
color = helpers.defaultNullOpts.mkListOf types.str ''["Normal" "#ffffff"]'' ''
|
||||
Highlight groups / colors to use.
|
||||
'';
|
||||
|
||||
expand =
|
||||
helpers.defaultNullOpts.mkListOf types.str
|
||||
''
|
||||
[
|
||||
"function"
|
||||
"method"
|
||||
"table"
|
||||
"if_statement"
|
||||
]
|
||||
''
|
||||
"For treesitter, we will always try to expand to the top-most ancestor with these types.";
|
||||
term_bg = helpers.defaultNullOpts.mkStr "#000000" ''
|
||||
If `guibg=NONE`, this will be used to calculate text color.
|
||||
'';
|
||||
|
||||
exclude = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
||||
Exclude these filetypes.
|
||||
inactive = helpers.defaultNullOpts.mkBool false ''
|
||||
When true, other windows will be fully dimmed (unless they contain the same buffer).
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
dimming.alpha = 0.4;
|
||||
context = 20;
|
||||
treesitter = true;
|
||||
expand = ["function" "method"];
|
||||
};
|
||||
context = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
||||
Amount of lines we will try to show around the current line.
|
||||
'';
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings =
|
||||
optional
|
||||
(
|
||||
(isBool cfg.settings.treesitter)
|
||||
&& cfg.settings.treesitter
|
||||
&& (!config.plugins.treesitter.enable)
|
||||
)
|
||||
treesitter = helpers.defaultNullOpts.mkBool true ''
|
||||
Use `treesitter` when available for the filetype.
|
||||
`treesitter` is used to automatically expand the visible text, but you can further control
|
||||
the types of nodes that should always be fully expanded.
|
||||
'';
|
||||
|
||||
expand = helpers.defaultNullOpts.mkListOf types.str ''
|
||||
[
|
||||
"function"
|
||||
"method"
|
||||
"table"
|
||||
"if_statement"
|
||||
]
|
||||
'' "For treesitter, we will always try to expand to the top-most ancestor with these types.";
|
||||
|
||||
exclude = helpers.defaultNullOpts.mkListOf types.str "[]" ''
|
||||
Exclude these filetypes.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
dimming.alpha = 0.4;
|
||||
context = 20;
|
||||
treesitter = true;
|
||||
expand = [
|
||||
"function"
|
||||
"method"
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
warnings =
|
||||
optional
|
||||
((isBool cfg.settings.treesitter) && cfg.settings.treesitter && (!config.plugins.treesitter.enable))
|
||||
''
|
||||
Nixvim (plugins.twilight): You have set `plugins.twilight.treesitter` to `true` but `plugins.treesitter.enable` is false.
|
||||
'';
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,69 +6,34 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config
|
||||
{
|
||||
name = "virt-column";
|
||||
originalName = "virt-column.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.virt-column-nvim;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "virt-column";
|
||||
originalName = "virt-column.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.virt-column-nvim;
|
||||
|
||||
maintainers = [helpers.maintainers.alisonjenkins];
|
||||
maintainers = [ helpers.maintainers.alisonjenkins ];
|
||||
|
||||
settingsOptions = {
|
||||
enabled = helpers.defaultNullOpts.mkBool true ''
|
||||
Enables or disables virt-column.
|
||||
'';
|
||||
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.
|
||||
'';
|
||||
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`.
|
||||
'';
|
||||
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.
|
||||
'';
|
||||
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 = [
|
||||
exclude = {
|
||||
filetypes = helpers.defaultNullOpts.mkListOf types.str ''
|
||||
[
|
||||
"lspinfo"
|
||||
"packer"
|
||||
"checkhealth"
|
||||
|
@ -76,13 +41,41 @@ with lib;
|
|||
"man"
|
||||
"TelescopePrompt"
|
||||
"TelescopeResults"
|
||||
];
|
||||
buftypes = [
|
||||
]
|
||||
'' "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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,30 +6,30 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "zen-mode";
|
||||
originalName = "zen-mode.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.zen-mode-nvim;
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "zen-mode";
|
||||
originalName = "zen-mode.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.zen-mode-nvim;
|
||||
|
||||
maintainers = [maintainers.GaetanLepage];
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
# Optionally, explicitly declare some options. You don't have to.
|
||||
settingsOptions = {
|
||||
window = {
|
||||
backdrop = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.95" ''
|
||||
Shade the backdrop of the Zen window.
|
||||
Set to 1 to keep the same as Normal.
|
||||
'';
|
||||
# Optionally, explicitly declare some options. You don't have to.
|
||||
settingsOptions = {
|
||||
window = {
|
||||
backdrop = helpers.defaultNullOpts.mkNullable (types.numbers.between 0.0 1.0) "0.95" ''
|
||||
Shade the backdrop of the Zen window.
|
||||
Set to 1 to keep the same as Normal.
|
||||
'';
|
||||
|
||||
width =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
width =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(
|
||||
with helpers.nixvimTypes;
|
||||
oneOf [
|
||||
ints.positive
|
||||
(numbers.between 0.0 1.0)
|
||||
rawLua
|
||||
]
|
||||
oneOf [
|
||||
ints.positive
|
||||
(numbers.between 0.0 1.0)
|
||||
rawLua
|
||||
]
|
||||
)
|
||||
"120"
|
||||
''
|
||||
|
@ -41,15 +41,15 @@ with lib;
|
|||
- a function that returns the width or the height
|
||||
'';
|
||||
|
||||
height =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
height =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(
|
||||
with helpers.nixvimTypes;
|
||||
oneOf [
|
||||
ints.positive
|
||||
(numbers.between 0.0 1.0)
|
||||
rawLua
|
||||
]
|
||||
oneOf [
|
||||
ints.positive
|
||||
(numbers.between 0.0 1.0)
|
||||
rawLua
|
||||
]
|
||||
)
|
||||
"1"
|
||||
''
|
||||
|
@ -61,29 +61,27 @@ with lib;
|
|||
- a function that returns the width or the height
|
||||
'';
|
||||
|
||||
options =
|
||||
helpers.defaultNullOpts.mkAttrsOf types.anything "{}"
|
||||
''
|
||||
By default, no options are changed for the Zen window.
|
||||
You can set any `vim.wo` option here.
|
||||
options = helpers.defaultNullOpts.mkAttrsOf types.anything "{}" ''
|
||||
By default, no options are changed for the Zen window.
|
||||
You can set any `vim.wo` option here.
|
||||
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
signcolumn = "no";
|
||||
number = false;
|
||||
relativenumber = false;
|
||||
cursorline = false;
|
||||
cursorcolumn = false;
|
||||
foldcolumn = "0";
|
||||
list = false;
|
||||
}
|
||||
```
|
||||
'';
|
||||
};
|
||||
plugins = {
|
||||
options =
|
||||
helpers.defaultNullOpts.mkAttrsOf types.anything
|
||||
Example:
|
||||
```nix
|
||||
{
|
||||
signcolumn = "no";
|
||||
number = false;
|
||||
relativenumber = false;
|
||||
cursorline = false;
|
||||
cursorcolumn = false;
|
||||
foldcolumn = "0";
|
||||
list = false;
|
||||
}
|
||||
```
|
||||
'';
|
||||
};
|
||||
plugins = {
|
||||
options =
|
||||
helpers.defaultNullOpts.mkAttrsOf types.anything
|
||||
''
|
||||
{
|
||||
enabled = true;
|
||||
|
@ -95,51 +93,51 @@ with lib;
|
|||
''
|
||||
Disable some global vim options (`vim.o`...).
|
||||
'';
|
||||
};
|
||||
|
||||
on_open = helpers.defaultNullOpts.mkLuaFn "function(win) end" ''
|
||||
Callback where you can add custom code when the Zen window opens.
|
||||
'';
|
||||
|
||||
on_close = helpers.defaultNullOpts.mkLuaFn "function(win) end" ''
|
||||
Callback where you can add custom code when the Zen window closes.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
window = {
|
||||
backdrop = 0.95;
|
||||
width = 0.8;
|
||||
height = 1;
|
||||
options.signcolumn = "no";
|
||||
};
|
||||
plugins = {
|
||||
options = {
|
||||
enabled = true;
|
||||
ruler = false;
|
||||
showcmd = false;
|
||||
};
|
||||
twilight.enabled = false;
|
||||
gitsigns.enabled = true;
|
||||
tmux.enabled = false;
|
||||
};
|
||||
on_open = ''
|
||||
function()
|
||||
require("gitsigns.actions").toggle_current_line_blame()
|
||||
vim.cmd('IBLDisable')
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.signcolumn = "no"
|
||||
require("gitsigns.actions").refresh()
|
||||
end
|
||||
'';
|
||||
on_close = ''
|
||||
function()
|
||||
require("gitsigns.actions").toggle_current_line_blame()
|
||||
vim.cmd('IBLEnable')
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.signcolumn = "yes:2"
|
||||
require("gitsigns.actions").refresh()
|
||||
end
|
||||
'';
|
||||
on_open = helpers.defaultNullOpts.mkLuaFn "function(win) end" ''
|
||||
Callback where you can add custom code when the Zen window opens.
|
||||
'';
|
||||
|
||||
on_close = helpers.defaultNullOpts.mkLuaFn "function(win) end" ''
|
||||
Callback where you can add custom code when the Zen window closes.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
window = {
|
||||
backdrop = 0.95;
|
||||
width = 0.8;
|
||||
height = 1;
|
||||
options.signcolumn = "no";
|
||||
};
|
||||
}
|
||||
plugins = {
|
||||
options = {
|
||||
enabled = true;
|
||||
ruler = false;
|
||||
showcmd = false;
|
||||
};
|
||||
twilight.enabled = false;
|
||||
gitsigns.enabled = true;
|
||||
tmux.enabled = false;
|
||||
};
|
||||
on_open = ''
|
||||
function()
|
||||
require("gitsigns.actions").toggle_current_line_blame()
|
||||
vim.cmd('IBLDisable')
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.signcolumn = "no"
|
||||
require("gitsigns.actions").refresh()
|
||||
end
|
||||
'';
|
||||
on_close = ''
|
||||
function()
|
||||
require("gitsigns.actions").toggle_current_line_blame()
|
||||
vim.cmd('IBLEnable')
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.signcolumn = "yes:2"
|
||||
require("gitsigns.actions").refresh()
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue