Compare commits

..

2 Commits

Author SHA1 Message Date
Omri Sarig
1b976fa754
Merge 2d5a9ae510a2284c6f1fafbd4dce3e6e2a429c16 into d350db2449da40df003c40d440f909d74e2d4e70 2025-04-19 13:53:03 +02:00
Omri Sarig
2d5a9ae510 fix: rename vim.highlight.on_yank to vim.hl.on_yank
The functions of vim.highlight were renamed to vim.hl on commit
18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied
with the release of nvim version 0.11.

Now, the use of vim.highlight is deprecated, and instead, one should
use vim.hl functions.
In practice, vim.highlight is still working, however, asking for help
for vim.highlight.on_yank fails (E149), while asking for help for
vim.hl.on_yank works as expected. So, by updating the used function, a
new user will have easier time looking getting the relevant help.
2025-04-19 13:52:50 +02:00

View File

@ -205,7 +205,7 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- Highlight when yanking (copying) text -- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode -- Try it with `yap` in normal mode
-- See `:help vim.hl.on_yank()` -- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', { vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text', desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),