mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-21 17:59:48 +01:00
Merge pull request #120 from FrothyMarrow/fix/cursorline
This commit is contained in:
commit
5b8e4a89a1
3 changed files with 17 additions and 6 deletions
|
@ -87,7 +87,7 @@ inputs: let
|
||||||
eolChar = null;
|
eolChar = null;
|
||||||
showCurrContext = true;
|
showCurrContext = true;
|
||||||
};
|
};
|
||||||
cursorWordline = {
|
cursorline = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lineTimeout = 0;
|
lineTimeout = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,10 +31,15 @@ in {
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.cursorWordline.enable {
|
(mkIf cfg.cursorline.enable {
|
||||||
vim.startPlugins = ["nvim-cursorline"];
|
vim.startPlugins = ["nvim-cursorline"];
|
||||||
vim.luaConfigRC.cursorline = nvim.dag.entryAnywhere ''
|
vim.luaConfigRC.cursorline = nvim.dag.entryAnywhere ''
|
||||||
vim.g.cursorline_timeout = ${toString cfg.cursorWordline.lineTimeout}
|
require('nvim-cursorline').setup {
|
||||||
|
cursorline = {
|
||||||
|
timeout = ${toString cfg.cursorline.lineTimeout},
|
||||||
|
number = ${boolToString (!cfg.cursorline.lineNumbersOnly)},
|
||||||
|
}
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -42,13 +42,19 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cursorWordline = {
|
cursorline = {
|
||||||
enable = mkEnableOption "word and delayed line highlight [nvim-cursorline].";
|
enable = mkEnableOption "line hightlighting on the cursor [nvim-cursorline]";
|
||||||
|
|
||||||
lineTimeout = mkOption {
|
lineTimeout = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = "Time in milliseconds for cursorline to appear";
|
description = "Time in milliseconds for cursorline to appear";
|
||||||
default = 500;
|
default = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
lineNumbersOnly = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "Hightlight only in the presence of line numbers";
|
||||||
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue