Commit Graph

6705 Commits (4dab0b54061a020a25413a69b6cbec075c32c5d6)

Author SHA1 Message Date
Michael Davis 4dab0b5406
Remove `Backend::get_cursor`
It is unused and cannot be used on some terminal hosts like `conhost`
that do not respond to VT queries. This doesn't have any affect on
behavior - I'm removing it so that we don't rely on it in the future.
2025-07-13 12:16:39 -04:00
Michael Davis 609a661207
Replace Crossterm with Termina
This change switches out the terminal manipulation library to one I've
been working on: Termina. It's somewhat similar to Crossterm API-wise
but is a bit lower-level. It's also influenced a lot by TermWiz - the
terminal manipulation library in WezTerm which we've considered
switching to a few times.

Termina is more verbose than Crossterm as it has a lower level interface
that exposes escape sequences and pushes handling to the application.
API-wise the important piece is that the equivalents of Crossterm's
`poll_internal` / `read_internal` are exposed. This is used for reading
the cursor position in both Crossterm and Termina, for example, but also
now can be used to detect features like the Kitty keyboard protocol and
synchronized output sequences simultaneously.
2025-07-13 12:16:39 -04:00
Michael Davis f1b3e4bb0d
tui: Refactor Config type handling in backends
The `Config` can be passed when creating the backend (for example
`CrosstermBackend::new`) and is already updated in the
`Backend::reconfigure` callback. Recreating the tui `Config` during
`claim` and `restore` is unnecessary and causes a clone of the editor's
Config which is a fairly large type. This change drops the `Config`
parameter from those callbacks and updates the callers. Instead it is
passed to `CrosstermBackend` which then owns it.

I've also moved the override from the `editor.undercurl` key onto the
tui `Config` type - I believe it was just an oversight that this was not
done originally. And I've updated the `From<EditorConfig> for Config`
to take a reference to the editor's `Config` to avoid the unnecessary
clone during `CrosstermBackend::new` and `Backend::reconfigure`.
2025-07-13 12:10:47 -04:00
Michael Davis 86f10ae24c
Add a language to fix Rust highlights in format-args macros
This is a bit hacky. Injections cannot stack on each other like
highlights because layers can have their own injections. So this new
language `rust-format-args-macro` emulates that. It unconditionally
injects `rust-format-args` into all strings. Rust injects this new
language into known format-args macros like `println!`.

The downside is that this can cause false-positive highlights within
these macros for strings which happen to contain format-args syntax

    println!("Hello, {}!", "{}");
    //               ^ format args syntax
    //                      ^ not format args syntax, but highlighted
    //                        as if it were :(

This false-positive case is expected to be rare.

Injecting this fake language fixes regular non-string highlights in
macro invocations: macro invocations need to inject the entire token
tree and use `injection.include-children` for proper highlighting.
2025-07-13 12:01:18 -04:00
Michael Davis d2f37b1559
deps: Update tree-house-bindings to v0.2.1 2025-07-12 18:21:28 -04:00
Nik Revenco e844a4365d
fix: bitwise representation for RGB highlight (#13188)
Co-authored-by: Nik Revenco <154856872+NikitaRevenco@users.noreply.github.com>
2025-07-12 11:11:31 -04:00
CalebLarsen ca7479ca88
Add docs to helix-stdx, helix-tui, helix-vcs (#13765) 2025-07-12 09:48:00 -04:00
Matthew Toohey 7e1fbb05fd
feat: add :buffer-close-others --skip-visible flag (#5393) 2025-07-11 11:17:50 -05:00
Michael Davis 2f560914fb
Add a '--no-format' flag for :write commands 2025-07-11 12:00:41 -04:00
spentbliss 636cbe58e3
feat(theme): add doom-one theme (#13933)
Co-authored-by: spentbliss <spentbliss@users.noreply.github.com>
2025-07-11 10:34:45 -04:00
Maikel Martens 43187f2ed3
Add Django language support (#13935) 2025-07-11 10:33:44 -04:00
Michael Davis 532f241287
Allow symlinks in shell program completions
Co-authored-by: thort <thort@compass-vm>
2025-07-11 10:30:58 -04:00
Gabriel Lopes Rodrigues ba04f53830
languages: consider compose.yaml/.yml as docker compose language (#13930) 2025-07-10 20:14:45 -05:00
StratusFearMe21 242353b2ba
Add ability to configure atomic saving (#13656)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-07-10 19:12:59 -04:00
belowm de898460b8
Allow `:move` command to accept directories as target (#13922)
Co-authored-by: Martin Below <martin@below.cologne>
2025-07-10 14:28:53 -05:00
Kristoffer Plagborg Bak Sørensen 8e0f326ebb
languages: create dedicated language for json-ld (#13925) 2025-07-10 08:49:33 -05:00
connnnal 16d06643a4 queries: Odin or_break+or_continue keywords, struct indents
from https://github.com/tree-sitter-grammars/tree-sitter-odin/pull/25
2025-07-08 19:05:48 -04:00
connnnal 9447a9cc93 chore: Bump Odin grammar 2025-07-08 19:05:48 -04:00
Jonas Köhnen febc3d03b3
queries/gomod: add "tool", "toolchain" to keywords (#13913) 2025-07-08 08:19:11 -05:00
dependabot[bot] 06047808eb
build(deps): bump the rust-dependencies group with 2 updates (#13909)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-08 08:18:37 -05:00
Andrew Davis 02fe437622
Fix off by one error when opening multiple new lines with CRLF line endings (#13905) 2025-07-07 17:41:16 -05:00
Daniel Fortes e88e48f41c
Rose pine theme: improve contrast of selected menu item (#13908) 2025-07-07 16:09:16 -05:00
Val Packett fc53af9f4e
Add systemd-lsp and dts-lsp (#13907) 2025-07-07 15:55:19 -05:00
Kristoffer Plagborg Bak Sørensen 3e5bb392fa
languages: add comment tokens for DTD language (#13904) 2025-07-07 14:02:26 -04:00
Remo Senekowitsch 479c3b5584
Add highlighting for git notes editmsg (#13885) 2025-07-05 10:23:53 -04:00
Kristoffer Plagborg Bak Sørensen 9789b27461
languages: add Java .properties file support (#13874) 2025-07-04 09:17:22 -05:00
Kristoffer Plagborg Bak Sørensen 6c6607ef62
queries: add textobjects for qml (#13855) 2025-07-03 22:19:22 -04:00
CalebLarsen bcb6c20a84
queries: Add locals.scm for C. Improve C parameter highlights (#13876) 2025-07-02 17:41:28 -05:00
CalebLarsen f7ab5ec4a1
queries: Update highlights for Odin (#13877) 2025-07-02 17:38:05 -05:00
Tino 6a090471a8
Fix panic in `goto_word` when `editor.jump-label-alphabet` is empty (#13863) 2025-07-01 09:06:54 -05:00
Michael Davis 6081a5df81
queries: Fix precedence of Fennel highlights 2025-07-01 09:40:40 -04:00
dependabot[bot] 0043c16506
build(deps): bump indexmap in the rust-dependencies group (#13872)
Bumps the rust-dependencies group with 1 update: [indexmap](https://github.com/indexmap-rs/indexmap).


Updates `indexmap` from 2.9.0 to 2.10.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.9.0...2.10.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-version: 2.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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-07-01 17:06:54 +09:00
David Crespo e5f9937c1d
docs: escape pipe in typeable command name (#13869) 2025-06-30 11:45:47 -04:00
Kristoffer Plagborg Bak Sørensen 91dff9393d
languages: add Caddyfile support (#13859)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-06-30 09:45:22 -05:00
Sean Barag 0ca12250bc
helix-view: expand primary selection line range in shell commands (#13840) 2025-06-30 09:44:55 -05:00
Peter Retzlaff 4d782bbd18
Add "Dark Synthwave" theme (#13857) 2025-06-30 09:32:32 -05:00
Nik Revenco b036fa0b9b fix: Highlight `'x'` as a character in Go 2025-06-30 10:29:20 -04:00
Nik Revenco 0d799235f6 feat: Inject markdown into Go's block documentation comments
more

chore: capture unlimited number of comments

Each commen
2025-06-30 10:29:20 -04:00
CalebLarsen 305f8bc165
Re-detect `.editorconfig` on `:config-reload` (#13443) 2025-06-30 09:21:37 -05:00
Luka Krmpotić e03f100187
Fix typo in helix-tui text module docs (#13860) 2025-06-30 09:11:53 -05:00
Kristoffer Plagborg Bak Sørensen f75d71844f
queries: inject nix into `lib.literalExression` string contents (#13851) 2025-06-28 18:00:58 -04:00
Jonas Köhnen d654a07d3d
queries/dockerfile: injections for heredocs (#13852) 2025-06-28 17:59:32 -04:00
Ricardo Fernández Serrata 930340e646
feat: recognize mimeapps.list as INI (#13850) 2025-06-28 13:04:34 -04:00
Michael Davis 44293dfd22
Change tree-sitter parser for Git commit message files
The gbprod grammar is more complete and featureful than mine, and more
actively maintained. I will archive my tree-sitter-git-commit in favor
of gbprod's.

The new queries are based on the ones in the repo upstream but I
modified them to look similar to the highlights before this commit.

Also I've updated the tab-width so that change nodes in the generated
message are indented correctly.
2025-06-27 10:55:00 -04:00
Kristoffer Plagborg Bak Sørensen a9d51ef258
queries: inject all lines in a newline escaped RUN Dockerfile instruction as bash (#13845) 2025-06-26 13:51:10 -04:00
Kristoffer Plagborg Bak Sørensen b9f980f567
languages: detect `~/.gem/credentials` as yaml (#13843) 2025-06-26 13:06:50 -04:00
CalebLarsen c3c4895179
fix: Make code-action popup auto close like other popups (#13832) 2025-06-25 08:21:24 -05:00
Md Atiquz Zaman 974ac9eaf3
Sidra Theme - A super customizable, balanced dark theme for Helix (#13575) 2025-06-24 08:09:14 -05:00
CalebLarsen 60fce357fb
queries: Fix Rust function parameter locals tracking (#13828) 2025-06-24 08:08:25 -05:00
dependabot[bot] 4f985832bf
build(deps): bump libc in the rust-dependencies group (#13827)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-23 21:41:00 -04:00