Skip to content

fix: renamed vim.highlight.on_yank to vim.hl.on_yank #1482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2025

Conversation

omrisarig13
Copy link
Contributor

Firstly, thank you for an awesome project. I'm considering switching from vim to nvim, and this is a great help getting started with my configuration.

I didn't find a contributing guidelines, hope this PR is okay.
I've found a small use of a deprecated nvim function, so thought that it might help future users if we use the current (nvim 0.11+) version of the function. More info below.

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.

Copy link
Contributor

@oriori1703 oriori1703 left a comment

Choose a reason for hiding this comment

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

You should also change the comment above to -- See :help 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.
@omrisarig13 omrisarig13 force-pushed the to-upstream branch 2 times, most recently from 3ed68fe to 3ad0d61 Compare April 24, 2025 06:13
@omrisarig13
Copy link
Contributor Author

You should also change the comment above to -- See :help vim.hl.on_yank()

Good catch, fixed now.

@omrisarig13 omrisarig13 requested a review from oriori1703 April 24, 2025 06:14
Copy link
Contributor

@oriori1703 oriori1703 left a comment

Choose a reason for hiding this comment

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

LGTM

@feoh feoh merged commit 6ba2408 into nvim-lua:master May 11, 2025
1 check passed
r0xsh pushed a commit to r0xsh/nvim.init that referenced this pull request May 11, 2025
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 <[email protected]>
arsxhy pushed a commit to arsxhy/arsKickstart.nvim that referenced this pull request May 11, 2025
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 <[email protected]>
dribic pushed a commit to dribic/nvim-files that referenced this pull request May 11, 2025
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 <[email protected]>
Signed-off-by: Dejan Ribič <[email protected]>
@omrisarig13 omrisarig13 deleted the to-upstream branch May 12, 2025 06:36
kumiau pushed a commit to kumiau/kickstart.nvim that referenced this pull request May 12, 2025
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants