Skip to content
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

feat(utils): enhance inlay hint spacing calculation #95

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

tris203
Copy link
Owner

@tris203 tris203 commented Nov 25, 2024

  • Updated calc_ws_offset to handle different inlay hint label types
  • Added tests for Lua and Rust style inlay hints
  • Included padding adjustments for inlay hints

Fixes #94

- Updated `calc_ws_offset` to handle different inlay hint label types
- Added tests for Lua and Rust style inlay hints
- Included padding adjustments for inlay hints
@NobbZ
Copy link

NobbZ commented Nov 26, 2024

image

Yeah this works for rust

image

And lua.

Even though I now realise a small effect in lua… That I have in rust as well.

The lua screenshot even shows its effect… The cursow was on die d of @diagnostic then I used leap.nvims jump to get on the l of line as visible on the screenshot, but the precognition did not update, and wont till I use regular movements or hit ESC once.

I am not sure if that is worth another ticket, or if this might be even a bug in leap to not report the jump properly…

If I jump to a different line, precognition updates properly.

@tris203
Copy link
Owner Author

tris203 commented Nov 26, 2024

A new issue is fine. Although I suspect it might be leap not reporting the cursor moved event properly.

I will merge this for inlay hints

@tris203 tris203 merged commit 531971e into main Nov 26, 2024
10 checks passed
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.

Jumphints are "off" when something injects virtual text into the line (like LSPs inlay hints)
2 participants