Skip to content

Commit 2d5a9ae

Browse files
author
Omri Sarig
committed
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.
1 parent d350db2 commit 2d5a9ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ vim.api.nvim_create_autocmd('TextYankPost', {
210210
desc = 'Highlight when yanking (copying) text',
211211
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
212212
callback = function()
213-
vim.highlight.on_yank()
213+
vim.hl.on_yank()
214214
end,
215215
})
216216

0 commit comments

Comments
 (0)