Commit Graph

938 Commits (45dd3a6c96a863c1aebe589612c6ac523e400e13)

Author SHA1 Message Date
Nikita Revenco f8b9497dbc feat: do not introduce breaking changes 2025-02-28 15:07:44 +00:00
Nikita Revenco e6da544a71 refactor: variable name 2025-02-28 15:07:44 +00:00
Nikita Revenco ef2b035e01 refactor: increase readability
split logic into variables and add comments
2025-02-28 15:07:44 +00:00
Nikita Revenco d4e4049ab7 fix: add extra separator character if at camelCase boundary 2025-02-28 15:07:44 +00:00
Nikita Revenco 28b77e2ae3 fix: trim leading whitespace 2025-02-28 15:07:44 +00:00
Nikita Revenco 58177afb2a refactor: remove complex test helper definition, use for loop instead 2025-02-28 15:07:44 +00:00
Nikita Revenco fc199e3d8c refactor: remove unnecessary parameter 2025-02-28 15:07:44 +00:00
Nikita Revenco 47826f53a4 refactor: better function naming 2025-02-28 15:07:44 +00:00
Nikita Revenco 1821000acd refactor: extract common functions 2025-02-28 15:07:44 +00:00
Nikita Revenco 79d3e10c5c refactor: title camel and pascal into a single function 2025-02-28 15:07:44 +00:00
Nikita Revenco 3414183ab6 refactor: move functon 2025-02-28 15:07:44 +00:00
Nikita Revenco 820963cb90 fix: failing test is now fixed 2025-02-28 15:07:44 +00:00
Nikita Revenco 3cab65f330 fix: ignore leading whitespaces 2025-02-28 15:07:44 +00:00
Nikita Revenco 1df5cb6c0d fix: add separator on case change 2025-02-28 15:07:44 +00:00
Nikita Revenco 63161cee21 fix: incorrect test 2025-02-28 15:07:44 +00:00
Nikita Revenco 9047fafeae test: comment out failing tests 2025-02-28 15:07:44 +00:00
Nikita Revenco 75cd953c30 feat: correct implementation for pascal_case and camel_case 2025-02-28 15:07:44 +00:00
Nikita Revenco ff8c1df71d feat: correct implementations for kebab, snake and title case 2025-02-28 15:07:44 +00:00
Nikita Revenco f1cf46f022 feat: better implementation of title_case 2025-02-28 15:07:44 +00:00
Nikita Revenco c1be961b93 feat: implementations for kebab case and snake case 2025-02-28 15:07:44 +00:00
Nikita Revenco 42e150293a feat: `switch_to_title_case` 2025-02-28 15:07:44 +00:00
Nikita Revenco 63f82c7bfa feat: 5 functions to change case, lower, alternate, upper, pascal & camel 2025-02-28 15:07:44 +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
dependabot[bot] 48194825b9
build(deps): bump the rust-dependencies group with 3 updates (#12903)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 17:36:50 -06:00
Michael Davis ed3bc2b294
Remove unused dependencies
The dependabot file was matching on tree-sitter crates - that's a relic
from v0.6.0 and lower where grammars were regular dependencies.

The remaining changes are unused crates that were forgotten about during
shuffles like moving path canonicalization from helix-core to
helix-loader (and then again from helix-loader to helix-stdx).
2025-02-13 08:41:46 -05:00
Niklas Wallgren 1258111394
Print full error chain when failing to load grammar (#12744) 2025-02-04 08:18:54 -06:00
dependabot[bot] 8995ccaae2
build(deps): bump the rust-dependencies group with 4 updates (#12766)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 17:37:46 -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
RoloEdits 025719c1d8
perf(ropey): enable `simd` feature for `stdx` (#12735) 2025-01-30 19:51:34 -05: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
Michael Davis 39b72329b4
stdx: Add floor/ceil/is grapheme boundary functions to RopeSliceExt
These functions are the equivalent of 23b424a46 for grapheme clusters.
In order to add the `is_grapheme_boundary` function we also need to
query whether a byte index lies on a character boundary, so this change
also adds `is_char_boundary`.
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 27bb2447db
Use a workspace dependency for bitflags 2025-01-13 18:26:31 -05:00
dependabot[bot] 3d772afc8b
build(deps): bump the rust-dependencies group with 6 updates
Bumps the rust-dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.9` | `2.0.11` |
| [bitflags](https://github.com/bitflags/bitflags) | `2.6.0` | `2.7.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.134` | `1.0.135` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.42.0` | `1.43.0` |
| [rustix](https://github.com/bytecodealliance/rustix) | `0.38.42` | `0.38.43` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.2.7` | `1.2.9` |


Updates `thiserror` from 2.0.9 to 2.0.11
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.9...2.0.11)

Updates `bitflags` from 2.6.0 to 2.7.0
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.6.0...2.7.0)

Updates `serde_json` from 1.0.134 to 1.0.135
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.134...v1.0.135)

Updates `tokio` from 1.42.0 to 1.43.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.42.0...tokio-1.43.0)

Updates `rustix` from 0.38.42 to 0.38.43
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.42...v0.38.43)

Updates `cc` from 1.2.7 to 1.2.9
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.7...cc-v1.2.9)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-13 23:09:54 +00: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