Commit Graph

6602 Commits (4dd4ba798c57199b24d0e272941229a7e99db98a)

Author SHA1 Message Date
Michael Davis 4dd4ba798c
Update tree-sitter-rust-format-args
Update repo name and move to latest commit which includes a license
2025-06-06 11:21:26 -04:00
Skyler Hawthorne ca4ae7f287
set working dir of the lsp command to workspace root (#13691) 2025-06-06 10:16:36 -05:00
Matt Conway d375f1e7f4
syntax: add grammar and highlighting for the alloy config lang (#13660) 2025-06-06 10:02:30 -05:00
Michael Davis 8d2870b94a
Reuse content buffer in JSONRPC recv for LSP and DAP
Previously `recv` for new messages from the language server or debug
adapter allocated a fresh Vec for each message. Instead we can reuse
the buffer. This resolves TODO comments.

Co-authored-by: Rolo <roloedits@gmail.com>
2025-06-06 10:19:33 -04:00
Michael Davis f6878f62f7
Set enableDiagnostics in prisma-language-server config
Without this key `prisma-language-server` currently crashes during
initialization. See #13662.
2025-06-03 10:08:49 -04:00
Ryan Mehri 6c43dc4962
fix: trim whitespace up to the last selection on insert_newline (#13673) 2025-06-03 08:45:19 -05:00
dependabot[bot] 1ea9050a5e
build(deps): bump the rust-dependencies group with 2 updates (#13676)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 18:27:22 -05:00
Nik Revenco 2baff46b25
fix: Some Incorrect Rust highlights (#13657)
Co-authored-by: Nik Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-05-31 09:43:19 -05:00
Jonas Köhnen 921ca08e1b
highlights/go: fix locals clashing with variable.other.member (#13644) 2025-05-31 09:41:19 -05:00
Jeff Bencin 17fb12bcf3
feat: Add Clarity language support (#13647) 2025-05-31 09:11:16 -05:00
Michael Davis 67f1fe20c3
Fix command line completion replacement for quoted items
With a directory with spaces in the name (for example
`mkdir -p 'Temp/Abc Def'`), completing `Temp/Ab` would create a
completion item `'Temp/AbAbc Def'`. Now it correctly completes
`'Temp/Abc Def'`
2025-05-31 09:56:54 -04:00
Michael Davis 8961ae1dc6
Consistently use `helix_core::config::default_{lang,config}_loader`
This avoids using any custom configuration in a user-defined
`languages.toml` config for the syntax test cases. The test cases should
only use the builtin `languages.toml` config.

Also the xtask crate reimplemented `default_lang_loader` and
`default_lang_config`. These functions are replaced with calls into
`helix_core`.
2025-05-29 09:55:26 -04:00
Tino 3366db0afb
Add Ty language server (#13643) 2025-05-29 08:34:23 -05:00
Erasin Wang 733ebcdaeb
Add file indentation style for statusline (#13632) 2025-05-29 08:20:22 -05:00
CalebLarsen 2bd7452fe0
Make signature_help more like hover, fix overflow and lack of scrolling in signature_help (#13566)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-05-27 10:18:12 -05:00
CalebLarsen 7dcddf98c6
Append changes to history on jumps (#13619)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-05-27 09:44:47 -05:00
dependabot[bot] c9e7b0f84f
build(deps): bump the rust-dependencies group with 2 updates (#13621)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 08:39:15 -05:00
Axlefublr 2fbe7fc5b5
fix(doc): missing capitalization of `goto_{next,prev}_tabstop` (#13616) 2025-05-26 08:48:32 -05:00
Zhaith Izaliel 12523cd126
fix: fix support for grammar overlays and include predicate (#13603) (#13613) 2025-05-26 08:47:14 -05:00
Binh Tran 8d58f6ce8d
fix(highlights/ungrammar): improve UX (#13607) 2025-05-25 08:47:10 -05:00
Michael Davis 702a961517
Fix `try_restore_indent` on non-LF documents
On Windows for example the behavior of this function typically diverges
from the usual behavior on Unix. Instead of checking that the inserted
string starts with `'\n'` (untrue for for CRLF line endings) we need to
check that the first grapheme cluster in the string is a line ending.
(All line endings are single grapheme clusters.)
2025-05-24 11:42:29 -04:00
Nik Revenco 1023e8f964
feat: highlight rust string interpolation macros that use `format_args!` (#13533)
Co-authored-by: Nik Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-05-24 10:02:32 -05:00
Saheed Adeleye 223ceec10a
Add an `--insensitive`/`-i` flag for `:sort` (#13560)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-05-24 09:55:48 -05:00
Christian Fredrik Johnsen cb1ec1b27e fix(tutor): replace unexisting and non existing with nonexistent
Sounds more natural to me.
Just a spelling change.
2025-05-24 10:29:46 -04:00
Christian Fredrik Johnsen 4098151591 fix(tutor): fix typos in section 11.2
Minor grammar fix and add missing word.
2025-05-24 10:29:46 -04:00
Christian Fredrik Johnsen 1edf98262c fix(tutor): recommend `e` instead of `w` for selecting word
I was doing the tutorial to learn Helix, and it's more sensible to use
`e` than `w`.

If you're using `w`, you will need to add an extra space.
Example, assuming cursor is at |:

This sentence has incorrect words |behind it.

If you use `wc`, then you will get:
This sentence has incorrect words |it.

while `ec` will give you
This sentence has incorrect words | it.

Which enables you to drop removing and adding a space for no reason.
2025-05-24 10:29:46 -04:00
Ricardo Fernández Serrata 237d875e7d
docs(building-from-source): suggest optimized install cmd as alternative (#13553) 2025-05-24 09:24:09 -05:00
Kris Warner b70b8df916
Add matching cursor to nord theme (#13574) 2025-05-24 09:22:23 -05:00
Binh Tran ae0dd313bd
fix(highlights/ini): make consistency with toml (#13589) 2025-05-22 08:52:51 -05:00
Jérôme Tamba 76029e5840
health: Use lsp name in output wherever possible (#13573)
Also match the DAP/Formatter output style to the LSP style
2025-05-21 09:38:16 -05:00
dependabot[bot] 3a6c9747b8
build(deps): bump the rust-dependencies group with 3 updates (#13576)
Bumps the rust-dependencies group with 3 updates: [bitflags](https://github.com/bitflags/bitflags), [hashbrown](https://github.com/rust-lang/hashbrown) and [cc](https://github.com/rust-lang/cc-rs).


Updates `bitflags` from 2.9.0 to 2.9.1
- [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.9.0...2.9.1)

Updates `hashbrown` from 0.15.2 to 0.15.3
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/commits/v0.15.3)

Updates `cc` from 1.2.22 to 1.2.23
- [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.22...cc-v1.2.23)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-version: 2.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: hashbrown
  dependency-version: 0.15.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: cc
  dependency-version: 1.2.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 21:03:55 +09:00
CalebLarsen ebf96bd469
Updated python/locals.scm to label `self` and `cls` as `variable.buitin` (#13552) 2025-05-17 09:43:21 -05:00
Michael Davis 5a1dcc2429
syntax: Reset query cursor byte range for textobjects
`InactiveQueryCursor::new` might reuse a query cursor from a
thread-local cache if one is available, rather than create a new cursor.
Currently tree-house does not reset cached cursors back to defaults
(i.e. byte range and match limit). For now we can patch around this here
but eventually this should be fixed in `tree-house` upstream. Then this
patch can be reverted.

In practice this caused textobjects like `]f` to get "stuck" trying to
move to the next function if it was out of the current view. This is
because the highlight query cursor sets the range of the cursor to the
current viewport. We can reset the byte range to defaults to fix the
textobject behavior.
2025-05-17 10:30:30 -04:00
Michael Davis be1bf2f909
CI: Set a timeout for the test suite workflow
The integration tests have recently become a bit flaky in that
individual tests can seem to hang forever. This needs further
investigation. In the meantime we should limit the total allowed time
for the test workflow to something reasonably low. The default timeout
is a very high 360min.
2025-05-17 09:16:14 -04:00
Michael Davis 05ae617e1c
queries: Reorder Slint and HTML injections in Rust
This fixes injections of Slint and HTML in Rust macros. These patterns
must be moved after the generic `(macro_invocation (token_tree))`
pattern since they are more specific, and later patterns now take
priority.

See <https://redirect.github.com/helix-editor/helix/pull/12972#issuecomment-2888300442>.
2025-05-17 08:48:01 -04:00
CalebLarsen e606652a96
Removed unnecessary apostrophe in keymap.md (#13551) 2025-05-17 07:43:27 -05:00
CalebLarsen df02ef6a99
Update tree-sitter-haskell (#13475) 2025-05-17 07:42:52 -05:00
Michael Davis 3ceae88c3a
Use 'ui.text' as a base style for the syntax highlighter
This fixes a regression from the refactor of the highlighters when
switching to tree-house. The old `StyleIter` used `renderer.text_style`
as the base style rather than `Style::default()` for syntax highlights.
The result was that any text not captured by a syntax highlight query
was styled with no foreground or background, defaulting to the
terminal's foreground/background. This could cause text in markdown
files to look off-colored depending on your terminal configuration.
(Though you wouldn't notice if your 'ui.text' theming matches your
terminal's theming.)
2025-05-16 10:52:47 -04:00
Nguyễn Hồng Quân b4e51ef895
More glob to detect gitattributes file (#13540) 2025-05-16 09:32:29 -05:00
Rock Boynton f157a918a3
Show the primary selection index on statusline (#12326)
Co-authored-by: Rock Boynton <rboynton@anduril.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-05-15 07:53:02 -05:00
Michael Davis a7c3a43069
Bump tree-house-bindings to v0.1.1 to fix IllumOS build
See <https://redirect.github.com/helix-editor/tree-house/issues/8>.
2025-05-15 08:33:10 -04:00
Michael Davis 702b1d0a0f
statusline: Avoid unnecessary allocations for `&'static str` spans
Previously the statusline `write` function only accepted a string
and optional Style, so all rendering functions converted text to
strings. Some elements write spans with `&'static str`s, however, making
this unnecessary since `Span<'a>` is a wrapper around `Cow<'a, str>` and
style, and a `Span<'static>` would outlive all required lifetimes.

Moreover many elements could produce `Span<'a>` according to the
lifetime in `RenderContext` in the future, potentially re-borrowing from
the Editor borrow, so this change could save allocations for many
file-type elements (with more future changes). This is not explored in
this patch since the statusline functions currently add bespoke padding
per-element, but with a future refactor to make spacing consistent this
could be possible.

This change refactors the write function to accept a `Span<'a>` and
rewrites some related code to fit the codebase better (preferring `for`
to iterator's `for_each` for example). The new code is more complicated
lifetime-wise but avoids allocations in these cases:

* spacer for mode name when a pane is not focused
* LSP spinner frames
* '●' (workspace) diagnostic indicators
* " W " workspace diagnostic prefix
* file modification indicators
* read-only indicators
* spacer element

... and opens the door to avoid allocation for file name elements in the
future.
2025-05-15 08:33:02 -04:00
Michael Davis b0528bbac4
statusline: Avoid showing only 'W' in workspace-diagnostics element
If you configure a subset of severities to show in the workspace
diagnostics statusline element you can see the 'W' (and surrounding
space) without any diagnostic indicators. This is the case by default
as it's configured to show warnings and errors only - if you have only
hints in your workspace like if you open `application.rs` in Helix for
example then you would see the 'W' and no indicators.

This change checks that any of the configured diagnostics are non-zero
and bails early if there are none.
2025-05-14 17:33:21 -04:00
Michael Davis 09bc67ad6d
syntax: Fix language detection by shebang
The switch to tree-house accidentally dropped some shebang parsing code
from the loader's function to detect by shebang. This change restores
that. The new code is slightly different as it's using a `regex_cursor`
regex on the Rope rather than eagerly converting the text to a
`Cow<str>` and running a regular regex across it.
2025-05-14 16:30:29 -04:00
zoey 6be38642f4
Add nyxvamp themes (#12185) 2025-05-14 08:52:00 -05:00
Michael Davis f46222ced3
Revert "feat: Highlight Rust String interpolation macros"
This reverts commit 9bb80a74e1.
2025-05-13 19:52:48 -04:00
Nikita Revenco 9bb80a74e1
feat: Highlight Rust String interpolation macros
Fixes #5845
2025-05-13 19:31:42 -04:00
Michael Davis be1cf090c3
queries: Inject markdown into Rust doc comments
Co-authored-by: Nik Revenco <154856872+nik-rev@users.noreply.github.com>
2025-05-13 19:01:10 -04:00
Michael Davis a3b64b6da2
queries: Rewrite all locals 2025-05-13 19:01:10 -04:00
Michael Davis aea53523dd
Replace tree-sitter with tree-house 2025-05-13 18:43:43 -04:00