mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-30 00:26:45 +00:00
Compare commits
4 commits
0e469a5ecf
...
e337369821
Author | SHA1 | Date | |
---|---|---|---|
|
e337369821 | ||
|
e43b18cb9f | ||
|
b0641a8c0b | ||
|
517a6aa06e |
4 changed files with 50 additions and 56 deletions
|
@ -168,21 +168,23 @@ isMaximal: {
|
|||
|
||||
precognition = {
|
||||
enable = true;
|
||||
startVisible = true;
|
||||
showBlankVirtLine = true;
|
||||
setupOpts = {
|
||||
startVisible = true;
|
||||
showBlankVirtLine = true;
|
||||
|
||||
# highlightColor - automatically set by theme
|
||||
disabled_fts = ["startify" "alpha" "dashboard"];
|
||||
gutterHints = {
|
||||
gg = {
|
||||
text = "gg";
|
||||
prio = 2;
|
||||
# highlightColor - automatically set by theme
|
||||
disabled_fts = ["startify" "alpha" "dashboard"];
|
||||
gutterHints = {
|
||||
gg = {
|
||||
text = "gg";
|
||||
prio = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
hints = {
|
||||
Caret = {
|
||||
text = "^";
|
||||
prio = 10;
|
||||
hints = {
|
||||
Caret = {
|
||||
text = "^";
|
||||
prio = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (builtins) toString;
|
||||
|
||||
cfg = config.vim.utility.motion.precognition;
|
||||
in {
|
||||
|
@ -17,15 +14,8 @@ in {
|
|||
"precognition-nvim"
|
||||
];
|
||||
|
||||
vim.pluginRC.precognition-nvim = entryAnywhere ''
|
||||
require("precognition").setup({
|
||||
startVisible = ${toString cfg.startVisible},
|
||||
showBlankVirtLine = ${toString cfg.showBlankVirtLine},
|
||||
highlightColor = (${toLuaObject cfg.highlightColor}), --{ link = "Comment" },
|
||||
hints = (${toLuaObject cfg.hints}),
|
||||
gutterHints = (${toLuaObject cfg.gutterHints}),
|
||||
disabled_fts = (${toLuaObject cfg.disabled_fts}),
|
||||
});
|
||||
vim.luaConfigRC.precognition = lib.nvim.dag.entryAnywhere ''
|
||||
require('precognition').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./precognition.nix
|
||||
./config.nix
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||
inherit (lib.types) attrsOf listOf str bool int submodule;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
|
||||
mkHintType = description:
|
||||
mkOption {
|
||||
|
@ -25,41 +26,42 @@ in {
|
|||
options.vim.utility.motion.precognition = {
|
||||
enable = mkEnableOption "precognition.nvim plugin";
|
||||
|
||||
startVisible = mkOption {
|
||||
type = bool;
|
||||
description = "Whether to start 'precognition' automatically.";
|
||||
default = true;
|
||||
};
|
||||
setupOpts = mkPluginSetupOption "precognition.nvim" {
|
||||
startVisible = mkOption {
|
||||
type = bool;
|
||||
description = "Whether to start 'precognition' automatically.";
|
||||
default = true;
|
||||
};
|
||||
|
||||
showBlankVirtLine = mkOption {
|
||||
type = bool;
|
||||
description = "Whether to show a blank virtual line when no movements are shown.";
|
||||
default = true;
|
||||
};
|
||||
showBlankVirtLine = mkOption {
|
||||
type = bool;
|
||||
description = "Whether to show a blank virtual line when no movements are shown.";
|
||||
default = true;
|
||||
};
|
||||
|
||||
highlightColor = mkOption {
|
||||
type = attrsOf str;
|
||||
highlightColor = mkOption {
|
||||
type = attrsOf str;
|
||||
default = {link = "Comment";};
|
||||
example = literalExpression ''
|
||||
{ link = "Comment"; }
|
||||
# or
|
||||
{ foreground = "#0000FF"; background = "#000000"; };
|
||||
'';
|
||||
description = ''
|
||||
The highlight for the virtual text.
|
||||
'';
|
||||
};
|
||||
|
||||
example = literalExpression ''
|
||||
{ link = "Comment"; }
|
||||
# or
|
||||
{ foreground = "#0000FF"; background = "#000000"; };
|
||||
'';
|
||||
default = {link = "Comment";};
|
||||
description = ''
|
||||
The highlight for the virtual text.
|
||||
'';
|
||||
};
|
||||
hints = mkHintType "What motions display and at what priority.";
|
||||
|
||||
hints = mkHintType "What motions display and at what priority.";
|
||||
gutterHints =
|
||||
mkHintType "What motions display and at what priority. Only appears in gutters.";
|
||||
|
||||
gutterHints =
|
||||
mkHintType "What motions display and at what priority. Only appears in gutters.";
|
||||
|
||||
disabled_fts = mkOption {
|
||||
type = listOf str;
|
||||
default = ["startify"];
|
||||
example = literalExpression ''["startify"]'';
|
||||
disabled_fts = mkOption {
|
||||
type = listOf str;
|
||||
default = ["startify"];
|
||||
example = literalExpression ''["startify"]'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue