diff options
author | Matthew Lemon <y@yulqen.org> | 2023-05-13 21:38:36 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-05-13 21:38:36 +0100 |
commit | 0872d52e7127434a1a0cddaa30510f42a1bf22c1 (patch) | |
tree | 0300a741c9812d4ade1ec7ffd55b15a66e17684b /nvim/lua/user/illuminate.lua | |
parent | e6fd7b60e1d6e7869baed548ffbd620d8d3e32b9 (diff) |
Adds a neovim from scratch neovim scratch
Diffstat (limited to 'nvim/lua/user/illuminate.lua')
-rw-r--r-- | nvim/lua/user/illuminate.lua | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/nvim/lua/user/illuminate.lua b/nvim/lua/user/illuminate.lua new file mode 100644 index 0000000..938da54 --- /dev/null +++ b/nvim/lua/user/illuminate.lua @@ -0,0 +1,54 @@ +local M = { + "RRethy/vim-illuminate", + commit = "d6ca7f77eeaf61b3e6ce9f0e5a978d606df44298", + event = "VeryLazy", +} + +function M.config() + local illuminate = require "illuminate" + vim.g.Illuminate_ftblacklist = { "alpha", "NvimTree" } + vim.api.nvim_set_keymap( + "n", + "<a-n>", + '<cmd>lua require"illuminate".next_reference{wrap=true}<cr>', + { noremap = true } + ) + vim.api.nvim_set_keymap( + "n", + "<a-p>", + '<cmd>lua require"illuminate".next_reference{reverse=true,wrap=true}<cr>', + { noremap = true } + ) + + illuminate.configure { + providers = { + "lsp", + "treesitter", + "regex", + }, + delay = 200, + filetypes_denylist = { + "dirvish", + "fugitive", + "alpha", + "NvimTree", + "packer", + "neogitstatus", + "Trouble", + "lir", + "Outline", + "spectre_panel", + "toggleterm", + "DressingSelect", + "TelescopePrompt", + }, + filetypes_allowlist = {}, + modes_denylist = {}, + modes_allowlist = {}, + providers_regex_syntax_denylist = {}, + providers_regex_syntax_allowlist = {}, + under_cursor = true, + } +end + +return M |