Skip to content

fix(basics): use vim.hl.hl_op() on Neovim>=0.13 instead of on_yank#2424

Merged
echasnovski merged 1 commit into
nvim-mini:backlogfrom
abeldekat:hl_op
May 20, 2026
Merged

fix(basics): use vim.hl.hl_op() on Neovim>=0.13 instead of on_yank#2424
echasnovski merged 1 commit into
nvim-mini:backlogfrom
abeldekat:hl_op

Conversation

@abeldekat
Copy link
Copy Markdown
Member

Details:

  • Start using vim.hl.hl_op()

  • See PR 39777 in neovim/neovim

Copy link
Copy Markdown
Member

@echasnovski echasnovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This is even more thorough than I have made in my backlog :)

Comment thread lua/mini/basics.lua Outdated
Comment thread tests/test_basics.lua Outdated
@echasnovski
Copy link
Copy Markdown
Member

Also, would you mind using the commit message from 3197536 together with the link to the upstream PR from this PR? I think it is more useful here to be more explicit in the commit title than "react to ...".

@abeldekat
Copy link
Copy Markdown
Member Author

Done. Thanks!

Details:
- `vim.hl.on_yank` is deprecated in favor of a more general
  `vim.hl.hl_op`.
- See PR 39777 in neovim/neovim
@abeldekat abeldekat changed the title fix(basics): react to Nightly deprecating vim.hl.on_yank() fix(basics): use vim.hl.hl_op() on Neovim>=0.13 instead of on_yank May 20, 2026
@echasnovski echasnovski changed the base branch from main to backlog May 20, 2026 13:43
@echasnovski echasnovski merged commit 8b96785 into nvim-mini:backlog May 20, 2026
12 checks passed
@echasnovski
Copy link
Copy Markdown
Member

echasnovski commented May 20, 2026

Merged into a temporary branch to adjust it a bit. I missed that using |vim.hl.hl_op| is a bit premature currently, since it only exists for a couple of days. So the vast majority of users would have to use an "old" tag although they are on the latest stable release.

The solution is probably still use |vim.hl.on_yank()| as the "primary" tag until Neovim=0.12.x is the latest stable release.

I plan to merge the temporary branch tomorrow.

@abeldekat abeldekat deleted the hl_op branch May 20, 2026 13:57
@echasnovski
Copy link
Copy Markdown
Member

Should now be part of the latest main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants