mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 05:40:44 +00:00
Compare commits
3 commits
39e27e17a2
...
e43b18cb9f
Author | SHA1 | Date | |
---|---|---|---|
|
e43b18cb9f | ||
|
b0641a8c0b | ||
|
517a6aa06e |
4 changed files with 50 additions and 56 deletions
|
@ -168,6 +168,7 @@ isMaximal: {
|
||||||
|
|
||||||
precognition = {
|
precognition = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
setupOpts = {
|
||||||
startVisible = true;
|
startVisible = true;
|
||||||
showBlankVirtLine = true;
|
showBlankVirtLine = true;
|
||||||
|
|
||||||
|
@ -187,6 +188,7 @@ isMaximal: {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
images = {
|
images = {
|
||||||
image-nvim.enable = false;
|
image-nvim.enable = false;
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
...
|
...
|
||||||
}: 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 {
|
||||||
|
@ -17,15 +14,8 @@ in {
|
||||||
"precognition-nvim"
|
"precognition-nvim"
|
||||||
];
|
];
|
||||||
|
|
||||||
vim.pluginRC.precognition-nvim = entryAnywhere ''
|
vim.luaConfigRC.precognition = lib.nvim.dag.entryAnywhere ''
|
||||||
require("precognition").setup({
|
require('precognition').setup(${lib.nvim.lua.toLuaObject cfg.setupOpts})
|
||||||
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,6 +1,7 @@
|
||||||
{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 {
|
||||||
|
@ -25,6 +26,7 @@ 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.";
|
||||||
|
@ -39,13 +41,12 @@ in {
|
||||||
|
|
||||||
highlightColor = mkOption {
|
highlightColor = mkOption {
|
||||||
type = attrsOf str;
|
type = attrsOf str;
|
||||||
|
default = {link = "Comment";};
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{ link = "Comment"; }
|
{ link = "Comment"; }
|
||||||
# or
|
# or
|
||||||
{ foreground = "#0000FF"; background = "#000000"; };
|
{ foreground = "#0000FF"; background = "#000000"; };
|
||||||
'';
|
'';
|
||||||
default = {link = "Comment";};
|
|
||||||
description = ''
|
description = ''
|
||||||
The highlight for the virtual text.
|
The highlight for the virtual text.
|
||||||
'';
|
'';
|
||||||
|
@ -62,4 +63,5 @@ in {
|
||||||
example = literalExpression ''["startify"]'';
|
example = literalExpression ''["startify"]'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue