-
-
Notifications
You must be signed in to change notification settings - Fork 226
fix: Ignore Java annotations #629
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,12 @@ | |
| ) @context | ||
|
|
||
| (method_declaration | ||
| type: (_) @context.start | ||
| body: (_) @context.end | ||
| ) @context | ||
|
|
||
| (constructor_declaration | ||
| name: (_) @context.start | ||
| body: (_) @context.end | ||
| ) @context | ||
|
Comment on lines
+10
to
13
|
||
|
|
||
|
|
@@ -15,6 +21,7 @@ | |
| ) @context | ||
|
|
||
| (class_declaration | ||
| name: (_) @context.start | ||
| body: (_) @context.end | ||
| ) @context | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_text_for_range()callsnvim_buf_get_text, but the new visibility guard (range[1] < contexts_end_row) can skip adding the context afterwards. Since the start row doesn’t change betweenrange0andrange, consider checkingrange0[1] < contexts_end_row(and/orrange_is_valid(range0)) before callingget_text_for_range()to avoid unnecessary buffer reads when@context.startis still in view (e.g., hidden annotations/attributes).