aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands/typed.rs
Commit message (Collapse)AuthorAge
* various fixes in write-all pathSkyler Hawthorne2022-10-19
|
* fix panic when view of pending write is closedSkyler Hawthorne2022-10-19
|
* fix write-quit with auto formatSkyler Hawthorne2022-10-19
| | | | | write-quit will now save all files successfully even when there is auto formatting
* fix modified status with auto formatSkyler Hawthorne2022-10-19
|
* improve reliability of shutdownSkyler Hawthorne2022-10-19
|
* add conditional noop render backSkyler Hawthorne2022-10-19
| | | | It makes it much slower without stubbing this out
* update write-quit to wait for savesSkyler Hawthorne2022-10-19
|
* fix buffer-closeSkyler Hawthorne2022-10-19
|
* fix(write): do not set new path on document until write succeedsSkyler Hawthorne2022-10-19
| | | | | | 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.
* fix: buffer-close ensuring writesSkyler Hawthorne2022-10-19
| | | | Make sure buffer-close waits for the document to finish its writes.
* chore(write): serialize write operations within a DocumentSkyler Hawthorne2022-10-19
| | | | | | | | | | | | | | | 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.
* display tree sitter scopes in a popup (#4337)Roberto Vidal2022-10-18
|
* fix `:insert-output` doc: inserting output **before** each selection (#4286)ZJPzjp2022-10-15
|
* Apply transactions to the jumplist for undo/redo (#4227)Michael Davis2022-10-12
| | | | | Undo/redo/earlier/later call `Document::apply_impl` which applies transactions to the document. These transactions also need to be applied to the view as in 0aedef0.
* Add a helper function for applying transactionsMichael Davis2022-10-11
| | | | | | It is easy to forget to call `Document::apply` and/or `View::apply` in the correct order. This commit introduces a helper function which closes over both calls.
* Apply transactions to ViewsMichael Davis2022-10-11
| | | | | | This change adds View::apply calls for all Document::apply call-sites, ensuring that changes to a document do not leave invalid entries in the View's jumplist.
* Change focus to modified docs on quit (#3872)A-Walrus2022-10-03
| | | | | | | | | | | | | | | | | | * Change focus to modified docs on quit When quitting with modified documents, automatically switch focus to one of them. * Update helix-term/src/commands/typed.rs Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com> * Make it work with buffer-close-all and the like * Cleanup Use Cow instead of String, and rename DoesntExist -> DoesNotExist Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
* Find workspace from document path (#3553)ath32022-10-03
|
* Add goto preview (#2982)Joe2022-10-03
|
* add :lsp-restart command (#3435)Filipe Azevedo2022-09-20
|
* Fix preview bug (#3644)Joe2022-09-20
| | | | | * Fix preview bug * Add comment to empty case
* Remove the .txt suffix from tutorBlaž Hrastnik2022-09-11
| | | | | | | | | | | | 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
* Switch to Result for invalid languageA-Walrus2022-09-10
|
* Add error handling to set language commandA-Walrus2022-09-10
| | | | | If you type a nonexistant language an appropriate message will show, and the language won't be changed.
* Fix :reflow panic by enusring cursor in view (#3733)A-Walrus2022-09-07
|
* Detect indent-style in `:set-language` (#3330)Michael Davis2022-08-05
| | | | | | | Indent style may change when choosing a language with `:set-language`. Line-endings most likely will not change, but `:set-language` should have a similar effect as reloading a file (`:reload`), plus the two are currently grouped in the implementation and line-ending detection is not particularly expensive.
* Avoid copying fragments (#3136)Matthias Deiml2022-08-04
| | | | | | | * Avoid copying fragments * Add slice / slices method * Better documentation for fragment and slice methods
* Shorten embedded command descriptions (#3070)Gokul Soumya2022-07-26
| | | | | | | | | * Shorten embedded command descriptions - Compact descriptions in command palette and infobox * Shorten typed command descriptions * Fix typo in decrement command description
* add statusline element to display file line endings (#3113)Alexis Kalabura2022-07-21
| | | | | | | | | * add statusline element to display file line endings * run cargo fmt --all * change the word *ending* from plural to singular * support for the unicode-lines feature flag
* Add lsp signature help (#1755)Gokul Soumya2022-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lsp signature help * Do not move signature help popup on multiple triggers * Highlight current parameter in signature help * Auto close signature help * Position signature help above to not block completion * Update signature help on backspace/insert mode delete * Add lsp.auto-signature-help config option * Add serde default annotation for LspConfig * Show LSP inactive message only if signature help is invoked manually * Do not assume valid signature help response from LSP Malformed LSP responses are common, and these should not crash the editor. * Check signature help capability before sending request * Reuse Open enum for PositionBias in popup * Close signature popup and exit insert mode on escape * Add config to control signature help docs display * Use new Margin api in signature help * Invoke signature help on changing to insert mode
* Add live preview to theme picker (#1798)Joe2022-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add theme picker with live preview * Add live theme preview to :theme command * cargo fmt * Fix clippy warnings * Remove picker variant * Remove unused import * Cleanup * Change current_theme to last_theme * Fix accidental comment flash deletion * Typo * Remove theme cache * Add some comments * Refactor some theme handling TIL flatmap on Option is called and_then * Remove unnecessary renames * Constrain last_theme theme preview lifecycle * Switch to bitflag implementation * Better handling of last_theme * Sort theme names * Better memory juggling * Missed a branch * Remove name from theme, switch bitand to & * cargo fmt * Update helix-view/src/editor.rs * Switch boolean to enum * Remove bitflag impl * cargo fmt * Remove un-needed type arg * cargo fmt
* Remove a couple more unwrapsBlaž Hrastnik2022-06-21
|
* Merge pull request #2359 from dead10ck/test-harnessBlaž Hrastnik2022-06-21
|\ | | | | Integration testing harness
| * fix(command): write-quit: do not quit if write failsSkyler Hawthorne2022-06-19
| | | | | | | | | | | | | | | | | | During write-quit, if the file fails to be written for any reason, helix will still quit without saving the changes. This fixes this behavior by introducing fallibility to the asynchronous job queues. This will also benefit all contexts which may depend on these job queues. Fixes #1575
| * Add more context; Editor::open doesn't need to own pathSkyler Hawthorne2022-06-19
| |
* | Enable shellwords for Windows (with escaping disabled) (#2767)ath32022-06-21
|/
* views -> buffers in write-all (#2788)Gygaxis Vainhardt2022-06-16
|
* Add shell insert commands to typable and config (#2589)Termina942022-06-05
| | | | | | | * Add shell insert commands to typable and config * generate docs Co-authored-by: Dean Revell <revell@gmail.com>
* ensure :quit and :quit! take no arguments (#2654)Michael Davis2022-06-05
|
* append `set_line_ending` to document history (#2649)Kirawi2022-06-02
|
* Fix panic when reloading a shrunk file (#2506)Leoi Hung Kin2022-05-22
| | | | | | | * fix panic when reloading a shrunk file * linting * use scrolloff
* feat(commands): add log-open command (#2422)amaihoefner2022-05-11
|
* Making the 'set-option' command help more descriptive. (#2365)Ben Lee-Cohen2022-05-04
| | | | | | | | | * Making the 'set-option' command help more descriptive. * Adding the generated docs * Making the message multi-line * Replace newline with break in generated docs
* feat(commands): make it possible to disable format-on-save via the ↵unrelentingtech2022-05-02
| | | | 'auto-format' option (#2321)
* add reflow command (#2128)Vince Mutolo2022-05-02
| | | | | | | | | | | | | | | | | | | | | | | * add reflow command Users need to be able to hard-wrap text for many applications, including comments in code, git commit messages, plaintext documentation, etc. It often falls to the user to manually insert line breaks where appropriate in order to hard-wrap text. This commit introduces the "reflow" command (both in the TUI and core library) to automatically hard-wrap selected text to a given number of characters (defined by Unicode "extended grapheme clusters"). It handles lines with a repeated prefix, such as comments ("//") and indentation. * reflow: consider newlines to be word separators * replace custom reflow impl with textwrap crate * Sync reflow command docs with book * reflow: add default max_line_len language setting Co-authored-by: Vince Mutolo <vince@mutolo.org>
* Add run-shell-command for Commands (#1682)Ryosuke Hayashi2022-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add run_shell_command * docgen * fix command name Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * refactored Info::new * show 'Command failed' if execution fails * TypedCommand takes care of error handling and printing the error to the statusline. * docgen * use Popup instead of autoinfo * remove to_string in format! * Revert chage in info.rs * Show "Command succeed" when success * Fix info.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* fix typos (#2304)chunghha2022-04-27
|
* Fix paste direction for typed paste commands (#2288)Michael Davis2022-04-26
|
* Add :get-option command (#2231)Daniel2022-04-24
|
* Replace line endings using `set_line_ending` command (#1871)Kirawi2022-04-23
| | | | | | | * set_line_ending: now replace line endings * use ending.len_chars() directly * account for unicode-lines feaure in line-ending doc