-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: allow rules to be treesitter context aware When a rule is defined with the `:with_context()` method, has a specified filetype, and is operating in a buffer with a treesitter parser attached, the rule will only execute iff the treesitter language at the cursor matches one of the filetypes specified in the initial rule definition. > If there are no specified filetypes, of there is no parser attached to > the current buffer, the rule executes as normal * Add tests for treesitter context in markdown sample - Add 'ts_context markdown `*` success md_context' - Add 'ts_context codeblock `*` fail js_context'
- Loading branch information
1 parent
9fd4118
commit eac31b4
Showing
5 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Example Markdown File | ||
|
||
```javascript | ||
let; | ||
let; | ||
let; | ||
let; | ||
let; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters