diff options
| author | Thomas Schmucker <ts@its1.de> | 2024-09-26 14:35:48 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2024-09-26 14:35:48 +0200 |
| commit | 3b5d0d4095819bcbb737020aebd055f345fa7ba3 (patch) | |
| tree | e0a2215104093bda2600ce5c4fd8d0658405997b /nvim | |
| parent | 9688d0e3fc943bed67d6df13eaaf0e5e40518985 (diff) | |
| download | dotfiles-3b5d0d4095819bcbb737020aebd055f345fa7ba3.tar.gz dotfiles-3b5d0d4095819bcbb737020aebd055f345fa7ba3.tar.bz2 dotfiles-3b5d0d4095819bcbb737020aebd055f345fa7ba3.zip | |
Neues Vim Plugin 'illumunate' und clangd zurück auf v15
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/plugins.vim | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/nvim/plugins.vim b/nvim/plugins.vim index 61d71f8..993d5d4 100644 --- a/nvim/plugins.vim +++ b/nvim/plugins.vim | |||
| @@ -30,6 +30,8 @@ call plug#begin() | |||
| 30 | " Plug 'hrsh7th/cmp-cmdline' | 30 | " Plug 'hrsh7th/cmp-cmdline' |
| 31 | 31 | ||
| 32 | Plug 'lewis6991/gitsigns.nvim' | 32 | Plug 'lewis6991/gitsigns.nvim' |
| 33 | |||
| 34 | Plug 'RRethy/vim-illuminate' | ||
| 33 | call plug#end() | 35 | call plug#end() |
| 34 | 36 | ||
| 35 | " EMMET | 37 | " EMMET |
| @@ -83,7 +85,7 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true | |||
| 83 | local lspconfig = require('lspconfig') | 85 | local lspconfig = require('lspconfig') |
| 84 | 86 | ||
| 85 | lspconfig.clangd.setup{ | 87 | lspconfig.clangd.setup{ |
| 86 | cmd = { 'clangd18' }, | 88 | cmd = { 'clangd15' }, |
| 87 | capabilities = capabilities | 89 | capabilities = capabilities |
| 88 | } | 90 | } |
| 89 | 91 | ||
| @@ -187,5 +189,76 @@ cmp.event:on( | |||
| 187 | 'confirm_done', | 189 | 'confirm_done', |
| 188 | cmp_autopairs.on_confirm_done() | 190 | cmp_autopairs.on_confirm_done() |
| 189 | ) | 191 | ) |
| 192 | |||
| 193 | -- default configuration | ||
| 194 | require('illuminate').configure({ | ||
| 195 | -- providers: provider used to get references in the buffer, ordered by priority | ||
| 196 | providers = { | ||
| 197 | 'lsp', | ||
| 198 | 'treesitter', | ||
| 199 | 'regex', | ||
| 200 | }, | ||
| 201 | -- delay: delay in milliseconds | ||
| 202 | delay = 100, | ||
| 203 | -- filetype_overrides: filetype specific overrides. | ||
| 204 | -- The keys are strings to represent the filetype while the values are tables that | ||
| 205 | -- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist | ||
| 206 | filetype_overrides = {}, | ||
| 207 | -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist | ||
| 208 | filetypes_denylist = { | ||
| 209 | 'dirbuf', | ||
| 210 | 'dirvish', | ||
| 211 | 'fugitive', | ||
| 212 | }, | ||
| 213 | -- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist | ||
| 214 | -- You must set filetypes_denylist = {} to override the defaults to allow filetypes_allowlist to take effect | ||
| 215 | filetypes_allowlist = {}, | ||
| 216 | -- modes_denylist: modes to not illuminate, this overrides modes_allowlist | ||
| 217 | -- See `:help mode()` for possible values | ||
| 218 | modes_denylist = {}, | ||
| 219 | -- modes_allowlist: modes to illuminate, this is overridden by modes_denylist | ||
| 220 | -- See `:help mode()` for possible values | ||
| 221 | modes_allowlist = {}, | ||
| 222 | -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist | ||
| 223 | -- Only applies to the 'regex' provider | ||
| 224 | -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') | ||
| 225 | providers_regex_syntax_denylist = {}, | ||
| 226 | -- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist | ||
| 227 | -- Only applies to the 'regex' provider | ||
| 228 | -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') | ||
| 229 | providers_regex_syntax_allowlist = {}, | ||
| 230 | -- under_cursor: whether or not to illuminate under the cursor | ||
| 231 | under_cursor = true, | ||
| 232 | -- large_file_cutoff: number of lines at which to use large_file_config | ||
| 233 | -- The `under_cursor` option is disabled when this cutoff is hit | ||
| 234 | large_file_cutoff = nil, | ||
| 235 | -- large_file_config: config to use for large files (based on large_file_cutoff). | ||
| 236 | -- Supports the same keys passed to .configure | ||
| 237 | -- If nil, vim-illuminate will be disabled for large files. | ||
| 238 | large_file_overrides = nil, | ||
| 239 | -- min_count_to_highlight: minimum number of matches required to perform highlighting | ||
| 240 | min_count_to_highlight = 1, | ||
| 241 | -- should_enable: a callback that overrides all other settings to | ||
| 242 | -- enable/disable illumination. This will be called a lot so don't do | ||
| 243 | -- anything expensive in it. | ||
| 244 | should_enable = function(bufnr) return true end, | ||
| 245 | -- case_insensitive_regex: sets regex case sensitivity | ||
| 246 | case_insensitive_regex = false, | ||
| 247 | }) | ||
| 248 | |||
| 249 | -- change the highlight style | ||
| 250 | vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" }) | ||
| 251 | vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" }) | ||
| 252 | vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" }) | ||
| 253 | |||
| 254 | --- auto update the highlight style on colorscheme change | ||
| 255 | vim.api.nvim_create_autocmd({ "ColorScheme" }, { | ||
| 256 | pattern = { "*" }, | ||
| 257 | callback = function(ev) | ||
| 258 | vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" }) | ||
| 259 | vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" }) | ||
| 260 | vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" }) | ||
| 261 | end | ||
| 262 | }) | ||
| 190 | EOF | 263 | EOF |
| 191 | 264 | ||
