| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
| |
to restore cursor to user default after exiting helix (#3289)
|
| |
|
| |
|
|
|
|
|
|
|
| |
* add logging to clipboard setup
* healthcheck: add clipboard provider name
Co-authored-by: amitbeka <--->
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The language server sends a char offset range within the
signature help label text to highlight as the current parameter,
but helix uses byte offset ranges for rendering highlights. This
was brought up in the [review of the original signature help PR][1],
but the ranges were being highlighted correctly, and there were no
out of bound or indexing panics. Turns out rust-analyzer was
[incorrectly sending byte offsets] instead of char offsets and this
made it seem like all was well and good with offsets in helix during
initial testing.
[1]: https://github.com/helix-editor/helix/pull/1755#discussion_r906715371
[2]: https://github.com/rust-lang/rust-analyzer/pull/12272
|
|
|
| |
Closes #2312
|
|
|
|
|
|
|
|
|
|
|
| |
* add configurable separator element to statusline
* themable separator
* clippy fixes
* changed default separator to │
* doc updates
|
|
|
|
|
|
|
|
|
| |
* added position-pct as a statusline indicator
* removed unnecessary mutable reference
* pct -> percent
* percent -> percentage
|
|
|
|
|
|
|
|
|
| |
* Shorten embedded command descriptions
- Compact descriptions in command palette and infobox
* Shorten typed command descriptions
* Fix typo in decrement command description
|
|
|
|
|
|
|
| |
* add code for diagnostic.
This PR provides a solution to resolve #2994. missing Code Actions for lsp
* remote unused import
|
|
|
|
|
| |
* add spacer element to statusline
* docs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 <>
|
|
|
|
|
|
|
| |
* keep jump/file history when using :split
* move history cloning into the switch function
Co-authored-by: Robin <robinvandijk@klippa.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* jumplist picker
* remove jumps slicing
Co-authored-by: Benoît Cortier <bcortier@proton.me>
* remove unnecessary deref format! parameter
Co-authored-by: Benoît Cortier <bcortier@proton.me>
Co-authored-by: Benoît Cortier <bcortier@proton.me>
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
Fixes #3087
Refs #3105
# modified: theme.toml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
* support prefilling prompt
* introduce with_line builder method in Prompt
* extract show_prompt
* use textobject_word as fallback input
|
| |
|
|
|
|
| |
If all gutters are removed, there are still an extra one padding, would be nice
to remove that to save some space.
|
|
|
|
|
| |
* support toggling pickers' preview panel
* add doc for toggling preview
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
|
| |
* fix: error that caused usize to overflow
* update: changed check_sub to saturating_sub
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It is usually the name of the LSP and doesn't add much
useful information.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix backwards selection duplication widening bug
* Add integration tests
* Make tests line-ending agnostic
Make tests line-ending agnostic
Use indoc to fix tests
Fix line-ending on test input
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactor menu::Item to accomodate external state
Will be useful for storing editor state when reused by pickers.
* Add some type aliases for readability
* Reuse menu::Item trait in picker
This opens the way for merging the menu and picker code in the
future, since a picker is essentially a menu + prompt. More
excitingly, this change will also allow aligning items in the
picker, which would be useful (for example) in the command palette
for aligning the descriptions to the left and the keybinds to
the right in two separate columns.
The item formatting of each picker has been kept as is, even though
there is room for improvement now that we can format the data into
columns, since that is better tackled in a separate PR.
* Rename menu::Item::EditorData to Data
* Call and inline filter_text() in sort_text() completion
* Rename diagnostic picker's Item::Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Sort themes by score & then name
Previously the themes were appearing unordered after typing ':theme '.
This sorts them first by fuzzy score and then by name so that they
generally appear in a more ordered fashion in the initial list.
The sort by name does not really pay off when there is a score so an
alternative approach would be to sort by name if there is string to
fuzzy match against and otherwise sort by score.
I've lowercased the names as that avoids lower case & upper case letters
being sorted into separate groups. There might be a preferable approach
to that though.
* Sort language & files by score then name
And change to use sort_unstable_by instead of sort_unstable_by_key as it
allows us to avoid some allocations.
I don't fully understand the flow of the 'filename_impl' function but
this seems to deliver the desired results.
* Remove unnecessary reference
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* adds --vsplit and --hsplit arguments
* moved comment
* fixed lint (third time's a charm)
* changed vsplit and hsplit from two separate bools to type Option<Layout>, and some cleanup
|
|
|
|
|
|
|
| |
* Make view mode more pager-like
Addresses #2721
* Remove view mode bindings for J and K
|
|
|
|
|
|
|
|
|
|
|
| |
* delete_backwards_char accepts any type of whitespace
* Fix inconsistency, where unicode whitespaces are treated as normal whitespaces
* Changed back to direct whitespace match
* Only accept explicit whitespace / tabs
Co-authored-by: s0LA1337 <dreamer@neoncity.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add mode specific styles
In similar vein to neovim's lualine and similar statusline packages this
allows helix users to style their mode based on which mode it is thus
making each mode more visually distinct at a glance
* Add an example based on rosepine
* Add editor.colors-mode config
* Document statusline mode styles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add workspace and document diagnostics picker
fixes #1891
* Fix some of @archseer's annotations
* Add From<&Spans> impl for String
* More descriptive parameter names.
* Adding From<Cow<str>> impls for Span and Spans
* Add new keymap entries to docs
* Avoid some clones
* Fix api change
* Update helix-term/src/application.rs
Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>
* Fix a clippy hint
* Sort diagnostics first by URL and then by severity.
* Sort diagnostics first by URL and then by severity.
* Ignore missing lsp severity entries
* Add truncated filepath
* Typo
* Strip cwd from paths and use url-path without schema
* Make tests a doctest
* Better variable names
Co-authored-by: Falco Hirschenberger <falco.hirschenberger@itwm.fraunhofer.de>
Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* fixes background reset
* moves creation of default style out of loop
* patches with background_style
* removes commented code
|
| |
|
|
|
|
|
|
| |
- Simplified match statements by destructuring MouseEvent struct
at the top and then matching on event.kind.
- Extracted out closures for calculating (1) position and view
of mouse click and (2) gutter coordinates and view of mouse click.
|
|
|
|
|
|
|
|
|
| |
textDocument/documentHighlight (#2738)
* feat: highlight symbol under cursor using LSP textDocument/documentHighlight
* fix: please clippy
* fix: shorter description and code style
|
| |
|