Commit Graph

1808 Commits (f103d2273baef3f0e71b896419fda4538b6c6cde)

Author SHA1 Message Date
Ivan Tham a20a96abdc
Remove apply_transaction helper (#5598) 1 year ago
Pascal Kuthe 0e5159ceca
Fix panic for noop selecting join (#5579) 1 year ago
Pascal Kuthe 7868e5f2d8
highlight non-bar cursors (#5575) 1 year ago
Gokul Soumya 5c7db7aed5 Replace menu::Item::{row, label} with format() 1 year ago
Gokul Soumya b2837ff3be Minimize allocation when converting table rows to string 1 year ago
Gokul Soumya 7a76c6cbba Use upstream implementation of table column calculation
Changed in a68e38e59e.
1 year ago
Gokul Soumya 9aafcb2b9a Reuse table in picker 1 year ago
gibbz00 deae13f404
Primary cursor colors by mode (#5130)
* (theme) feat: mode based primary cursor colors

* docs/themes: mode based primary cursor colors
1 year ago
mejo13 e7e47fd542
Add command to rotate view backward (#5356) 1 year ago
Nikodem Rabuliński 3cf5216dbd
Commit to history after executing a command from the palette (#5294) 1 year ago
greg-enbala 60f84be40c
Separate jump behavior from increment/decrement (#4123)
increment/decrement (C-a/C-x) had some buggy behavior where selections
could be offset incorrectly or the editor could panic with some edits
that changed the number of characters in a number or date. These stemmed
from the automatic jumping behavior which attempted to find the next
date or integer to increment. The jumping behavior also complicated the
code quite a bit and made the behavior somewhat difficult to predict
when using many cursors.

This change removes the automatic jumping behavior and only increments
or decrements when the full text in a range of a selection is a number
or date. This simplifies the code and fixes the panics and buggy
behaviors from changing the number of characters.
1 year ago
Itay123 d3e0f18c89
Added opening files in the background with A-ret shortcut (#4435) 1 year ago
Pascal Sommer 75dfaff338
Add some function documentations (#5360) 1 year ago
Dylan Bulfin c4b0eb8356
Fix autocompletion for paths with period (#5175)
* Bug fix

Updated bug fix

* Simplified conditionals

* Switched to use path separator constant
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) 2 years ago
Gabriel Dinner-David 1b1755240d
fix(commands): extend_line to proper line when count and current line selected (#5288) 2 years ago
Nick c9ed42cdec
Add a status line element that shows just the basename of the file (#5318) 2 years ago
iobtl 6c95411488
Expand `~` when parsing file paths in `:open` (#5329) 2 years ago
willful759 9d15b85209
Reload language config with `:config-reload` (#5239) 2 years ago
Triton171 5f2fe5fca5
Fix erroneous indent between closers of auto-pairs (#5330)
inserting a newline between 2 closers of an auto-pair.
2 years ago
alois31 eb4ec32710
Fix opening new files (#5278)
Commit 1b89d3e535 introduced a regression
where opening a new file would no longer work, because attempting to
canonicalize its path would lead to a "No such file or directory"
error. Fall back to opening a new file when encountering an error to
fix this case.
2 years ago
Nick 24c3b00d10
Avoid trailing `s` in message when only 1 file is opened (#5189) 2 years ago
jliaoh df1830ef28
mouse operations respect scrolloff (#5255) 2 years ago
DylanBulfin 1107296ca9
Add command to merge consecutive ranges in selection (#5047) 2 years ago
Jack Allison 1b89d3e535
Add file picker dialogue when opening a directory with :o (#2707) 2 years ago
Jonathan LEI 24cd7f6adf Make prompt suggestions greyed out 2 years ago
Alex Kladov e6a2df8c79
Better sorting in picker in case of ties (#5169) 2 years ago
Eric Thorburn b12c65678a
Print the binary required by the debug adapter (#5195)
This commit addresses issue 5193, where the author
requested that the name of the binary needed is printed along
with the rest of the health information.

This commit adds a format! macro which formats in the name of the
binary and then it will be printed along with the rest of the
debug information. The value in cmd is referenced to the call
to which, and then consumed upon the call to format!
2 years ago
Blaž Hrastnik ec9aa66902
Remove redraw to fix build 2 years ago
Sebastian Zivota 5c4a9cba9a
Restore deleted goto_pos function (#5164) 2 years ago
Roberto Vidal f916915b53
add redraw command (#4354)
* add redraw command

* update docs

* Update helix-term/src/commands/typed.rs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* update docs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Michael Davis 42ad1a9e04
Select diagnostic range in goto_*_diag commands (#4713)
This roughly matches the behavior of the diagnostic picker: when
jumping to a diagnostic with `[d`/`]d`/`[D`/`]D`, the range of the
diagnostic is selected instead of the start point.
2 years ago
Michael Davis 2a60de74f9 workspace symbols: Default to empty Vec on None
A language server might send None as the response to workspace symbols.
We should treat this as the empty Vec rather than the server sending
an error status. This fixes the interaction with gopls which uses
None to mean no matching symbols.
2 years ago
Michael Davis 35cf972ce4 DynamicPicker: Reset idle timeout on refresh
If the new results shown by the picker select a file that hasn't been
previewed before, the idle timeout would not trigger highlighting on
that file. With this change, we reset the idle timeout and allow that
file to be highlighted on the next idle timeout event.
2 years ago
Michael Davis a7daa02346 DynamicPicker: Use idle-timeout as debounce
This change uses the idle-timeout event to trigger fetching new results
in the DynamicPicker, so idle-timeout becomes a sort of debounce. This
prevents querying the language server overly aggressively.
2 years ago
Gokul Soumya d1f717eb8d Re-request workspace symbols on keypress in picker
Most language servers limit the number of workspace symbols that
are returned with an empty query even though all symbols are
supposed to be returned, according to the spec (for perfomance
reasons). This patch adds a workspace symbol picker based on a
dynamic picker that allows re-requesting the symbols on every
keypress (i.e. when the picker query text changes). The old behavior
has been completely replaced, and I have only tested with
rust-analyzer so far.
2 years ago
Gokul Soumya 914d294499 Add DynamicPicker for updating options on every key 2 years ago
Gokul Soumya c64debc741 Add force_score() for scoring picker items without optimizations 2 years ago
Michael Davis db939801eb
Improve error message handling for theme loading failures (#5073)
The error messages for a theme that failed to be deserialized (or
otherwise failed to load) were covered up by the context/with_context
calls:

* The log message for a bad theme configured in config.toml would only
  say "Failed to deserilaize theme"
* Selecting a bad theme via :theme would show "Theme does not exist"

With these changes, we let the TOML deserializer errors bubble up, so
the error messages can now say the line number of a duplicated
key - and that key's name - when a theme fails to load because of a
duplicated key.

Providing a theme which does not exist to :theme still gives a helpful
error message: "No such file or directory."
2 years ago
Alexander Schlögl 0b96021643
Add `:pipe-to` typable command that ignores shell output (#4931) 2 years ago
Michael Davis cdc54f50a2
Reset mode when changing buffers (#5072)
* Reset mode when changing buffers

This is similar to the change in
e4c9d4082a139aac3aea4506918171b96e81f5b9: reset the editor to normal
mode when changing buffers. Usually the editor is already in normal
mode but it's possible to setup insert-mode keybindings that change
buffers.

* Move normal mode entering code to Editor

This should be called internally in the Editor when changing documents
(Editor::switch) or changing focuses (Editor::focus).
2 years ago
Pascal Kuthe 70d78123b9
properly handle detachted git worktrees (#5097) 2 years ago
Jummit 2ea20a23e2
Fix LSP completions ignoring auto-completion option (#5042) 2 years ago
Matouš Dzivjak 8abed3bd78
feat(lsp): pass client_info on initialization (#4904)
Pass client name ('helix') and client version (version / git hash)
to LSP server on initialization.
2 years ago
ath3 6798a6651f
Only write newlines in menu selection popup if the lsp returns detail (#4902) 2 years ago
Pascal Kuthe af532147c9
Add command/keybinding to jump between hunks (#4650)
* add command and keybding to jump to next/prev hunk

* add textobject for change

* Update helix-vcs/src/diff.rs

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* select entire hunk instead of first char

* fix selection range

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Narazaki Shuji 453a75a373
fix: align view after jumplist_picker (#3743)
* Add `View::ensure_cursor_in_view_center` to adjust view after searching and jumping

Also `offset_coodrs_to_in_view` was refactored to reduce duplicated position calculations.

* Fix a wrong offset calculation in `offset_coords_to_in_view_center`

It ignored `scrolloff` if `centering` is false.
2 years ago
Michael Davis 2077f5e26a
Apply completion edits to all cursors (#4496)
Completion edits - either basic `insert_text` strings or structured
`text_edit`s - are assumed by the LSP spec to apply to the current
cursor (or at least the trigger point). We can use the range (if any)
and text given by the Language Server to create a transaction that
changes all ranges in the current selection though, allowing auto-
complete to affect multiple cursors.
2 years ago
nosa 7210c58a51
Change default TS object bindings (#3782)
* Change default TS object bindings

Changes 'match inside/around' bindings for:
- type definition from `c` to `t`
- comments from `o` to `c`
- tests from `t` to `T`

Also changes those for the `]` / `[` bindings.

* Update docs for changed keybinds

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago