Nikita Revenco
a07819b497
refactor: remove `pub`, use a getter instead
2025-03-25 14:41:27 +00:00
Nikita Revenco
ec94fbdf3b
refactor: collapse 2 `map` intoa a single `map`
2025-03-25 14:41:27 +00:00
Nikita Revenco
18aaf93da0
chore: remove Clone derive from Syntax
2025-03-25 14:41:27 +00:00
Nikita Revenco
c72755437a
feat: continue comment uses injected comment tokens
2025-03-25 14:41:27 +00:00
Nikita Revenco
37f8cbed3c
feat: upgrade `tree-sitter-injection` to show injections for entire file
2025-03-25 14:41:27 +00:00
Nikita Revenco
56dedd10a7
fix: add `regex` to ignored layer configs
2025-03-25 14:41:27 +00:00
Nikita Revenco
d451077978
feat: add typable command to get injection layer for current range
2025-03-25 14:41:27 +00:00
Nikita Revenco
99d16170dc
fix: commenting full lines
2025-03-25 14:41:27 +00:00
Nikita Revenco
e9683381b6
refactor: extract a separate toggle_comment_impl function
2025-03-25 14:41:27 +00:00
Nikita Revenco
093805b62c
perf: get rid of a `.clone()`
2025-03-25 14:41:27 +00:00
Nikita Revenco
63fb49c1b4
chore: clean up code
...
chore: remove comment
2025-03-25 14:41:27 +00:00
Nikita Revenco
13b52e9d97
refactor: rename variables ,use iterator methods, separate vars for added and removed chars
2025-03-25 14:41:27 +00:00
Nikita Revenco
7a39fb8164
refactor: rename variable
2025-03-25 14:41:27 +00:00
Nikita Revenco
bbd7cb7bfb
fix: incorrect order of index additions
2025-03-25 14:41:27 +00:00
Nikita Revenco
76b3e6778d
chore: remove log statement
2025-03-25 14:41:27 +00:00
Nikita Revenco
31e2f739ee
fix: panic as no ranges were inserted
2025-03-25 14:41:27 +00:00
Nikita Revenco
b94d3a70e7
fix: multiple selections having incorrect range and not properly accounting for comment tokens
2025-03-25 14:41:27 +00:00
Nikita Revenco
0a882107ed
fix: restore selections when created comment
2025-03-25 14:41:27 +00:00
Nikita Revenco
de7884c7dd
test: uncomment previosly skipped tests
2025-03-25 14:41:27 +00:00
Nikita Revenco
371dec3774
feat: block comment toggle and single line comment toggle
2025-03-25 14:41:27 +00:00
Nikita Revenco
544e460ac4
feat: implement toggle comment funcitonality for multiple comment tokens
2025-03-25 14:41:27 +00:00
Nikita Revenco
29e0a00eb0
feat: implement toggle comment for the simplest case
2025-03-25 14:41:27 +00:00
Nikita Revenco
d719f1572b
feat: gain access to injection-specific line and block comment tokens
2025-03-25 14:41:27 +00:00
Nikita Revenco
b10fc21169
chore: clean up code
2025-03-25 14:41:27 +00:00
Nikita Revenco
8fe3f90cbb
feat: use FnMut
2025-03-25 14:41:27 +00:00
Nikita Revenco
38bede20ef
feat: add new params
2025-03-25 14:41:27 +00:00
Nikita Revenco
70f27b390d
feat: add function to get LanguageConfiguration from a LayerId
...
Co-authored-by: the-mikedavis <mcarsondavis@gmail.com>
2025-03-25 14:41:27 +00:00
Michael Davis
0efa8207d8
Rewrite command line parsing, add flags and expansions ( #12527 )
...
Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
2025-02-26 19:50:15 -06:00
Niklas Wallgren
1258111394
Print full error chain when failing to load grammar ( #12744 )
2025-02-04 08:18:54 -06:00
Michael Davis
5952d564d1
Reverse highlight precedence ordering ( #9458 )
...
Co-authored-by: postsolar <120750161+postsolar@users.noreply.github.com>
Co-authored-by: Iorvethe <58810330+Iorvethe@users.noreply.github.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: gabydd <gabydinnerdavid@gmail.com>
2025-02-02 18:17:10 -06:00
Michael Davis
70d452db3e
core: Make completion item documentation optional
...
Path completion items always have documentation but future core (i.e.
non-LSP) completions may not always have documentation - for example
word completion from the current buffer.
2025-02-01 21:24:25 -05:00
Pascal Kuthe
018081a5b1
core: Add a provider type to track the origin of a completion
2025-02-01 19:32:37 -05:00
rhogenson
17ffa38a5a
Use the first char in a grapheme for classification ( #12483 )
...
Co-authored-by: Rose Hogenson <rosehogenson@posteo.net>
2025-02-01 17:09:45 -06:00
Michael Davis
20151a5594
Move rope grapheme iterators from core to stdx
2025-01-27 09:24:40 -05:00
Michael Davis
51832b02c9
core: Remove unused byte index grapheme functions
2025-01-27 09:24:40 -05:00
RoloEdits
4ded712dbd
perf(syntax): short-circuit if name matches `language_id` ( #12407 )
2025-01-23 17:49:14 -06:00
Rolo
650af50c13
fix: typos
2025-01-23 15:18:16 -05:00
Rolo
c1d382a532
fix(lints): clippy 1.84
2025-01-23 15:18:16 -05:00
Nikita Revenco
168b11e091
feat: passing multile of the same files in the arguments places a cursor at each position ( #12192 )
...
Co-authored-by: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-01-23 14:04:02 -06:00
Michael Davis
cb0f201d0e
snippets: Discard placeholder text for the `$0` tabstop
2025-01-23 09:50:19 -05:00
Michael Davis
032dadaf37
snippets: Add a test case for parsing `${0:placeholder}`
...
This is an example snippet sent by older versions of clangd.
2025-01-23 09:50:19 -05:00
Michael Davis
76a8682c4d
syntax: Prefer `RopeSlice` for non-id language injection markers
...
The `Name` variant's inner type can be switched to `RopeSlice` since
the parent commit removed the usage of `&str`. In doing this we need to
switch from a regular `Regex` to a `rope::Regex`, which is mostly a
matter of renaming the type.
The `Filename` and `Shebang` variants can also switch to `RopeSlice`
which avoids allocations in cases where the text doesn't reside on
different chunks of the rope. Previously `Filename`'s `Cow` was always
the owned variant because of the conversion to a `PathBuf`.
2025-01-23 11:01:35 +09:00
Michael Davis
060255344c
syntax: Lookup up `(#set! injection.language "name")` props by ID
...
This splits the `InjectionLanguageMarker::Name` into two: one that
preforms the previous behavior (using the language configurations'
`injection_regex` fields and performing a match) and a new variant that
looks up directly by `language_id` with equality.
The old variant is used when capturing the injection language like we
do in the markdown queries for codefences. That captured text is part of
the document being highlighted so we might need a regex to recognize a
language like JavaScript as either "js" or "javascript". But the text
passed in the `(#set! injection.language "name")` property can be
looked up directly. This property is in the query code so there's no
need to be flexible in what we accept: we can require that the
`(#set! injection.language ..)` properties refer to languages by their
configured ID. This should save a noticeable amount of work for the
common case of injections: `(#set! injection.language)` is used much
more often than `@injection.language`.
2025-01-23 11:01:35 +09:00
Michael Davis
217818681e
Revert "refactor(shellwords)!: change arg handling strategy ( #11149 )"
...
This reverts commit 64b38d1a28
.
2025-01-06 12:39:53 -05:00
RoloEdits
64b38d1a28
refactor(shellwords)!: change arg handling strategy ( #11149 )
2025-01-05 12:18:30 -06:00
Michael Davis
4817bfa003
minor: fix syntax tree pretty print test
...
This case needs to be adjusted for the escaping added in 38e8382b
2025-01-02 15:44:04 -05:00
Michael Davis
38e8382b01
Escape double quotes for anonymous nodes in :tree-sitter-subtree
...
If the anonymous node contained a double quote it would throw off the
highlighting.
2025-01-02 15:33:48 -05:00
Pascal Kuthe
c8c0d04168
add snippet system to helix core
2024-12-17 13:34:39 -05:00
Pascal Kuthe
db959274d4
Add range type to helix stdx
2024-12-17 13:34:39 -05:00
Kieran Moy
e670970dd8
Change default comment token to # for unrecognized files ( #12080 )
...
* Change the default comment token
* update test
* keep the original
2024-12-05 01:11:39 +01:00