summaryrefslogtreecommitdiffstats
path: root/nvim
diff options
context:
space:
mode:
authorOmri Sarig <omri.sarig13@gmail.com>2025-05-11 02:29:04 +0200
committerGitHub <noreply@github.com>2025-05-10 20:29:04 -0400
commit3f6030ca05592e1c9c5173a0f27e3b15923a14c0 (patch)
treefafb7861cee2e3718b4f60af695ff5028180d04f /nvim
parente4a5bbeba9011db0f95e6e4f0e6ace4b26b7660c (diff)
downloaddots-3f6030ca05592e1c9c5173a0f27e3b15923a14c0.tar.gz
fix: rename vim.highlight.on_yank to vim.hl.on_yank (#1482)
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. Co-authored-by: Omri Sarig <omri.sarig@prevas.dk>
Diffstat (limited to 'nvim')
-rw-r--r--nvim/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/nvim/init.lua b/nvim/init.lua
index 8862343..a525623 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -123,12 +123,12 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
--- See `:help vim.highlight.on_yank()`
+-- See `:help vim.hl.on_yank()`
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.highlight.on_yank()
+ vim.hl.on_yank()
end,
})