Skip to content

feat: Determine comment tokens from injection layers #12759

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

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
48dec3e
chore: add testing files
nik-rev Jan 31, 2025
70f27b3
feat: add function to get LanguageConfiguration from a LayerId
nik-rev Jan 31, 2025
38bede2
feat: add new params
nik-rev Feb 1, 2025
8fe3f90
feat: use FnMut
nik-rev Feb 1, 2025
b10fc21
chore: clean up code
nik-rev Feb 1, 2025
d719f15
feat: gain access to injection-specific line and block comment tokens
nik-rev Feb 1, 2025
29e0a00
feat: implement toggle comment for the simplest case
nik-rev Feb 1, 2025
544e460
feat: implement toggle comment funcitonality for multiple comment tokens
nik-rev Feb 1, 2025
371dec3
feat: block comment toggle and single line comment toggle
nik-rev Feb 1, 2025
de7884c
test: uncomment previosly skipped tests
nik-rev Feb 1, 2025
0a88210
fix: restore selections when created comment
nik-rev Feb 1, 2025
7c24110
feat: add integration tests for commenting through injection layers
nik-rev Feb 1, 2025
621dec7
test: write more tests for toggle comment, and add tests for toggle b…
nik-rev Feb 1, 2025
b94d3a7
fix: multiple selections having incorrect range and not properly acco…
nik-rev Feb 1, 2025
5562e7a
chore: add announcement file for PR
nik-rev Feb 1, 2025
31e2f73
fix: panic as no ranges were inserted
nik-rev Feb 2, 2025
76b3e67
chore: remove log statement
nik-rev Feb 2, 2025
bbd7cb7
fix: incorrect order of index additions
nik-rev Feb 2, 2025
7a39fb8
refactor: rename variable
nik-rev Feb 2, 2025
13b52e9
refactor: rename variables ,use iterator methods, separate vars for a…
nik-rev Feb 2, 2025
ee0f224
chore: add brainstorm thoughts
nik-rev Feb 2, 2025
570911e
fix: many single width selections panic
nik-rev Feb 2, 2025
ad3f9ec
chore: remove unneeded files
nik-rev Feb 2, 2025
c22eba3
chore: move all comment integration tests into a separate module
nik-rev Feb 2, 2025
3714fc0
chore: remove unused imports
nik-rev Feb 2, 2025
6e451fe
chore: remove useless file
nik-rev Feb 2, 2025
63fb49c
chore: clean up code
nik-rev Feb 2, 2025
093805b
perf: get rid of a `.clone()`
nik-rev Feb 2, 2025
e968338
refactor: extract a separate toggle_comment_impl function
nik-rev Feb 2, 2025
7d53290
fix: panic
nik-rev Feb 3, 2025
99d1617
fix: commenting full lines
nik-rev Feb 3, 2025
d451077
feat: add typable command to get injection layer for current range
nik-rev Feb 3, 2025
56dedd1
fix: add `regex` to ignored layer configs
nik-rev Feb 3, 2025
92469b4
docs: add information on `tree-sitter-injection`
nik-rev Feb 3, 2025
37f8cbe
feat: upgrade `tree-sitter-injection` to show injections for entire file
nik-rev Feb 3, 2025
4bb3345
feat: improve presentation of tree-sitter-injections
nik-rev Feb 3, 2025
5b30bfe
fix: YAML formatting issues with injections
nik-rev Feb 3, 2025
c727554
feat: continue comment uses injected comment tokens
nik-rev Feb 3, 2025
4c5ceb5
test: add test for continuing comment in injection layers
nik-rev Feb 3, 2025
18aaf93
chore: remove Clone derive from Syntax
nik-rev Feb 3, 2025
ec94fbd
refactor: collapse 2 `map` intoa a single `map`
nik-rev Feb 3, 2025
a07819b
refactor: remove `pub`, use a getter instead
nik-rev Feb 5, 2025
c3829c3
fix: call geter instead of trying to access private field
nik-rev Feb 5, 2025
f18a2d7
refactor: do not use pointless assertion
nik-rev Feb 6, 2025
f8a38a1
fix: crash when using block comment if no block comment but yes line …
nik-rev Feb 10, 2025
d09f773
feat: fix merge conflicts
nik-rev Feb 28, 2025
d0ca96c
Merge branch 'master' into determine-comment-tokens
nik-rev May 14, 2025
77a74fe
feat: solve merge conflicts and make tests more modular
nik-rev May 14, 2025
f07e697
fix: do not consider languages that do not have comment tokens
nik-rev May 14, 2025
96f8c58
chore: use my tree-house fork
nik-rev May 14, 2025
600bdae
chore: update to new version of my PR to tree-sitter
nik-rev May 15, 2025
c7dd5c1
chore: move comment to a doc comment
nik-rev May 15, 2025
76fb79e
chore: update version of my PR
nik-rev May 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ package.helix-tui.opt-level = 2
package.helix-term.opt-level = 2

[workspace.dependencies]
tree-house = { version = "0.1.0", default-features = false }
tree-house = { git = "https://github.com/nik-rev/tree-house", rev = "a6c231c7f935eed9015ae7ef500dc99e4fa15c93", default-features = false }
nucleo = "0.5.0"
slotmap = "1.0.7"
thiserror = "2.0"
Expand Down
1 change: 1 addition & 0 deletions book/src/generated/typable-cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
| `:lsp-stop` | Stops the given language servers, or all language servers that are used by the current file if no arguments are supplied |
| `:tree-sitter-scopes` | Display tree sitter scopes, primarily for theming and development. |
| `:tree-sitter-highlight-name` | Display name of tree-sitter highlight scope under the cursor. |
| `:tree-sitter-injections` | Display injected languages for the file. |
| `:debug-start`, `:dbg` | Start a debug session from a given template with given parameters. |
| `:debug-remote`, `:dbg-tcp` | Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters. |
| `:debug-eval` | Evaluate expression in current debug context. |
Expand Down
Loading