Commit Graph

6335 Commits (c3e9a0d6078a36616dacb05e288d18ea2f94f2f7)

Author SHA1 Message Date
Michael Davis c3e9a0d607
Replace 'pkgbuild-language-server' with 'termux-language-server'
`pkgbuild-language-server` no longer exists and the PKGBUILD
functionality has moved to `termux-language-server`.
2025-02-12 10:51:07 -05:00
Jean-Louis Fuchs 258e3e1136
feat: Add support for the Ink programming language (#12773) 2025-02-12 09:46:50 -06:00
Michael Davis 5a66270c00
Remove typst-lsp config
typst-lsp has been deprecated in favor of tinymist.
2025-02-12 10:39:10 -05:00
Roberto Vidal 6aa82bb3f8
mark xsl files as XML (#12834) 2025-02-11 09:09:53 -06:00
dependabot[bot] 518d054fcb
build(deps): bump the rust-dependencies group with 4 updates (#12832)
Bumps the rust-dependencies group with 4 updates: [once_cell](https://github.com/matklad/once_cell), [toml](https://github.com/toml-rs/toml), [cc](https://github.com/rust-lang/cc-rs) and [which](https://github.com/harryfei/which-rs).


Updates `once_cell` from 1.20.2 to 1.20.3
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.20.2...v1.20.3)

Updates `toml` from 0.8.19 to 0.8.20
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.19...toml-v0.8.20)

Updates `cc` from 1.2.11 to 1.2.13
- [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.11...cc-v1.2.13)

Updates `which` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/7.0.1...7.0.2)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: toml
  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
- dependency-name: which
  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-02-11 14:53:29 +09:00
Matthew Mark Ibbetson 35faa73be1
Add Djot support (#12562) 2025-02-10 15:36:01 -06:00
Abhi 7a3470c48d
Add support for `yara` language (#12753) 2025-02-10 15:32:28 -06:00
Nikita Revenco 199dc05a04
fix: Align `Markdown` styles with tree sitter highlights (#12696)
Co-authored-by: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-02-10 14:58:39 -06:00
Michael Davis 5e2501da30
Reapply "Re-enable Hare by default (#11507)"
This reverts commit 151caeacc6.
2025-02-10 15:51:50 -05:00
Milo Moisson a03becf021
nix: add indent TS query (#12829)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-02-10 14:47:31 -06:00
Kristoffer Plagborg Bak Sørensen a6f94e04e6
feat: add mising pkgs.writers.write* nix tree-sitter injections (#12774) 2025-02-10 14:46:53 -06:00
Kristoffer Plagborg Bak Sørensen 2197b3cfa0
feat: add mising builtins.fromTOML nix tree-sitter injection (#12776) 2025-02-10 14:46:23 -06:00
Jaakko Paju a19c95a0a7
Add CSV language and syntax highlighting (#11973) 2025-02-10 10:51:06 -06:00
Xubai Wang ff012e844f
Fix Bash completion space regression (#12828) 2025-02-10 10:42:45 -06:00
Poliorcetics fcfa70e66c
just: bump grammar support to handle more kind of shebang injections (#12818) 2025-02-10 09:55:27 -06:00
Nikita Revenco 1b89f998e8
fix: Rust highlights (regression from the reverse-query-precedence PR) (#12795)
Co-authored-by: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-02-07 08:51:22 -06:00
Jonas Köhnen c36ed6ad92
feat(themes): add `ui.text.directory` to gruber-darker (#12797) 2025-02-06 09:31:36 -06:00
Michael Davis 18b9eb9e06
Update tree-sitter-erlang
This is for packaging reasons, previously the license identifier in
`package.json` accidentally listed MIT instead of Apache-2.0
2025-02-05 20:22:38 -05:00
Gabriel Dinner-David b0e1eaf50d
reverse zig highlights (#12777) 2025-02-04 20:38:15 -06:00
Drew Zemke a36730cb21
add support for the FGA language (#12763) 2025-02-04 11:06:22 -06:00
uncenter 75abc23428
Add Tera templating language support (#12756) 2025-02-04 10:56:36 -06:00
Michael Davis 313a6479b1
LSP: Properly discard out-of-date diagnostics
Previously the `filter` caused the diagnostics to not be attached to the
document - which is good - but the out-of-date diagnostics were still
inserted into the global (editor-wide) diagnostic set. Instead we should
completely discard out-of-date diagnostics.
2025-02-04 10:39:49 -05:00
Michael Davis 62625eda46
LSP: Move diagnostic handling from Application to Editor
There is no functional change to the move - it's just moving the code
into helix-view under a new method `Editor::handle_lsp_diagnostics` -
thought there is a typo fix, the removal of an unnecessary clone (for
the document's language config) and the removal of some nesting.

Co-authored-by: Sofus Addington <sofus@addington.dk>
2025-02-04 10:39:42 -05:00
Michael Davis 16ff06370f
queries: Remove `(ERROR)` from all highlights
We do not highlight `(ERROR)` nodes since the highlighting is quite
noisy while typing. Also see todo comments in `syntax.rs` - we could
introduce configuration in the future to prepend `(ERROR)` to a
language's highlights query.
2025-02-04 09:35:38 -05:00
Robin Heggelund Hansen ee33a84489
Update highlights.scm for Gren language (#12769) 2025-02-04 08:34:59 -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 26db54155e
DAP: Drain pending requests on recv failure
This matches <https://redirect.github.com/helix-editor/helix/pull/4852>
for the DAP transport: when there is a failure to receive a message from
the debugger we should drain all pending requests and respond to them
with the StreamClosed error.

This improves the behavior when a debugger fails to initialize, for
example starting debugpy without debugpy installed. Previously the UI
would freeze until the request timed out. Now it instantly prints a
statusline error saying that the debugger failed to start up.
2025-02-04 09:09:54 -05:00
Michael Davis d456377821
minor: Remove double BufReader wrapper in DAP client
`reader` is already a `BufReader` so there's no need to wrap it in
another `BufReader`. This is a typo/mistake made possible by the type
erasure (a `Box<BufReader<BufReader<T: Read>>>` is also a boxed reader).
2025-02-04 08:52:09 -05:00
Michael Davis d0d16931e3
DAP: Configure child process stderr as piped
By default this is `Stdio::inherit` which sends stderr from the child
process to Helix. Instead we should use `Stdio::piped` which allows us
to read the piped output.

We can also expect that the stderr opens now (it should similarly to
stdout), so that we always start a reader for stderr like the LSP
client.
2025-02-04 08:51:46 -05: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 066e938ba0
Add `copy_between_registers` for interactive register copying 2025-02-02 20:49:25 -05:00
Michael Davis e882a750ea
commands: Eagerly clear autoinfo in select_register, insert_register
This causes the infobox to disappear even when you type a non-character
key like escape. For example `"<esc>` now clears the infobox where
before it was left hanging.
2025-02-02 20:45:25 -05:00
Michael Davis ebdab86ce6
minor: Prefer stable `core::num::abs_diff` to polyfill
This function was made stable in Rust 1.60.0 so we no longer need to
polyfill.
2025-02-02 20:42:55 -05:00
jack ab6a92ed49
update(theme): add virtual-inlay hint highlight to snazzy theme (#11089) 2025-02-02 19:02:48 -06:00
Viktor Szépe e22bbf5489
Fix typos (#12690) 2025-02-02 18:58:29 -06:00
Leo Unglaub 0ab403d428
Add block comment configuration for PHP 2025-02-02 19:37:13 -05:00
Michael Davis b8bfc44e42
queries: Improve Rust const generic and '_' type highlighting
You may pass constants as type arguments the const generics feature.
This is used in spellbook for example as a poor man's enum, for example
`self.strip_suffix_only::<FULL_WORD>(word, hidden_homonym)`. With this
change that `FULL_WORD` part is highlighted as a constant instead of
a type.

This change also highlight the underscore in type placeholders - this
is similar to the highlighting done for bindings in Elixir or Erlang
for example. In `Vec<_>` the underscore is highlighted the same as a
comment.
2025-02-02 19:28:01 -05: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 382401020c
queries: Add 'not-eq' and 'not-match' predicates to TSQ highlights 2025-02-02 18:39:07 -05:00
Michael Davis 93fa990e56
queries: Fix module/namespace highlight in Unison 2025-02-02 18:39:07 -05: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
Michael Davis 369f2bb93d
ui: Expose the 'prompt' module
The prompt Completion type alias is otherwise private. This will be
used in <https://redirect.github.com/helix-editor/helix/pull/12527>
to refactor some functions to return prompt completions.
2025-02-01 21:12:20 -05:00
Doug Kelkhoff 0f594c35f2
feat(lang:r): Add roxygen header comment token (#12748) 2025-02-01 19:44:07 -06:00
Remo Senekowitsch de11273857
Document installation of rust-analyzer via rustup (#12618) 2025-02-01 19:43:20 -06:00
Pascal Kuthe 5c1f3f814f
implement incomplete completion requests 2025-02-01 19:36:10 -05:00
Pascal Kuthe 4e0fc0efc6
Add a completion handler type in helix-view for tracking responses
This will replace the `Sender<CompletionEvent>` in the child commits.
It tracks sender alongside extra metadata about the responses received
from providers - namely whether a request is incomplete or not - which
can be reused between subsequent requests to the provider.
2025-02-01 19:35:58 -05:00
Michael Davis 1ab35ade2d
minor: Move `CompletionEvent` to a new completion handler module
Completions are not specific to LSP anymore. In the child commits we
will expand on the types in this module so this refactor is done
eagerly to minimize changes later.
2025-02-01 19:32:37 -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
Michael Davis f0fa905622
LSP: Eagerly send requests in `Client::request`
This is a similar change to the parent commit but for `request`. The
requests should be sent eagerly so that the ordering stays consistent.

Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
2025-02-01 19:32:37 -05:00
Michael Davis 5532ef35d9
LSP: Remove future wrapper from `Client::notify`, `Client::reply`
Previously LSP notifications were sent within a future and most callers
used a `tokio::spawn` to send the notification, silently discarding any
failures like problems serializing parameters or sending on the channel.
It's possible that tokio could schedule futures out of intended order
though which could cause notifications where order is important, like
document synchronization, to become partially shuffled. This change
removes the future wrapper and logs all internal failures.

Also included in this commit is the same change for `Client::reply`
which was also unnecessarily wrapped in a future.

Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
2025-02-01 19:32:37 -05:00