| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
|
|
|
|
| |
write-quit will now save all files successfully even when there is auto
formatting
|
| |
|
|
|
|
| |
It makes it much slower without stubbing this out
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
as the default file picker (#4334)
Skip searching .git in global search, similar to how file picker skips listing files in .git.
|
|
|
| |
Co-authored-by: Nathaniel Graham <ngraham@protonmail.com>
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change automatically tracks pending text for for commands which use
on-next-key callbacks. For example, `t` will await the next key event
and "t" will be shown in the bottom right-hand corner to show that we're
in a pending state.
Previously, the text for these on-next-key commands needed to be
hard-coded into the command definition which had some drawbacks:
* It was easy to forget to write and clear the pending text.
* If a command was remapped in a custom config, the pending text would
still show the old key.
With this change, pending text is automatically tracked based on the
key events that lead to the command being executed. This works even
when the command is remapped in config and when the on-next-key
callback is nested under some key sequence (for example `mi`).
|
|
|
|
|
|
|
|
|
|
|
| |
* keymap: Rename A "Insert at end of line"
The language for the `A` binding is potentially confusing because
`A` behaves like `i` done at the end of the line rather than `a`.
This change renames the command to match Kakoune's language[^1].
[^1]: https://github.com/mawww/kakoune/blob/021da117cf90bf25b65e3344fa8e43ab4262b714/src/normal.cc#L2229
* keymap: Rename I `insert_at_line_start`
|
|
|
|
|
|
|
|
|
| |
* Select inserted space after join
* Split join_selections with space selection to A-J
Kakoune does that too and some users may still want to retain their selections.
* Update join_selections docs
|
| |
|
|
|
|
|
| |
* goto_window_* extends selection
* Don't push to the jumplist
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the behavior of operations like `]f`/`[f` to set the
direction of the new range to the direction of the action.
The original behavior was to always use the head of the next function.
This is inconsistent with the behavior of goto_next_paragraph and makes
it impossible to create extend variants of the textobject motions.
This causes a behavior change when there are nested functions. The
behavior in the parent commit is that repeated uses of `]f` will
select every function in the file even if nested. With this commit,
functions are skipped.
It's notable that it's possible to emulate the original behavior by
using the `ensure_selections_forward` (A-:) command between invocations
of `]f`.
|
|
|
|
|
|
|
|
|
| |
* Show status msg when next/prev cycles around
* Add msg when there is no wraparound
* Cleanup code
* Change msg to "Wrapped around document"
|
| |
|
|
|
| |
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Split helix_core::find_root and helix_loader::find_local_config_dirs
The documentation of find_root described the following priority for
detecting a project root:
- Top-most folder containing a root marker in current git repository
- Git repository root if no marker detected
- Top-most folder containing a root marker if not git repository detected
- Current working directory as fallback
The commit contained in https://github.com/helix-editor/helix/pull/1249
extracted and changed the implementation of find_root in find_root_impl,
actually reversing its result order (since that is the order that made
sense for the local configuration merge, from innermost to outermost
ancestors).
Since the two uses of find_root_impl have different requirements (and
it's not a matter of reversing the order of results since, e.g., the top
repository dir should be used by find_root only if there's not marker in
other dirs), this PR splits the two implementations in two different
specialized functions.
In doing so, find_root_impl is removed and the implementation is moved
back in find_root, moving it closer to the documented behaviour thus
making it easier to verify it's actually correct
* helix-core: remove Option from find_root return type
It always returns some result, so Option is not needed
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`extend_line_above` (and `extend_line` when facing backwards) skip
a line when the current range does not fully cover a line.
Before this change:
foo
b#[|a]#r
baz
With `extend_line_above` or `extend_line` selected the line above.
#[|foo
bar]#
baz
Which is inconsistent with `extend_line_below`. This commit changes
the behavior to select the current line when it is not already
selected.
foo
#[|bar]#
baz
Then further calls of `extend_line_above` extend the selection up
line-wise.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This refactor changes the overall structure of the goto_ts_object_impl
command without removing any functionality from its behavior. The
refactored motion:
* acts on all selections instead of reducing to one selection
* may be repeated with the `repeat_last_motion` (A-.) command
* informs the user when the syntax-tree is not accessible in the current buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds documents to the view's document history Vec.
(This is used by `ga` for example to access the last buffer.)
Previously, a sequence like so would have confusing behavior:
1. Open file A: any document with an active language server
2. Find some definition that lives in another file - file B - with `gd`
3. Jump back in the jumplist with `C-o` to file A
4. Use `ga` intending to switch back to file B
The behavior prior to this change was that `ga` would switch to file
A: you could not use `ga` to switch to file B.
|
|
|
|
|
| |
* Fix process spawning error handling
* Log stderr in any case
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* let extend-line respect range direction
* fix extend above logic
* keep `x` existing binding
* Update book/src/keymap.md
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update description of `m` textobject to its actual functionality
Sometime recently the functionality of `m` was changed to match the
nearest pair to the cursor, rather than the former functionality of
matching the pair only if the cursor was on one of the brace characters
directly.
* Rename surround methods to reflect that they work on pairs
The current naming suggests that they may work generally on any
textobject, whereas their implementation really focuses on pairs.
* Change description of m textobject to match actual functionality
The current implementation of `m` no longer merely looks at the pair
character the cursor is on, but actually will search for the pair
(defined in helix-core/src/surround.rs) that encloses the cursor, and
not the entire selection.
* Accept suggested wording change
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Prefix pair surround for consistency
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* Revert 3121353c6ab2fbc5fced28f075c7fc45b53b661e
* Switch to conditional compilation
* Run formatter
* Switch from conditional compilation to compile-time bool
|
|
|
|
|
|
|
|
|
|
| |
Ported over from 61365dfbf3 in the `gui` branch. This will allow
adding our own events, most notably an idle timer event (useful
for adding debounced input in [dynamic pickers][1] used by interactive
global search and workspace symbols).
[1]: https://github.com/helix-editor/helix/pull/3110
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Avoid setting stdin handle when not necessary
Avoid setting the stdin handle in `shell_impl` when the input argument
is None.
This permits to run commands with no stdin with :sh
* refactoring to avoid code duplication
* making clippy happy
* Process variable name fix
|
|
|
|
|
|
|
| |
* Avoid copying fragments
* Add slice / slices method
* Better documentation for fragment and slice methods
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change default formatter for any language
* Fix clippy error
* Close stdin for Stdio formatters
* Better indentation and pattern matching
* Return Result<Option<...>> for fn format instead of Option
* Remove unwrap for stdin
* Handle FormatterErrors instead of Result<Option<...>>
* Use Transaction instead of LspFormatting
* Use Transaction directly in Document::format
* Perform stdin type formatting asynchronously
* Rename formatter.type values to kebab-case
* Debug format for displaying io::ErrorKind (msrv fix)
* Solve conflict?
* Use only stdio type formatters
* Remove FormatterType enum
* Remove old comment
* Check if the formatter exited correctly
* Add formatter configuration to the book
* Avoid allocations when writing to stdin and formatting errors
* Remove unused import
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
|
| |
|
|
|
| |
Closes #2312
|
|
|
|
|
|
|
|
|
| |
* Shorten embedded command descriptions
- Compact descriptions in command palette and infobox
* Shorten typed command descriptions
* Fix typo in decrement command description
|