Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(neovim): fix 0.12 deprecation warning#31

Merged
Arthurdw merged 1 commit into
Arthurdw:mainfrom
lukeburong:fix/nvim-0.12-deprecation
Apr 8, 2026
Merged

fix(neovim): fix 0.12 deprecation warning#31
Arthurdw merged 1 commit into
Arthurdw:mainfrom
lukeburong:fix/nvim-0.12-deprecation

Conversation

@lukeburong
Copy link
Copy Markdown
Contributor

@lukeburong lukeburong commented Apr 7, 2026

The LSP plugin for Neovim currently causes a deprecation warning in Neovim >= 0.12:

vim.lsp.semantic_tokens.start is marked as deprecated in Neovim 0.12 and replaced by vim.lsp.semantic_tokens.enable(true).

The semantic token highlighting engine is started automatically when a client is attached to the buffer which makes the call to this function unnecessary, and therefore the entire on_attach wrapper can be removed.

Summary by CodeRabbit

  • Refactor
    • Removed automatic semantic tokens initialization from the setup process. Users requiring this feature will need to configure it independently.

`vim.lsp.semantic_tokens.start` is marked as deprecated in Neovim 0.12 and
replaced by `vim.lsp.semantic_tokens.enable(true)`.

The semantic token highlighting engine is started automatically when a client
is attached to the buffer which makes the call to this function unnecessary,
and therefore the entire on_attach wrapper can be removed.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fe392f24-2424-4e4d-aeee-5bd40a241c06

📥 Commits

Reviewing files that changed from the base of the PR and between f5a1a8b and 1a64a5c.

📒 Files selected for processing (1)
  • lua/rovo/init.lua
💤 Files with no reviewable changes (1)
  • lua/rovo/init.lua

📝 Walkthrough

Walkthrough

Removed wrapper logic from M.setup() that previously injected LSP semantic token initialization and chained user-provided on_attach callbacks. The function now passes options directly to lsp.rovo_lsp.setup() without these intermediate behaviors.

Changes

Cohort / File(s) Summary
LSP Setup Wrapper Removal
lua/rovo/init.lua
Deleted 15 lines of wrapper logic that handled semantic token initialization for LSP clients and callback chaining. The setup() function now delegates directly to lsp.rovo_lsp.setup() without intercepting or modifying the on_attach option.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A wrapper's gone, the path is clear,
Options flow without a tear,
Semantic tokens find their place,
In simpler code, we see the grace!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: removing deprecated semantic token code to fix Neovim 0.12 deprecation warnings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Arthurdw Arthurdw self-requested a review April 8, 2026 09:25
@Arthurdw Arthurdw added the enhancement New feature or request label Apr 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.43%. Comparing base (f5a1a8b) to head (1a64a5c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #31   +/-   ##
=======================================
  Coverage   92.43%   92.43%           
=======================================
  Files          17       17           
  Lines        5529     5529           
=======================================
  Hits         5111     5111           
  Misses        418      418           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Arthurdw
Copy link
Copy Markdown
Owner

Arthurdw commented Apr 8, 2026

Tested, and seems to indeed be redunant, also on 0.11

Thanks for the contribution <3

@Arthurdw Arthurdw merged commit 1f5744d into Arthurdw:main Apr 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants