feat: vim-illuminate

This commit is contained in:
NotAShelf 2023-06-06 03:05:05 +03:00
parent 294b712c15
commit c20456e3a1
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
8 changed files with 59 additions and 0 deletions

View file

@ -180,6 +180,7 @@ inputs: let
noice.enable = true;
colorizer.enable = true;
modes-nvim.enable = true;
illuminate.enable = true;
smartcolumn = {
enable = true;
columnAt.languages = {

View file

@ -1372,6 +1372,7 @@
"toggleterm-nvim": "toggleterm-nvim",
"tokyonight": "tokyonight",
"trouble": "trouble",
"vim-illuminate": "vim-illuminate",
"vim-markdown": "vim-markdown",
"vim-repeat": "vim-repeat",
"vim-startify": "vim-startify",
@ -1668,6 +1669,22 @@
"type": "github"
}
},
"vim-illuminate": {
"flake": false,
"locked": {
"lastModified": 1679187974,
"narHash": "sha256-8dL3cBjQ2iY4D4gTxKVVmOGhxcSSRuDBvmEwwFIbWsQ=",
"owner": "RRethy",
"repo": "vim-illuminate",
"rev": "a2907275a6899c570d16e95b9db5fd921c167502",
"type": "github"
},
"original": {
"owner": "RRethy",
"repo": "vim-illuminate",
"type": "github"
}
},
"vim-markdown": {
"flake": false,
"locked": {

View file

@ -457,6 +457,11 @@
flake = false;
};
vim-illuminate = {
url = "github:RRethy/vim-illuminate";
flake = false;
};
# Assistant
copilot-lua = {
url = "github:zbirenbaum/copilot.lua";

View file

@ -82,6 +82,7 @@ with lib; let
"elixir-ls"
"elixir-tools"
"nvim-colorizer-lua"
"vim-illuminate"
];
# You can either use the name of the plugin or a package.
pluginsType = with types;

View file

@ -5,5 +5,6 @@ _: {
./notifications
./smartcolumn
./colorizer
./illuminate
];
}

View file

@ -0,0 +1,17 @@
{
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.ui.illuminate;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["vim-illuminate"];
vim.luaConfigRC.vim-illuminate =
nvim.dag.entryAnywhere ''
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./config.nix
./illuminate.nix
];
}

View file

@ -0,0 +1,11 @@
{
config,
lib,
...
}:
with lib;
with builtins; {
options.vim.ui.illuminate = {
enable = mkEnableOption "vim-illuminate: automatically highlight other uses of the word under the cursor";
};
}