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