Commit Graph

928 Commits

Author SHA1 Message Date
yehor
9e171e7d1d
Add default-yank-register option (#11430)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-11-20 17:24:55 -06:00
Michael Davis
467fad51b1
clipboard: Sway builtin provider yank and paste commands
The configuration here is not super intuitive - in order to yank from
a clipboard provider we want it to paste the clipboard and in order to
paste to the clipboard we want it to yank the contents we pass.

This swaps the programs for yank and paste to align with that.

Ref #10839
2024-11-20 18:10:46 -05:00
Michael Davis
b855cd0cda
clipboard: Fix builtin_names for x-clip, x-sel, win-32-yank
Copy/paste error from #10839
2024-11-20 18:10:31 -05:00
Alfie Richards
68ee87695b
Add clipboard provider configuration (#10839) 2024-11-20 16:06:23 -06:00
Michael Davis
6cca98264f Re-vendor encoding_rs test data
This fixes a test (`helix_view::document::gb18030_decode`) since
encoding_rs updated its gb18030 encoding to match GB18030-2022 (was
GB18030-2005).

The newly vendored files update the license line and I've included the
referenced license in the `encoding/` directory.
2024-11-13 15:30:17 +09:00
dependabot[bot]
b5d56e57a6 build(deps): bump the rust-dependencies group across 1 directory with 11 updates
Bumps the rust-dependencies group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [regex](https://github.com/rust-lang/regex) | `1.11.0` | `1.11.1` |
| [url](https://github.com/servo/rust-url) | `2.5.2` | `2.5.3` |
| [serde](https://github.com/serde-rs/serde) | `1.0.210` | `1.0.215` |
| [encoding_rs](https://github.com/hsivonen/encoding_rs) | `0.8.34` | `0.8.35` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.90` | `1.0.93` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.13.0` | `3.14.0` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.40.0` | `1.41.1` |
| [libc](https://github.com/rust-lang/libc) | `0.2.161` | `0.2.162` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.1.31` | `1.1.37` |
| [gix](https://github.com/GitoxideLabs/gitoxide) | `0.66.0` | `0.67.0` |



Updates `regex` from 1.11.0 to 1.11.1
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.11.0...1.11.1)

Updates `url` from 2.5.2 to 2.5.3
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.2...v2.5.3)

Updates `serde` from 1.0.210 to 1.0.215
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.215)

Updates `encoding_rs` from 0.8.34 to 0.8.35
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.34...v0.8.35)

Updates `anyhow` from 1.0.90 to 1.0.93
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.90...1.0.93)

Updates `tempfile` from 3.13.0 to 3.14.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.13.0...v3.14.0)

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

Updates `libc` from 0.2.161 to 0.2.162
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.162/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.161...0.2.162)

Updates `rustix` from 0.38.37 to 0.38.40
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.37...v0.38.40)

Updates `cc` from 1.1.31 to 1.1.37
- [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.31...cc-v1.1.37)

Updates `gix` from 0.66.0 to 0.67.0
- [Release notes](https://github.com/GitoxideLabs/gitoxide/releases)
- [Changelog](https://github.com/GitoxideLabs/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/GitoxideLabs/gitoxide/compare/gix-v0.66.0...gix-v0.67.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: encoding_rs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: rustix
  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: gix
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 15:30:17 +09:00
Pascal Kuthe
162028d444
Merge pull request #11486 from helix-editor/lsp-location-refactor
Replace uses of `lsp::Location` with a custom Location type
2024-10-04 03:33:35 +02:00
dependabot[bot]
cb9307bb03
build(deps): bump the rust-dependencies group with 5 updates (#11805)
Bumps the rust-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [once_cell](https://github.com/matklad/once_cell) | `1.19.0` | `1.20.1` |
| [regex](https://github.com/rust-lang/regex) | `1.10.6` | `1.11.0` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.12.0` | `3.13.0` |
| [libc](https://github.com/rust-lang/libc) | `0.2.158` | `0.2.159` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.1.21` | `1.1.23` |


Updates `once_cell` from 1.19.0 to 1.20.1
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.1)

Updates `regex` from 1.10.6 to 1.11.0
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.6...1.11.0)

Updates `tempfile` from 3.12.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0)

Updates `libc` from 0.2.158 to 0.2.159
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.159/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159)

Updates `cc` from 1.1.21 to 1.1.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.1.21...cc-v1.1.23)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: libc
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 10:05:07 +09:00
Tim
82dd963693
Add: validation of bundled themes in build workflow (#11627)
* Add: xtask to check themes for validation warnings

* Update: tidied up runtime paths

* Update: test build workflow

* Update: address clippy lints

* Revert: only trigger workflow on push to master branch

* Add: Theme::from_keys factory method to construct theme from Toml keys

* Update: returning validation failures in Loader.load method

* Update: commented out invalid keys from affected themes

* Update: correct invalid keys so that valid styles still applied

* Update: include default and base16_default themes in check

* Update: renamed validation_failures to load_errors

* Update: introduce load_with_warnings helper function and centralise logging of theme warnings

* Update: use consistent naming throughout
2024-09-28 13:52:09 +02:00
Ayoub Benali
b85e824ba9
Handle window/showMessage and display it bellow status line (#5535)
* Handle window/showMessage and display it bellow status line

* Enable `editor.lsp.display_messages` by default

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-09-18 21:43:06 +02:00
Michael Davis
da2b0a7484
Make helix_core::Uri cheap to clone
We clone this type very often in LSP pickers, for example diagnostics
and symbols. We can use a single Arc in many cases to avoid the
unnecessary clones.
2024-09-03 09:50:31 -04:00
Lennard Hofmann
af7a1fd20c
lsp: Gracefully ignore invalid diagnostic severity (#11569) 2024-08-25 14:27:10 -05:00
dependabot[bot]
112b2878ae
build(deps): bump the rust-dependencies group with 4 updates (#11476)
Bumps the rust-dependencies group with 4 updates: [serde](https://github.com/serde-rs/serde), [serde_json](https://github.com/serde-rs/json), [tempfile](https://github.com/Stebalien/tempfile) and [cc](https://github.com/rust-lang/cc-rs).


Updates `serde` from 1.0.204 to 1.0.207
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.207)

Updates `serde_json` from 1.0.122 to 1.0.124
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.122...v1.0.124)

Updates `tempfile` from 3.11.0 to 3.12.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/commits)

Updates `cc` from 1.1.7 to 1.1.10
- [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.7...cc-v1.1.10)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: cc
  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>
2024-08-13 07:59:42 +02:00
dependabot[bot]
92a87dbc31 build(deps): bump the rust-dependencies group with 9 updates
Bumps the rust-dependencies group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [regex](https://github.com/rust-lang/regex) | `1.10.5` | `1.10.6` |
| [dunce](https://gitlab.com/kornelski/dunce) | `1.0.4` | `1.0.5` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.121` | `1.0.122` |
| [toml](https://github.com/toml-rs/toml) | `0.8.16` | `0.8.19` |
| [crossterm](https://github.com/crossterm-rs/crossterm) | `0.27.0` | `0.28.1` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.10.1` | `3.11.0` |
| [serde_repr](https://github.com/dtolnay/serde-repr) | `0.1.12` | `0.1.19` |
| [which](https://github.com/harryfei/which-rs) | `6.0.1` | `6.0.2` |
| [windows-sys](https://github.com/microsoft/windows-rs) | `0.52.0` | `0.59.0` |

Updates `regex` from 1.10.5 to 1.10.6
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.5...1.10.6)

Updates `dunce` from 1.0.4 to 1.0.5
- [Commits](https://gitlab.com/kornelski/dunce/compare/v1.0.4...v1.0.5)

Updates `serde_json` from 1.0.121 to 1.0.122
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.121...v1.0.122)

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

Updates `crossterm` from 0.27.0 to 0.28.1
- [Release notes](https://github.com/crossterm-rs/crossterm/releases)
- [Changelog](https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossterm-rs/crossterm/commits)

Updates `tempfile` from 3.10.1 to 3.11.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0)

Updates `serde_repr` from 0.1.12 to 0.1.19
- [Release notes](https://github.com/dtolnay/serde-repr/releases)
- [Commits](https://github.com/dtolnay/serde-repr/compare/0.1.12...0.1.19)

Updates `which` from 6.0.1 to 6.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/6.0.1...6.0.2)

Updates `windows-sys` from 0.52.0 to 0.59.0
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.52.0...0.59.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: dunce
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: serde_json
  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: crossterm
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: serde_repr
  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
- dependency-name: windows-sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 04:27:05 +09:00
TheoCorn
63953e0b9e
fix :move panic when starting a new language server (#11387)
* fix move panic

* change location of is initialized check
2024-08-01 06:40:00 +09:00
RoloEdits
86aecc96a1
chore: clean up clippy lints (#11377)
Using clippy 1.80.0. Also cleans up some that were windows only.
2024-08-01 06:39:46 +09:00
Skyler Hawthorne
fa13b2bd0d
reduce log noise on file writes (#11361) 2024-07-28 15:59:21 -05:00
dnaq
2a2bc79335
Remove unnecessary .as_mut() call and fix log messages (#11358)
These are changes that fell out of commit:
d7a3cdea65ef321d53b8dc8417175781b5272049
2024-07-28 19:30:07 +02:00
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.
2024-07-28 18:29:26 +02:00
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
2024-07-27 12:21:52 -05:00
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.
2024-07-27 10:47:23 -05:00
Remo Senekowitsch
229784ccc7
Improve scrolloff behavior (#11323)
* Allow perfect centering of cursor

* Fix horizontal scrolloff

* Fix copypasta in comment
2024-07-26 17:20:33 +02:00
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>
2024-07-26 09:32:02 +02:00
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
2024-07-23 19:54:00 +02:00
Michael Davis
86795a9dc7
Return document display name from the '%' special register (#11275) 2024-07-23 06:56:26 +09:00
Pascal Kuthe
7283ef881f
only show inline diagnostics after a delay 2024-07-15 16:36:29 +02:00
Pascal Kuthe
7e133167ca
remove redudant/incorrect view bound check 2024-07-15 16:35:30 +02:00
Pascal Kuthe
6d051d7084
render diagnostic inline 2024-07-15 16:35:30 +02:00
Pascal Kuthe
39b3d81abf
stable sort diagnostics to avoid flickering 2024-07-15 16:35:30 +02:00
Pascal Kuthe
2c0506aa96
streamline text decoration API
This commit brings the text decoration API inline with the
LineAnnotation API (so they are consistent) resulting in a single
streamlined API instead of multiple ADHOK callbacks.
2024-07-15 16:35:26 +02:00
Pascal Kuthe
9a93240d27
correctly wrap at text-width 2024-07-15 16:34:14 +02:00
Blaž Hrastnik
08ee8b9443
Merge pull request #9647 from helix-editor/pickers-v2
`Picker`s "v2"
2024-07-15 23:30:58 +09:00
FlorianNAdam
6345b78409
Keep editor from switching to normal mode when loading a Document (#11176) 2024-07-15 22:48:37 +09:00
Michael Davis
f4a433f855
Convert LSP URIs into custom URIs
This introduces a custom URI type in core meant to be extended later
if we want to support other schemes. For now it's just a wrapper over a
PathBuf. We use this new URI type to firewall `lsp::Url`. This was
previously done in 8141a4a but using a custom URI type is more flexible
and will improve the way Pickers handle paths for previews in the child
commit(s).

Co-authored-by: soqb <cb.setho@gmail.com>
2024-07-15 09:31:33 -04:00
kanielrkirby
86e4b51416
Add changes for undo in insert mode (#11090)
* Add changes before insert mode undo
Fixes #11077

* Address edge cases for undo like Kakoune does

---------

Co-authored-by: Kaniel Kirby <pirate7007@runbox.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-07-10 12:38:50 +09:00
dependabot[bot]
348c0ebeb4
build(deps): bump the rust-dependencies group with 5 updates (#11113)
Bumps the rust-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde) | `1.0.203` | `1.0.204` |
| [imara-diff](https://github.com/pascalkuthe/imara-diff) | `0.1.5` | `0.1.6` |
| [clipboard-win](https://github.com/DoumanAsh/clipboard-win) | `5.3.1` | `5.4.0` |
| [open](https://github.com/Byron/open-rs) | `5.1.4` | `5.2.0` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.104` | `1.0.106` |


Updates `serde` from 1.0.203 to 1.0.204
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204)

Updates `imara-diff` from 0.1.5 to 0.1.6
- [Release notes](https://github.com/pascalkuthe/imara-diff/releases)
- [Changelog](https://github.com/pascalkuthe/imara-diff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pascalkuthe/imara-diff/compare/v0.1.5...v0.1.6)

Updates `clipboard-win` from 5.3.1 to 5.4.0
- [Commits](https://github.com/DoumanAsh/clipboard-win/commits)

Updates `open` from 5.1.4 to 5.2.0
- [Release notes](https://github.com/Byron/open-rs/releases)
- [Changelog](https://github.com/Byron/open-rs/blob/main/changelog.md)
- [Commits](https://github.com/Byron/open-rs/compare/v5.1.4...v5.2.0)

Updates `cc` from 1.0.104 to 1.0.106
- [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.0.104...cc-v1.0.106)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: imara-diff
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: clipboard-win
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: open
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: cc
  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>
2024-07-09 19:40:22 +09:00
Michael Davis
dca952c03a
Delay auto-save until exiting insert mode (#11047)
Saving while in insert mode causes issues with the modification
indicator and this is very easy to reproduce with the current state of
the auto-save hook. We can tweak the hook slightly to await the mode
switch out of insert mode to perform the save.

The debounce is preserved: if you save and then immediately exit insert
mode the debounce will be respected. If the debounce lapses while you
are in insert mode, the save occurs as you switch out of insert mode
immediately.
2024-06-29 11:08:21 +09:00
dependabot[bot]
b05ed9bf85
build(deps): bump the rust-dependencies group with 4 updates (#11032)
Bumps the rust-dependencies group with 4 updates: [bitflags](https://github.com/bitflags/bitflags), [url](https://github.com/servo/rust-url), [cc](https://github.com/rust-lang/cc-rs) and [libloading](https://github.com/nagisa/rust_libloading).


Updates `bitflags` from 2.5.0 to 2.6.0
- [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.5.0...2.6.0)

Updates `url` from 2.5.1 to 2.5.2
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.1...v2.5.2)

Updates `cc` from 1.0.99 to 1.0.100
- [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/1.0.99...cc-v1.0.100)

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

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: url
  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>
2024-06-25 23:22:20 +09:00
TiredTumblrina
94a9c81eb0
Prevent improper files (like /dev/random) from being used as file arguments (#10733)
* Implement check before adding path to files

* fix problem where directories were removed from args.files

* Revert "Implement check before adding path to files"

This reverts commit c123944d9b.

* Dissallow opening of irregular non-symlink files

* Fixed issue with creating new file from command line

* Fixed linting error.

* Optimized regularity check as suggested in review

* Created DocumentOpenError Sum Type to switch on in Application

* Forgot cargo fmt

* Update helix-term/src/application.rs

Accept suggestion in review.

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

* Moved thiserror version configuration to the workspace instead of the individual packages.

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-06-18 18:14:17 +02:00
Thomas Schafer
668f1239a9
Fix jump_backwards behaviour when jumplist is at capacity (#10968)
* Fix jump_backwards behaviour when jumplist is at capacity

* Decrement self.current while popping from front

* Fix issue with conflicting updates to self.current

* Realised that truncate is intentional

* Use saturating_sub when decrementing current

* Fix naming of previous jump, and remove unneeded comment change

* Remove unnecessary changes in push

* Return num elements removed from front, and use in backward method

* Hide num_removed from public interface and tidy up jump location check
2024-06-18 10:42:46 +02:00
dependabot[bot]
8a549b767b
build(deps): bump the rust-dependencies group across 1 directory with 5 updates (#10926)
* build(deps): bump the rust-dependencies group across 1 directory with 5 updates

Bumps the rust-dependencies group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [unicode-width](https://github.com/unicode-rs/unicode-width) | `0.1.12` | `0.1.13` |
| [regex](https://github.com/rust-lang/regex) | `1.10.4` | `1.10.5` |
| [url](https://github.com/servo/rust-url) | `2.5.0` | `2.5.1` |
| [open](https://github.com/Byron/open-rs) | `5.1.3` | `5.1.4` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.98` | `1.0.99` |



Updates `unicode-width` from 0.1.12 to 0.1.13
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.12...v0.1.13)

Updates `regex` from 1.10.4 to 1.10.5
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5)

Updates `url` from 2.5.0 to 2.5.1
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.0...v2.5.1)

Updates `open` from 5.1.3 to 5.1.4
- [Release notes](https://github.com/Byron/open-rs/releases)
- [Changelog](https://github.com/Byron/open-rs/blob/main/changelog.md)
- [Commits](https://github.com/Byron/open-rs/compare/v5.1.3...v5.1.4)

Updates `cc` from 1.0.98 to 1.0.99
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.98...1.0.99)

---
updated-dependencies:
- dependency-name: unicode-width
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: open
  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
...

Signed-off-by: dependabot[bot] <support@github.com>

* helix-tui: Use zero-width-space for zero-width grapheme test

The update of unicode-width 0.1.13 in the parent commit changed the
width of the U+1 codepoint to 1 from 0, causing the test to fail. We
can switch to a well known zero-width codepoint of U+200B to fix the
behavior.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-06-12 01:08:50 +09:00
Hendrik Wolff
265608a3d8
Auto Save All Buffers After A Delay (#10899)
* auto save after delay

* configable

* clearer names

* init

* working with some odd behaviour

* working with greater consistency

* Apply reviewer suggestions

- Remove unneccessary field
- Remove blocking save

* Improve auto-save configuration

Auto save can be configured to trigger on focus loss:
```toml
auto-save.focus-lost = true|false
```

and after a time delay (in milli seconds) since last keypress:
```toml
auto-save.after-delay.enable = true|false
auto-save.after-delay.timeout = [0, u64::MAX] # default: 3000
```

* Remove boilerplate and unnecessary types

* Remove more useless types

* Update docs for auto-save.after-delay

* Fix wording of (doc) comments relating to auto-save

* book: Move auto-save descriptions to separate section

---------

Co-authored-by: Miguel Perez <miguelvojito@gmail.com>
Co-authored-by: Miguel Perez <perezoji@cs.fsu.edu>
2024-06-11 00:39:06 +02:00
dependabot[bot]
6dbab51f4a
build(deps): bump the rust-dependencies group across 1 directory with 10 updates (#10871)
Bumps the rust-dependencies group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde) | `1.0.201` | `1.0.203` |
| [toml](https://github.com/toml-rs/toml) | `0.8.12` | `0.8.13` |
| [parking_lot](https://github.com/Amanieu/parking_lot) | `0.12.2` | `0.12.3` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.83` | `1.0.86` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.37.0` | `1.38.0` |
| [libc](https://github.com/rust-lang/libc) | `0.2.154` | `0.2.155` |
| [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) | `0.10.3` | `0.11.0` |
| [open](https://github.com/Byron/open-rs) | `5.1.2` | `5.1.3` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.60` | `1.0.61` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.97` | `1.0.98` |



Updates `serde` from 1.0.201 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.203)

Updates `toml` from 0.8.12 to 0.8.13
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.12...toml-v0.8.13)

Updates `parking_lot` from 0.12.2 to 0.12.3
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.2...0.12.3)

Updates `anyhow` from 1.0.83 to 1.0.86
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.83...1.0.86)

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

Updates `libc` from 0.2.154 to 0.2.155
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.154...0.2.155)

Updates `pulldown-cmark` from 0.10.3 to 0.11.0
- [Release notes](https://github.com/raphlinus/pulldown-cmark/releases)
- [Commits](https://github.com/raphlinus/pulldown-cmark/compare/v0.10.3...v0.11.0)

Updates `open` from 5.1.2 to 5.1.3
- [Release notes](https://github.com/Byron/open-rs/releases)
- [Changelog](https://github.com/Byron/open-rs/blob/main/changelog.md)
- [Commits](https://github.com/Byron/open-rs/compare/v5.1.2...v5.1.3)

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

Updates `cc` from 1.0.97 to 1.0.98
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.97...1.0.98)

---
updated-dependencies:
- dependency-name: serde
  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: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: anyhow
  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-minor
  dependency-group: rust-dependencies
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: pulldown-cmark
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: open
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: thiserror
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 17:08:51 +09:00
Poliorcetics
972265640d
fix: correctly reset inlay hints when stopping or restarting LSPs for a document (#10741) 2024-06-02 10:39:48 -05:00
Kirawi
5b9f5f9fdb
Handle relative symlinks on write (#10790)
try again

try

wip
2024-05-21 06:46:24 +09:00
Blaž Hrastnik
dfcd814389 tui: Constify functions, shrink Margin representation 2024-05-21 04:34:36 +09:00
Michael Davis
855568fa34
Synchronize files after writing (#10735)
fsync(2) is a somewhat expensive operation that flushes writes to the
underlying disk/SSD. It's typically used by databases to ensure that
writes survive very hard failure scenarios like your cat kicking the
plug out of the wall. Synchronizing isn't automatically done by
`flush`ing (from the `std::io::Write` or `tokio::io::AsyncWriteExt`
traits). From the [`tokio::fs::File`] moduledocs:

> To ensure that a file is closed immediately when it is dropped, you
> should call `flush` before dropping it. Note that this does not ensure
> that the file has been fully written to disk; the operating system
> might keep the changes around in an in-memory buffer. See the
> `sync_all` method for telling the OS to write the data to disk.

[`tokio::fs::File`]: https://docs.rs/tokio/latest/tokio/fs/struct.File.html
2024-05-14 01:37:35 +02:00
dependabot[bot]
f656b4f3a7
build(deps): bump the rust-dependencies group across 1 directory with 11 updates (#10715)
Bumps the rust-dependencies group with 11 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [tree-sitter](https://github.com/tree-sitter/tree-sitter) | `0.22.5` | `0.22.6` |
| [unicode-width](https://github.com/unicode-rs/unicode-width) | `0.1.11` | `0.1.12` |
| [hashbrown](https://github.com/rust-lang/hashbrown) | `0.14.3` | `0.14.5` |
| [serde](https://github.com/serde-rs/serde) | `1.0.198` | `1.0.200` |
| [parking_lot](https://github.com/Amanieu/parking_lot) | `0.12.1` | `0.12.2` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.82` | `1.0.83` |
| [libc](https://github.com/rust-lang/libc) | `0.2.153` | `0.2.154` |
| [rustix](https://github.com/bytecodealliance/rustix) | `0.38.32` | `0.38.34` |
| [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) | `0.10.0` | `0.10.3` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.58` | `1.0.60` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.95` | `1.0.97` |



Updates `tree-sitter` from 0.22.5 to 0.22.6
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Changelog](https://github.com/tree-sitter/tree-sitter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.22.5...v0.22.6)

Updates `unicode-width` from 0.1.11 to 0.1.12
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.11...v0.1.12)

Updates `hashbrown` from 0.14.3 to 0.14.5
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.14.3...v0.14.5)

Updates `serde` from 1.0.198 to 1.0.200
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.200)

Updates `parking_lot` from 0.12.1 to 0.12.2
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.2)

Updates `anyhow` from 1.0.82 to 1.0.83
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.82...1.0.83)

Updates `libc` from 0.2.153 to 0.2.154
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.153...0.2.154)

Updates `rustix` from 0.38.32 to 0.38.34
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.32...v0.38.34)

Updates `pulldown-cmark` from 0.10.0 to 0.10.3
- [Release notes](https://github.com/raphlinus/pulldown-cmark/releases)
- [Commits](https://github.com/raphlinus/pulldown-cmark/compare/v0.10.0...v0.10.3)

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

Updates `cc` from 1.0.95 to 1.0.97
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.95...1.0.97)

---
updated-dependencies:
- dependency-name: tree-sitter
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: unicode-width
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: hashbrown
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: pulldown-cmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: thiserror
  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
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 21:43:40 +02:00
Michael Davis
5c11af1479 cargo fmt 2024-05-07 15:15:52 -04:00
Michael Davis
9dd51e75e0 Resolve new Clippy lints 2024-05-07 15:15:52 -04:00