Commit Graph

6634 Commits (c7ad7f416201e0bd26ebe2e63a49872a974fff0c)

Author SHA1 Message Date
Skyler Hawthorne c7ad7f4162
Merge 70650ff55a into 205e7ece70 2025-06-16 10:48:09 +02:00
Pascal Kuthe 205e7ece70
update imara-diff (#13722) 2025-06-14 16:14:27 -04:00
yuri 1315b7e2b1
Feat: inlay hint length limit (#13742) 2025-06-13 11:09:21 -05:00
Lens0021 / Leslie 52192ae29e
Add Amber language server (#13763) 2025-06-13 10:05:21 -05:00
Jonas Köhnen fba1a6188a
Picker: Detect language before rendering preview (#13761) 2025-06-13 09:29:26 -05:00
polyface b90d8960a8
added crystal formatter in languages.toml (#13759)
Co-authored-by: polyface <polyface@proton.me>
2025-06-13 09:20:07 -05:00
uncenter 6e4ec96101
Highlight Ecma escape sequences (#13762) 2025-06-13 09:15:40 -05:00
CalebLarsen 62f270e5d2
chore: updated c,c++ highlights (#13747) 2025-06-12 09:28:09 -05:00
idealseal 3b7aaddb13
feat: add neocmakelsp language server (#13740) 2025-06-11 09:00:46 -05:00
Nguyễn Đức Toàn ab97585b69
feat: add tombi language server (#13723) 2025-06-10 10:35:11 -05:00
yuri 9dbfb9b4eb
Merge formatting options and `config.format` in range format request (#13734) 2025-06-10 09:55:46 -05:00
Caleb Larsen 091f19f67c chore: updated themes using 'comment.block.documentation' to also use 'comment.line.documentation' 2025-06-10 10:54:05 -04:00
Caleb Larsen ae3eac8aeb fix: Rust now correctly highlights doc comments as @comment.{block,line}.documentation instead of @comment 2025-06-10 10:54:05 -04:00
dependabot[bot] fbe9785613
build(deps): bump the rust-dependencies group with 4 updates (#13730)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 09:45:32 -05:00
spentbliss 7092e30f8d
feat(colorscheme): add lapis_aquamarine colorscheme (#13726)
Co-authored-by: spentbliss <spentbliss@users.noreply.github.com>
2025-06-10 09:44:30 -05:00
Samuel Ibarra 705d467932
Update languages.toml for Mojo (#13648) 2025-06-10 09:43:00 -05:00
dependabot[bot] 05a4d05646
build(deps): bump which from 7.0.3 to 8.0.0 (#13729)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-10 09:42:04 -05:00
CalebLarsen 2b26d27416
fix: re-ordered and updated python highlights (#13715) 2025-06-08 21:34:37 -04:00
Grey e773d6cc92
feat: add luau grammars and lsp (#13702)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2025-06-08 15:21:08 -04:00
Michael Davis 633c5fbf0f
Update language loader before refreshing theme in `:config-reload`
Since locals are handled during parsing instead of highlighting with
tree-house, we need to call `helix_core::syntax::Loader::set_scopes`
before parsing any documents. During `:config-reload` we previously
reloaded the `Loader` and re-parsed documents and _then_ updated the
theme. So documents were parsed before `Loader::set_scopes` was called
on the new loader.

With this change the `refresh_language_config` helper is inlined into
`refresh_config`. Updating the `Editor`'s `ArcSwap` of the loader is
done before updating the theme so that the `load_configured_theme`
helper can call `set_scopes` with on the new loader.
2025-06-08 15:05:22 -04:00
Tan Kian b75e95862c
Add Pyrefly language server (#13713) 2025-06-08 15:01:01 -04:00
Michael Davis f4b488e380
Remove unused `helix_core::graphemes::is_grapheme_boundary`
This function was never used and will be superseded by
`RopeSliceExt::is_grapheme_boundary` (which accepts a byte index rather
than a character index) once we transition to Ropey v2. In the meantime
any callers should convert to byte index and use the `RopeSliceExt`
extension rather than form new dependencies on this.
2025-06-06 18:24:44 -04:00
Michael Davis 7410fe35a3
Update tree-house and bindings to v0.2.0 2025-06-06 17:14:08 -04:00
Axlefublr 637274c4d4
Add `rotate_selections_{first,last}` commands (#13615) 2025-06-06 15:08:41 -05:00
Michael Davis 01341cbbf6
minor: Add missing call to `Vec::clear` for a buffer 2025-06-06 12:23:22 -04:00
Michael Davis b1f4717356
Allow multiple `#not-kind-eq?` predicates in indent queries
This fixes a regression from the switch to tree-house with one of the
custom predicates in indent queries: `#not-kind-eq?`. This predicate
should be allowed to be written multiple times in a pattern. For example
in the Go indents:

    ; Switches and selects aren't indented, only their case bodies are.
    ; Outdent all closing braces except those closing switches or selects.
    (
        (_ "}" @outdent) @outer
        (#not-kind-eq? @outer "select_statement")
        (#not-kind-eq? @outer "type_switch_statement")
        (#not-kind-eq? @outer "expression_switch_statement")
    )

So instead of an `Option<T>` of one we need a `Vec<T>` and we need to
check that all of these predicates are individually satisfied (basically
`iter().all(/* node kind is not expected kind for that capture */)`).
2025-06-06 12:14:43 -04:00
Michael Davis 25b299abc5
queries: Recognize methods as a locals scope
This fixes a bug in highlighting parameter variables in Go methods.
See <https://redirect.github.com/helix-editor/helix/issues/13674#issuecomment-2935514099>
2025-06-06 11:48:18 -04:00
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
Skyler Hawthorne 70650ff55a feat(command): expand_selection_around
Introduces a new command `expand_selection_around` that expands the
selection to the parent node, like `expand_selection`, except it splits
on the selection you start with and continues expansion around this
initial selection.
2025-05-26 19:22:20 -04:00
Skyler Hawthorne 57d7b4fb4a Generalize View::object_selections into map
This allows using multiple distinct state histories. By default, all
history is also cleared any time a view's selection is set, unless
explicitly told to save the state. This way, we can have control over
when selection history is saved. They are also cleared on any text
edit, since an edit could invalidate the previous selection, potentially
causing a panic.

Additionally, the object selections have been moved into `Document`
so that it is easier to manipulate them when changes to the document
happen. They have been put into a wrapper struct named `ViewData`, where
the intention is that any further fields that we want to add in the
future that must be associated with a view, but are more convenient to
store in a document, can be added here, instead of further polluting the
core `Document` type.
2025-05-26 19:22:20 -04:00
Skyler Hawthorne 4b3aad7830 Add Selection::{overlaps,without} and fix contains
Adds two helper functions to `Selection`:

* `overlaps`: tests whether two `Selection`s contain any ranges which
  overlap with each other
* `without`: Computes a new `Selection` that is the set difference
  of two `Selection`s, i.e. everything in the first `Selection`
  with everything that overlaps in the second `Selection` removed,
  potentially leaving holes in the original ranges.

It also fixes a bug with `Selection::contains`: it assumes that if the
second `Selection` has a greater number of ranges than the first, then
the first cannot contain the second; but this is false, since one range
from the first could contain multiple smaller ranges in the second.
2025-05-26 19:22:20 -04:00
Skyler Hawthorne 8fbb9566fb shrink_selection without history selects first contained child
This changes the behavior of `shrink_selection` to iterate through child
nodes until it finds one that is contained within the selection, with
at least one of the ends of the selection being exclusively inside the
starting selection (though not necessarily both ends). This produces
more intuitive behavior for selecting the "first logical thing" inside
the selection.
2025-05-26 19:22:20 -04:00
Skyler Hawthorne f6e1a2f599 backfill expand/shrink tests 2025-05-26 19:22:20 -04:00
Axlefublr 2fbe7fc5b5
fix(doc): missing capitalization of `goto_{next,prev}_tabstop` (#13616) 2025-05-26 08:48:32 -05:00