* auto pair-removal
Fixes https://github.com/helix-editor/helix/issues/1673
* autopairs removal: use doc autopairs
* autopairs-removal: limit to one-char selections
* use single_grapheme() to check if range is one char
* fix errouneous deletes of " and other symmetric autopairs when at buffer start
Co-authored-by: Houkime <>
* 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
The fix comes from the rewriting of the `closure_parameters` stanza:
it was capturing the entire `closure_parameters` node including
paretheses, whitespace, and commas. Capturing the identifiers within
fixes the tracking.
In order to make sure locals definitions from closure parameters don't
leak out of the body of the closure, though, we should also mark the
closure itself as a locals scope.
* 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
* feat(statusline): add the file type (language id) to the status line
* refactor(statusline): move the statusline implementation into an own struct
* refactor(statusline): split the statusline implementation into different functions
* refactor(statusline): Append elements using a consistent API
This is a preparation for the configurability which is about to be
implemented.
* refactor(statusline): implement render_diagnostics()
This avoid cluttering the render() function and will simplify
configurability.
* feat(statusline): make the status line configurable
* refactor(statusline): make clippy happy
* refactor(statusline): avoid intermediate StatusLineObject
Use a more functional approach to obtain render functions and write to
the buffers, and avoid an intermediate StatusLineElement object.
* fix(statusline): avoid rendering the left elements twice
* refactor(statusline): make clippy happy again
* refactor(statusline): rename `buffer` into `parts`
* refactor(statusline): ensure the match is exhaustive
* fix(statusline): avoid an overflow when calculating the maximal center width
* chore(statusline): Describe the statusline configurability in the book
* chore(statusline): Correct and add documentation
* refactor(statusline): refactor some code following the code review
Avoid very small helper functions for the diagnositcs and inline them
instead.
Rename the config field `status_line` to `statusline` to remain
consistent with `bufferline`.
* chore(statusline): adjust documentation following the config field refactoring
* revert(statusline): revert regression introduced by c0a1870
* chore(statusline): slight adjustment in the configuration documentation
* feat(statusline): integrate changes from #2676 after rebasing
* refactor(statusline): remove the StatusLine struct
Because none of the functions need `Self` and all of them are in an own
file, there is no explicit need for the struct.
* fix(statusline): restore the configurability of color modes
The configuration was ignored after reintegrating the changes of #2676
in 8d28f95.
* fix(statusline): remove the spinner padding
* refactor(statusline): remove unnecessary format!()
Ctrl-based shortcuts are common in numerous applications.
This change:
- Adds Ctrl+{Left/Right/Backspace/Delete} for word-wise movement/deletion in prompt, picker, …
- Removes Alt-Left and Alt-Right in prompt, picker, …
- Adds Alt-Delete in insert mode for forward word deletion
In some terminals, Alt-Backspace might not work because it is ambigous.
See: https://github.com/helix-editor/helix/pull/2193#issuecomment-1105042501
Hence, Alt alternative is not removed.