Update highlight method in init.lua

In nvim 0.10.2, the vim.hl.on_yank() method has been renamed to vim.highlight.on_yank()

This causes the error
Error detected while processing TextYankPost Autocommands for "*":
Error executing lua callback: /home/user/xdg.configFile/nvim/init.lua:218: attempt to index field 'hl' (a nil value) stack traceback: /home/user/xdg.configFile/nvim/init.lua:218: in function </home/user/xdg.configFile/nvim/init.lua:217>
This commit is contained in:
Venix 2025-06-06 23:31:29 +05:00 committed by GitHub
parent 3338d39206
commit 598bf30006
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.hl.on_yank()
vim.highlight.on_yank()
end,
})