Commit graph

4675 commits

Author SHA1 Message Date
Gokul Soumya
40916dff63
Move FilePicker::render from Component impl to normal impl
Merges the code for the Picker and FilePicker into a single Picker that
can show a file preview if a preview callback is provided. This change
was mainly made to facilitate refactoring out a simple skeleton of a
picker that does not do any filtering to be reused in a normal Picker
and a DynamicPicker (see #5714; in particular [mikes-comment] and
[gokuls-comment]).

The crux of the issue is that a picker maintains a list of predefined
options (eg. list of files in the directory) and (re-)filters them every
time the picker prompt changes, while a dynamic picker (eg. interactive
global search, #4687) recalculates the full list of options on every
prompt change. Using a filtering picker to drive a dynamic picker hence
does duplicate work of filtering thousands of matches for no reason. It
could also cause problems like interfering with the regex pattern in the
global search.

I tried to directly extract a PickerBase to be reused in Picker and
FilePicker and DynamicPicker, but the problem is that DynamicPicker is
actually a DynamicFilePicker (i.e. it can preview file contents) which
means we would need PickerBase, Picker, FilePicker, DynamicPicker and
DynamicFilePicker and then another way of sharing the previewing code
between a FilePicker and a DynamicFilePicker. By merging Picker and
FilePicker into Picker, we only need PickerBase, Picker and
DynamicPicker.

[gokuls-comment]: https://github.com/helix-editor/helix/issues/5714#issuecomment-1410949578
[mikes-comment]: https://github.com/helix-editor/helix/issues/5714#issuecomment-1407451963
2023-06-18 11:34:13 -05:00
Alex
d5af6031f6
Use default line ending in open command (#7357) 2023-06-17 14:36:36 -05:00
Alexander Brevig
b4fe31cad6
Add forth-lsp and update tree-sitter-forth (#7334)
* feat: add forth lsp and update tree sitter

* fix: update highlights
2023-06-16 23:12:29 +02:00
spectre256
d8b7232a47
Add yank_joined command (#7195)
Resolves issue #6888 by adding a command to join all selections and yank
them to the specified register. The typed command takes an argument as
the separator to use when joining the selections.
2023-06-16 21:13:23 +02:00
Alex
3fb9fafb2a
Add config for default line ending (#5621) 2023-06-16 12:02:15 -05:00
Ivan Svoboda
df094909d1
Webc language support (#7290)
* feat: add webc language support

* feat: add to lang-support book webc
2023-06-13 17:41:30 +02:00
Thomas Aarholt
cbe2308210
Explain how to enter Select mode in keymap (#7333)
* Explain how to enter Select mode

Also added an equivalent explanation that Insert mode is the default, with how to return to it.

* Fix glarious typo
2023-06-13 17:07:12 +02:00
A-Walrus
4d8c9a394e
Preview scratch buffers in jumplist picker (#7331) 2023-06-13 16:05:01 +02:00
A-Walrus
a4a86120e8
Fix next/prev tree-sitter inconsistency (#7332)
* Fix next/prev tree-sitter inconsistency

Before there where different results going to next or previous due to
sorting not dealing with multiple captures that start/end at the same
pos. I chose to prefer longer matches.

* Revert unnecessary change
2023-06-13 16:04:11 +02:00
Jorge Santiago
d249639114
Add merionette theme (#7186) 2023-06-13 16:01:02 +02:00
Zisulin Morbrot
fbd22afe29
Add rl and rla aliasses for reload and reload-all commands (#7158) 2023-06-13 08:50:50 -05:00
Robert
015c079acc
Add reverse_selection_contents (#7329) 2023-06-13 08:36:28 -05:00
kazimir malevich
37fcd160db
Clarify the runtime directory location in installation docs (#6624)
* runtime config made clearer

* following Unix FHS

* we probably want to install Helix as a regular user without sudo access

* suggestions adopted from @the-mikedavis

* attempted to synthesise comments given

* capitalisation of second header

* required changes hopefully made

* we should have a match now

* Linux windows dir match
2023-06-13 03:35:12 +02:00
dependabot[bot]
0e42e4e193
build(deps): bump libc from 0.2.145 to 0.2.146 (#7327)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:52:06 +09:00
dependabot[bot]
66ed5bd013
build(deps): bump gix from 0.44.1 to 0.46.0 (#7325)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:51:47 +09:00
dependabot[bot]
0d998c99d4
build(deps): bump tempfile from 3.5.0 to 3.6.0 (#7326)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:51:34 +09:00
dependabot[bot]
3c23ea5d15
build(deps): bump serde from 1.0.163 to 1.0.164 (#7328)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:51:25 +09:00
dependabot[bot]
a6fd32eef4
build(deps): bump log from 0.4.18 to 0.4.19 (#7324)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:51:11 +09:00
Philipp Mildenberger
2a11fb485d
Fix underflow when repeating a completion that has a negative shift position (#7322) 2023-06-13 01:37:47 +09:00
Michael Davis
25ad534d64
Check for 'git' before fetching/building grammars (#7320)
Previously the error message for this potential failure-case was
confusing: "no such file or directory". `hx -g fetch`, `hx -g build` and
the helix-term builder should bail early if the git binary is not
available.
2023-06-12 17:32:36 +02:00
Selwyn
18e07addfd
Use Vue language server based on Volar (#7312) 2023-06-12 00:46:47 +09:00
0xHiro / ヒロ
8c6eb88c6a
fix: add file argument in help text (#7307) 2023-06-10 18:40:39 +02:00
lefp
a197ce869a
Add Fortran comment injections (#7305) 2023-06-11 00:27:46 +09:00
Vitalii Solodilov
a981a2525d
Support core mode for delve debugger (#7300) 2023-06-10 02:31:02 +02:00
Luca Schlecker
dbd248fdfa add config option for instant completion entry preview (defaulting to true).
Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
2023-06-09 13:23:29 -04:00
spectre256
00b152facd
Add register statusline element (#7222) 2023-06-08 14:34:07 -05:00
Alex
993c68ad6f
Auto indent on insert_at_line_start (#5837) 2023-06-08 19:11:40 +02:00
Tshepang Mbambo
e2a1678436
Fix book configuration for edit template (#7278) 2023-06-08 17:12:36 +09:00
Michael Davis
b0129b552d
Fix style overwriting in table rows with multiple cells (#7281) 2023-06-08 13:28:26 +09:00
Tshepang Mbambo
27891cdc8d
misc doc fixes/improvements (#7282) 2023-06-08 13:27:58 +09:00
Michael Davis
d4427125eb
Bail if no language servers support workspace symbols (#7286) 2023-06-08 09:48:11 +09:00
Dimitri Sabadie
31b8b728a2
Fix C++ queries and update tree-sitter-cpp (#7285) 2023-06-07 18:13:39 -05:00
broke
ef5bcd5060
theme: added gruvbox dark soft variant (#7139) 2023-06-07 18:13:08 -05:00
Christoph Sax
d324feb072
Add support for language t32 (#7140)
Co-authored-by: Christoph Sax <christoph.sax@mailbox.org>
2023-06-07 18:01:25 -05:00
vwkd
352d1574a6
add move_prev_long_word_end and extend_prev_long_word_end (#6905) 2023-06-08 00:41:35 +02:00
Tshepang Mbambo
2f9b63999f
Break long sentence in book configuration footnote (#7279) 2023-06-07 23:19:55 +02:00
Michael Davis
b3949979ae Propagate the count and register to command palette commands
Previously a count or register selection would be lost while opening
the command palette. This change allows using a register selection or
count in any command chosen from the command palette.
2023-06-08 00:48:25 +09:00
Michael Davis
0e083497a5 Persist register selection in pending keymaps
Previously the register selection (via `"`) would be lost in the middle
of any key sequence longer than one key. For example, `<space>f` would
clear the register selection after the `<space>` making it inaccessible
for the `file_picker` command.

This behavior does not currently have any effect in the default keymap
but might affect custom keymaps. This change aligns the behavior of the
register with count. Making this change allows propagating the register
to the `command_palette` (see the child commit) or other pickers should
we decide to use registers in those in the future. (Interactive global
search for example.)
2023-06-08 00:48:25 +09:00
Ilya Sovtsov
77e9a22aff
Add check for a non-zero value for tab width (#7178) 2023-06-07 17:51:29 +09:00
Alex Vinyals
204bac1706
commands(toggle): use pattern matching on the Value enum (#7240) 2023-06-07 17:50:16 +09:00
blt__
ba691f4fb0
Fix verilog grammar source repo and revision (#7262) 2023-06-07 17:49:52 +09:00
Jens Getreu
3e927ac578
Autumn theme: style "soft-wrap indicator" + maintenance (#7229)
Co-authored-by: Jens Getreu <getreu@getreu@web.de>
2023-06-07 17:49:39 +09:00
gibbz00
9926c2d292 Remove Keymap(KeyTrie) and simply use KeyTrie. 2023-06-07 10:11:13 +09:00
gibbz00
b8563685ec Move keymap.reverse_keymap() to Keytrie:
The plan is let `Keymaps` simply store `KeyTrie`s, as the `Keymap(Keytrie)` wrapping serves little to no purpose.
2023-06-07 10:11:13 +09:00
gibbz00
eda4c79f2f Remove pub keymap.name();
`keymap.name` is only used internally.
2023-06-07 10:11:13 +09:00
gibbz00
3d0bc72099 Place Info::from_keymap() contents in keymap.infobox():
This makes it easier later control the order in which the key events
are presented.
2023-06-07 10:11:13 +09:00
gibbz00
19326d23d1 Keymap infobox: Idiomatic body tuple.
Does not change any behavior other than making the tuple slightly
more idiomatic.  Keymap infobox shows key events, then the respective
description. This commit makes sure that order is used from the get go,
rather than flipping it midway.
2023-06-07 10:11:13 +09:00
gibbz00
3a0892f793 Exclude config no_op bindings in command palette. 2023-06-07 10:11:13 +09:00
gibbz00
39773e48d3 Remove superfluous command description pruning for keymap infobox:
Exist under the wrong (possibly just outdated) assumption that command
descriptions are written with their `KeyTrie` name prefixed
2023-06-07 10:11:13 +09:00
gibbz00
d20c1632a7 helix_term::keymap: Remove one-liner solely used for a test. 2023-06-07 10:11:13 +09:00