Commit Graph

295 Commits (caac568ded9b1d2fe5f30f2ad65e35bb6a0f7b8a)

Author SHA1 Message Date
trivernis caac568ded
Merge branch 'master' 1 year ago
Lorenzo Albano b7ca0581d8
Store new config on application in :config-reload (#5431)
After changes in #5239, the loaded configuration wasn't stored,
resulting in a success message even if the instance kept the previous
configuration values.
1 year ago
Ethan Kiang 0dbee9590b
Fix language config reload logic (#5381) 1 year ago
willful759 9d15b85209
Reload language config with `:config-reload` (#5239) 1 year ago
trivernis 3256b01388
Merge remote-tracking branch 'origin/master' 1 year ago
Nick 24c3b00d10
Avoid trailing `s` in message when only 1 file is opened (#5189) 1 year ago
sigmaSd 4960c41f18
feat(lsp): add support for lsp Diagnostic{}.data (#4935) 1 year ago
Pascal Kuthe 5a3ff74221
Show (git) diff signs in gutter (#3890)
* Show (git) diff signs in gutter (#3890)

Avoid string allocation when git diffing

Incrementally diff using changesets

refactor diffs to be provider indepndent and improve git implementation

remove dependency on zlib-ng

switch to asynchronus diffing with similar

Update helix-vcs/Cargo.toml

fix toml formatting

Co-authored-by: Ivan Tham <pickfire@riseup.net>

fix typo in documentation

use ropey reexpors from helix-core

fix crash when creating new file

remove useless use if io::Cursor

fix spelling mistakes

implement suggested improvement to repository loading

improve git test isolation

remove lefover comments

Co-authored-by: univerz <univerz@fu-solution.com>

fixed spelling mistake

minor cosmetic changes

fix: set self.differ to None if decoding the diff_base fails

fixup formatting

Co-authored-by: Ivan Tham <pickfire@riseup.net>

reload diff_base when file is reloaded from disk

switch to imara-diff

Fixup formatting

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

Redraw buffer whenever a diff is updated.

Only store hunks instead of changes for individual lines to easily allow
jumping between them

Update to latest gitoxide version

Change default diff gutter position

Only update gutter after timeout

* update diff gutter synchronously, with a timeout

* Apply suggestions from code review

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* address review comments and ensure lock is always aquired

* remove configuration for redraw timeout

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
trivernis e20886dd60
Merge branch 'master' 1 year ago
Michael Davis 8be2d1dcbf
Handle language server termination (#4797)
This change handles a language server exiting. This was a UX sore-spot:
if a language server crashed, Helix did not recognize the exit and
continued to send requests to it. All requests would timeout since they
would not receive responses. This would also hold-up Helix closing
itself down since it would try to gracefully shutdown the server which
is implemented in the LSP spec as a request.

We could attempt to automatically restart the language server on crash.
I left this for future work since that change will need to be slightly
complicated: it will need to cover the case of a language server
repeatedly crashing.
2 years ago
Blaž Hrastnik 758bace221
fix test compilation 2 years ago
Blaž Hrastnik 264a455c18
Move terminal out of compositor 2 years ago
Blaž Hrastnik 00d7b18097
This term specific behavior really doesn't belong to compositor 2 years ago
trivernis 3893898ffc
Merge branch 'master' 2 years ago
Blaž Hrastnik c2c1280f02
Resolve a bunch of upcoming clippy lints 2 years ago
trivernis 46b135bdc5
Merge branch 'master' 2 years ago
Alexis (Poliorcetics) Bourget 3aea33a415 nit: move an allocation to happen after a `continue`, making sure it's
not done for nothing
2 years ago
Charlie Groves 7e29ee6dae
Autosave all when the terminal loses focus (#3178)
* Autosave all when the terminal loses focus

* Correct comment on focus config

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Need a block_try_flush_writes in all quit_all paths

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Skyler Hawthorne e645804b0a Editor::flush_writes returns an error 2 years ago
Blaž Hrastnik 52ba550098 Use flush_writes in application.close() 2 years ago
Blaž Hrastnik 55b50d9e83 Seems like this flush is unnecessary 2 years ago
Blaž Hrastnik b0212b3611 Deduplicate flush_writes 2 years ago
Blaž Hrastnik 30c93994b5 Use a single save_queue on the editor 2 years ago
Skyler Hawthorne beb3427bfb improve app close failure display 2 years ago
Skyler Hawthorne 31d1bbfddb review comments 2 years ago
Skyler Hawthorne 3f07885b35 document should save even if formatter fails 2 years ago
Skyler Hawthorne b530a86d1f remove Callback::Compositor variant
To reduce likelihood of accidental discarding of important callbacks
2 years ago
Skyler Hawthorne b3fc31a211 move language server refresh to document saved event handler 2 years ago
Skyler Hawthorne 18c32118b1 Save text in document saved events, use in status message 2 years ago
Skyler Hawthorne f82a551b98 Rename doc save event names to past tense 2 years ago
Skyler Hawthorne d544376590 reset idle timer for all events 2 years ago
Skyler Hawthorne 8c667ef8de factor editor event handling into function 2 years ago
Skyler Hawthorne aaa1450678 fix write-quit with auto format
write-quit will now save all files successfully even when there is auto
formatting
2 years ago
Skyler Hawthorne cb23399dee improve reliability of shutdown 2 years ago
Skyler Hawthorne b8a07f7d15 add conditional noop render back
It makes it much slower without stubbing this out
2 years ago
Skyler Hawthorne e1f7bdb1d2 fix buffer-close 2 years ago
Skyler Hawthorne 83b6042b97 fix(write): do not set new path on document until write succeeds
If a document is written with a new path, currently, in the event that
the write fails, the document still gets its path changed. This fixes
it so that the path is not updated unless the write succeeds.
2 years ago
Skyler Hawthorne a5a93182cd fix: buffer-close ensuring writes
Make sure buffer-close waits for the document to finish its writes.
2 years ago
Skyler Hawthorne d706194597 chore(write): serialize write operations within a Document
The way that document writes are handled are by submitting them to the
async job pool, which are all executed opportunistically out of order. It
was discovered that this can lead to write inconsistencies when there
are multiple writes to the same file in quick succession.

This seeks to fix this problem by removing document writes from the
general pool of jobs and into its own specialized event. Now when a
user submits a write with one of the write commands, a request is simply
queued up in a new mpsc channel that each Document makes to handle its own
writes. This way, if multiple writes are submitted on the same document,
they are executed in order, while still allowing concurrent writes for
different documents.
2 years ago
trivernis 1ad06ee586
Merge branch 'master' 2 years ago
trivernis 8b789b6b86
Merge branch 'seperate_code_action' 2 years ago
Gokul Soumya 001858b11f
Propagate idle timeout event to components (#3172) 2 years ago
Skyler Hawthorne 27b70696df
Exit gracefully when close operation fails (#4081)
If the close method fails, the editor will quit before restoring the
terminal. This causes the shell to break if, e.g. the LS times out
shutting down.

This fixes this by always restoring the terminal after closing, and
printing out a message to stderr if there is an error.
2 years ago
Karsten Gebbert 9124c231f4
respond to SIGUSR1 by reloading config (#3952)
* respond to SIGUSR1 by reloading config

* document USR1 signal handling
2 years ago
trivernis 0725aa1046
Add flag to open the file explorer on startup
Signed-off-by: trivernis <trivernis@protonmail.com>
2 years ago
Blaž Hrastnik 1df32c917c diagnostics: Use Vec<Tag> instead of Option<Vec<Tag>> 2 years ago
Luke Cycon 64b0745413
Track source and tags in diagnostics (#3898) 2 years ago
Blaž Hrastnik c2e41082e4
Remove the .txt suffix from tutor
The tutor file is loaded as .txt which can potentially spawn a
language server. Then the path is unset, but the LS remains active.
This can cause panics since updates are now submitted for a doc
with no path.

As a quick workaround we remove the extension which should avoid
detection.

Fixes #3730
2 years ago
A-Walrus 9c627c65e5
Improve error handling for config-reload (#3668)
* Don't change config to default when refreshing invalid config

* Propely handle theme errors with config-reload

* Extract refresh theme into seperate function
2 years ago
Blaž Hrastnik 44b447947c
fix: lsp: Don't send didOpen events for documents with no URL
Fixes #3683
2 years ago