Commit Graph

5868 Commits (77699f1473ff7e4905a36a284c0d373649021d63)
 

Author SHA1 Message Date
jyn 77699f1473 add `append_character_interactive` command
this behaves like regular append with respect to selections: the newly
inserted text will be selected when the command finishes, unlike when
using `insert_char_interactive`.
2 months ago
jyn 08ec9d5ada add `insert_character_interactive` command
this command inserts a character of the user's choice underneath the current cursor, without exiting normal mode. multiple cursors are handled correctly.

i chose `C-y` for the default mapping because it doesn't conflict with anything else. i would have preferred `C-i` (i for insert), but that conflicts with `jump_forward`; and additionally most terminals do not distinguish `C-i` from `tab`, so it's not a good choice for the default.

this command does not have precedence in vim or kakoune to my knowledge, but at least vim allows replicating it with remap command (https://superuser.com/questions/581572/insert-single-character-in-vim), while helix currently does not, since there's no way to say "a character entered by the user".
4 months ago
RoloEdits cfe80acb6f
output `stderr` in `:sh` popup if shell commands fail (#11239)
* refactor(commands): output `stderr` in `:sh` popup

* refactor(commands): switch to `from_utf8_lossy`

This way something is always displayed.

* refactor: no longer log stderr output on failure
4 months ago
TheoCorn 63953e0b9e
fix :move panic when starting a new language server (#11387)
* fix move panic

* change location of is initialized check
4 months ago
RoloEdits 86aecc96a1
chore: clean up clippy lints (#11377)
Using clippy 1.80.0. Also cleans up some that were windows only.
4 months ago
Pascal Kuthe 3fcf168c33
Merge pull request #11355 from helix-editor/helix-lsp-types
Vendor `lsp-types`
4 months ago
Erasin Wang b19551b11b
Updated Godot support (#11235)
- update gdscript highlights
- add godot-resource textobjects
4 months ago
Andrew Chou a4cfcff284
update language configuration for Tcl (#11236)
The primary executable that comes with Tcl is `tclsh`. Not really sure what `tclish` is, as I initially thought it was a typo. However, there seems to be references to it based on a quick search (e.g. [here](https://wiki.tcl-lang.org/page/Tclish) and [here](https://tclish.sourceforge.net/)), so maybe it's a valid executable that I just haven't been aware of. I was hesitant to replace it and instead opted to just add `tclsh`.
4 months ago
Michael Davis 22c1a40725
Fix finding injection layer in tree cursor with nested layers (#11365)
The `take_while` should limit the layers to those that can match the
input range so we don't always scan the entire `injection_layers`. We
can limit `depth == 1` layers to those that start before the search
`end`. Deeper layers overlap with shallower layers though so we need
to allow those layers as well in the `take_while`.

For example

```vue
<script setup lang="ts">
const foo = 'bar'.match(/foo/);
const bar = foo;
</script>
```

L2 and L3 are a typescript layer and the `/foo/` part is a small regex
layer. If you used `A-o` before the regex layer you would select the
entire typescript layer. The search in `layer_id_containing_byte_range`
would not consider the typescript layer since the regex layer comes
earlier in `injection_ranges` and that layer's start is after `end`.
The regex layer has a depth of `2` though so the change in this commit
allows scanning through that layer.

Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
4 months ago
dependabot[bot] ce809fb9ef
build(deps): bump the rust-dependencies group with 6 updates (#11371) 4 months ago
麦芽糖 08ac37d295
Add theme keys for the picker header area (#11343)
* feat: pertty header

* 更新 themes.md

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
4 months ago
Pascal Kuthe 8e041c99df
stable sort lsp edits (#11357) 4 months ago
Skyler Hawthorne fa13b2bd0d
reduce log noise on file writes (#11361) 4 months ago
dnaq 2a2bc79335
Remove unnecessary `.as_mut()` call and fix log messages (#11358)
These are changes that fell out of commit:
d7a3cdea65ef321d53b8dc8417175781b5272049
4 months ago
lynn pepin 29439116b8
Documented ulimit fix for error during integration tests (#11356) 4 months ago
dnaq f5950196d9
Fix panic when starting helix tutor (#11352)
Closes #11351

Also fixed some minor issues related to log
message contents, and removed unnecessary use
of `.as_mut()` as per code review comments on
the PR.
4 months ago
Michael Jones fade4b218c
new theme named ao (#11063)
* new theme named ao

* Update runtime/themes/ao.toml

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
4 months ago
Poliorcetics 9e55e8a416
contrib: nushell: also complete available languages with --health (#11346) 4 months ago
Michael Davis af2ac551ba
Resolve unclosed HTML tag doc warning 4 months ago
Michael Davis 981e5cd737
helix-lsp-types: Resolve clippy lints in tests 4 months ago
Michael Davis 3963969b89
'cargo fmt' 4 months ago
Michael Davis e21e4eb825
Replace lsp-types in helix-lsp with helix-lsp-types 4 months ago
Michael Davis 7793031aa6
Rename `lsp-types` crate to `helix-lsp-types` 4 months ago
Michael Davis 1ccdc55db9
Add helix-lsp-types to workspace 4 months ago
Michael Davis 2900bc03cf
Vendor the `lsp-types` crate 4 months ago
RoloEdits 6eae846197
feat(languages): update `just` grammar and queries (#11306)
* feat(languages): update `just` grammar and queries

Bump the

* refactor(syntax): inject shebang by id not name

---------

Co-authored-by: Trevor Gross <tmgross@umich.edu>
4 months ago
Michael Davis ae72a1dc42 Tombstone LSP clients stopped with :lsp-stop
We use the empty vec in `inner_by_name` as a tombstone value. When the
vec is empty `get` should not automatically restart the server.
4 months ago
Michael Davis 59429e18d6 Lower log level for message about removing clients from the registry
Servers stopped with `:lsp-stop` will show this message when the server
exits. If the client isn't in the registry there isn't any work to do
to remove it so this branch is benign.
4 months ago
Skyler Hawthorne face6a3268 Disable hard link integration test on Android
Non-rooted Android typically doesn't have permission to use hard links
at all, so this test fails on Android.
4 months ago
Pascal Kuthe 30fb63cc3d Update helix-core/Cargo.toml
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
4 months ago
Pascal Kuthe 2824e692a7 lock unicode width
Cargo automatically pumbs the patch version when installed with `cargo install`
without the locked flag which creates weird rendering artifacts
4 months ago
Kirawi e5372b04a1
Fix writing hardlinks (#11340)
* don't use backup files with hardlinks

* check if the inodes remain the same in the test

* move funcs to faccess and use AsRawHandle

* use a copy as a backup for hardlinks

* delete backup after copy
4 months ago
Nikolay Minaev 0813147b97
Use fs' mtime to avoid saving problem on out-of-synced network fs (#11142)
In the case of network file systems, if the server time is ahead
of the local system time, then helix could annoy with messages
that the file has already been modified by another application.
4 months ago
Remo Senekowitsch 229784ccc7
Improve scrolloff behavior (#11323)
* Allow perfect centering of cursor

* Fix horizontal scrolloff

* Fix copypasta in comment
4 months ago
Michael Davis a1e20a3426
Reorganize Document::apply_impl (#11304)
These changes are ported from
<https://redirect.github.com/helix-editor/helix/pull/9801>. It's a
cleanup of `Document::apply_impl` that uses some early returns to
reduce nesting and some reordering of the steps. The early returns
bail out of `apply_impl` early if the transaction fails to apply or
if the changes are empty (in which case we emit the SelectionDidChange
event). It's a somewhat cosmetic refactor that makes the function easier
to reason about but it also makes it harder to introduce bugs by mapping
positions through empty changesets for example.

Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
4 months ago
Damir Vandic 9b65448f53
Fix example query in pickers.md (#11322)
Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
4 months ago
Jimmy Zelinskie 5e945c327f
languages: add mdx to markdown filetypes (#11122) 4 months ago
dependabot[bot] d48b6904f2
build(deps): bump gix-attributes from 0.22.2 to 0.22.3 (#11318)
Bumps [gix-attributes](https://github.com/Byron/gitoxide) from 0.22.2 to 0.22.3.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/gix-attributes-v0.22.2...gix-attributes-v0.22.3)

---
updated-dependencies:
- dependency-name: gix-attributes
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 months ago
karei f34dca797c
Add support for `jjdescription` files (#11271) 4 months ago
Luca Saccarola ef4a4ff3c5
Make bash completion behave normally (#11246) 4 months ago
Ryan Roden-Corrent 5d3f05cbe1
Document use of filter columns in pickers (#11218)
* Document use of filter columns in pickers.

Filtering on columns was implemented in #9647.
The only documentation I could find on this feature
was the PR itself, and the video demo used a different syntax.

* Note that column filters are space-separated.

* Note that picker filters can be abbreviated.

* Specify correct picker in docs.

* Clarify picker filter prefix shortenting.

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Move picker docs to their own section.

* Update book/src/pickers.md

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Improve docs on picker registers, keybinds, and syntax.

* Clarify wording around picker queries.

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Ryan Roden-Corrent <ryan@rcorre.net>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
4 months ago
RoloEdits 7c5e5f4e41
fix(lsp): `find_completion_range` off-by-one (#11266) 4 months ago
1adept 9d21b8fa85
just module extension (#11286)
Co-authored-by: adept <adept@noreply.codeberg.org>
4 months ago
Rich Robinson 182b26bebc
Fix typos in 2-character label jump Tutor entry (#11298) 4 months ago
JR 4c1835504b
Add tutor entry about 2-character label jump (#11273)
* Add tutor entry about 2-character label jump

* Move gw tutor to chapter 9

* Do not explicitely say which labels are shown following gw
4 months ago
Ingrid 1d0a3d49d3
Consistently maintain view position (#10559)
* replicate t-monaghan's changes

* remove View.offset in favour of Document.view_data.view_position

* improve access patterns for Document.view_data

* better borrow checker wrangling with doc_mut!()

* reintroduce ensure_cursor_in_view in handle_config_events

since we sorted out the borrow checker issues using partial borrows,
there's nothing stopping us from going back to the simpler implementation

* introduce helper functions on Document .view_offset, set_view_offset

* fix rebase breakage
4 months ago
dependabot[bot] 0d62656c98
build(deps): bump the rust-dependencies group with 5 updates (#11281)
Bumps the rust-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.62` | `1.0.63` |
| [toml](https://github.com/toml-rs/toml) | `0.8.14` | `0.8.15` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.38.0` | `1.38.1` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.1.5` | `1.1.6` |
| [libloading](https://github.com/nagisa/rust_libloading) | `0.8.4` | `0.8.5` |


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

Updates `toml` from 0.8.14 to 0.8.15
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.14...toml-v0.8.15)

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

Updates `cc` from 1.1.5 to 1.1.6
- [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.1.5...cc-v1.1.6)

Updates `libloading` from 0.8.4 to 0.8.5
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.4...0.8.5)

---
updated-dependencies:
- dependency-name: thiserror
  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: tokio
  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: libloading
  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>
4 months ago
Michael Davis 86795a9dc7
Return document display name from the '%' special register (#11275) 4 months ago
karei d47e085fe0
Revert `kanagawa` diff colour change from #11187 (#11270) 4 months ago
Hamir Mahal f5231196bc
fix: usage of `node12 which is deprecated` (#11277)
* chore: changes from formatting on save

* fix: usage of `node12 which is deprecated`
4 months ago