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

Treesitter parameter highlighting only works when definition is visible on screen #2285

Closed
rosvall opened this issue Apr 26, 2022 · 1 comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue

Comments

@rosvall
Copy link

rosvall commented Apr 26, 2022

Summary

I'm trying to get parameter highlighting working. I can only make it work when parameter definition is visible.

I'm guessing helix is only running the visible text through tree-sitter.
Is this is on purpose or a bug?

Screenshots:

  1. GOOD: Parameter parameter defined on line 3 correctly underlined both on line 3 and when referenced on line 11.
    screenshot_1

  2. BAD: Viewport scrolled so definition isn't visible. Reference no longer underlined.
    screenshot_2

Reproduction Steps

Reproduction for javascript:

  1. Copy-paste contents of
    runtime/queries/javscript/highlight-params.scm
    in to the top of
    runtime/queries/javscript/highlight.scm
  2. Add a
    "variable.parameter" = {modifiers=["underlined"]}
    rule to your theme.

Helix log

No response

Platform

Linux

Terminal Emulator

xfce4-terminal (vte)

Helix Version

helix 22.05-dev

@rosvall rosvall added the C-bug Category: This is a bug label Apr 26, 2022
@the-mikedavis
Copy link
Member

Duplicate of #1151

@the-mikedavis the-mikedavis marked this as a duplicate of #1151 Apr 26, 2022
@the-mikedavis the-mikedavis added the R-duplicate Duplicated issue: please refer to the linked issue label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue
Projects
None yet
Development

No branches or pull requests

2 participants