Blaž Hrastnik
24f90ba8d8
Manually recalculate initial completion where it matters
3 years ago
Blaž Hrastnik
af21e2a5b4
Pass through Editor instead of Context
3 years ago
Cole Helbling
e023a78919
WIP: show all buffers that couldn't be closed
3 years ago
Cole Helbling
6118486eb2
helix-term: implement buffer completer
...
In order to implement this completer, the completion function needs to
be able to access the compositor's context (to allow it to get the
list of buffers currently open in the context's editor).
3 years ago
Cole Helbling
a1207fd768
helix-term/commands: display buffer id in picker
3 years ago
Blaž Hrastnik
d11b652139
Allow static strings in set_status/set_error so API is nicer
3 years ago
Gokul Soumya
966fbc5984
Add tree-sitter based function, class navigation
3 years ago
Ludwig Stecher
4429993842
Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker ( #1612 )
...
* Add `PageUp`, `PageDown`, `Ctrl-u`, `Ctrl-d`, `Home`, `End` keyboard shortcuts to file picker
* Refactor file picker paging logic
* change key mapping
* Add overlay component
* Use closure instead of margin to calculate size
* Don't wrap file picker in `Overlay` automatically
3 years ago
Kirawi
23907a063c
use PathBuf::to_string_lossy() instead of to_str() ( #1655 )
3 years ago
Blaž Hrastnik
bd549d8a20
Merge remote-tracking branch 'origin/master' into debug
3 years ago
Cydiater
7083b98a38
postpone clone after found ( #1656 )
3 years ago
Blaž Hrastnik
f88c077f99
Replace tendril with smartstring
...
Slightly smaller API surface, less dependencies.
3 years ago
Matouš Dzivjak
fdb9a1677b
feat(editor): add config for search wrap_around ( #1516 )
...
* feat(editor): add config for search wrap_around
Fixes: https://github.com/helix-editor/helix/issues/1489
* Move search settings into separate config
* Disable linter
3 years ago
Gokul Soumya
bf773db451
Show infobox with register contents
3 years ago
Gokul Soumya
5995568c1d
Prevent multiple code action popups
3 years ago
Gokul Soumya
547c3ecd0c
Preselect first item in code action popup menu
3 years ago
Gokul Soumya
e90276df0b
Replace if let with early return
3 years ago
Blaž Hrastnik
094a0aa3f9
Render code actions as a menu, allow adding padding to popup
3 years ago
Blaž Hrastnik
f7f55143a1
Improve code action picker by displaying it inline
3 years ago
Blaž Hrastnik
2a7ae963e1
Automatically commit changes to history if not in insert mode
...
Fixes #1500
3 years ago
CossonLeo
d49e5323f9
Use markup scopes for the Markdown component ( #1363 )
3 years ago
Ivan Tham
759b850859
Allow specifying file start position ( #445 )
...
Like helix-term/src/commands.rs:3426:15
3 years ago
Michael Davis
f453f8724d
change show_subtree command into ':tree-sitter-subtree' typable command ( #1524 )
...
* add default keymap for show_subtree command
* remove space+t keymap
* add a typable command ':show-subtree'
* generate documentation for ':show-subtree'
* remove non-typable show_subtree command
* ':show-subtree'->':tree-sitter-subtree'
3 years ago
Michael Davis
392dfa0841
add select_next_sibling and select_prev_sibling commands ( #1495 )
...
* add select_next_sibling and select_prev_sibling commands
* refactor objects to use higher order functions
* address clippy feedback
* move selection cloning into commands
* add default keybindings under left/right brackets
* use [+t,]+t for selecting sibling syntax nodes
* setup Alt-{j,k,h,l} default keymaps for syntax selection commands
* reduce boilerplate of select_next/prev_sibling in commands
* import tree-sitter Node type in commands
3 years ago
Blaž Hrastnik
e7eab95b94
Update to rust 1.58, fix a bunch of optional lints
3 years ago
Matouš Dzivjak
38ca8daa09
fix(commands): run fmt for all documents being closed ( #1444 )
...
When writing all documents, fmt wouldn't be run.
Run fmt in close all implementation so that all documents
are formatted if necessary.
Fixes: https://github.com/helix-editor/helix/issues/1442
3 years ago
Michael Davis
64d3e7b705
add show_subtree command for viewing tree-sitter subtree in Popup ( #1453 )
...
* add show_subtree command for viewing tree-sitter subtree in Popup
* remove '.slice(..)' from show_subtree command
* name docs and subtree Popups 'hover'
3 years ago
Mathis Brossier
85cf2648a2
buffer picker allow hsplit / vsplit ( #1502 )
3 years ago
Matouš Dzivjak
2e02a1d6bc
feat(commands): shrink_selection ( #1340 )
...
* feat(commands): shrink_selection
Add `shrink_selection` command that can be used to shrink
previously expanded selection.
To make `shrink_selection` work it was necessary to add
selection history to the Document since we want to shrink
the selection towards the syntax tree node that was initially
selected.
Selection history is cleared any time the user changes
selection other way than by `expand_selection`. This ensures
that we don't get some funky edge cases when user calls
`shrink_selection`.
Related: https://github.com/helix-editor/helix/discussions/1328
* Refactor shrink_selection, move history to view
* Remove useless comment
* Add default key mapping for extend&shrink selection
* Rework contains_selection method
* Shrink selection without expand selects first child
3 years ago
Stuart Hinson
b18bda928f
fix slash in search selector status message ( #1449 )
3 years ago
Blaž Hrastnik
7767703979
fix: Only use shellwords parsing on unix platforms
3 years ago
Mathis Brossier
dbaed0ba83
scroll: change only main selection, only when needed ( #1420 )
...
Co-authored-by: mathis <mathis.brossier@universite-paris-saclay.fr>
3 years ago
Omnikar
ed97ecceb8
Add `:cquit!` command and prevent `:cquit` from ignoring unsaved changes ( #1414 )
...
* Add `:cquit!` command and prevent `:cquit` from ignoring unsaved changes
* `cargo xtask docgen`
3 years ago
Triton171
4da050b4bb
Add basic indentation for languages without treesitter-based indentation rules (always use the indent of the current line for a new line). ( #1341 )
...
Fix several bugs in the treesitter indentation calculation.
Co-authored-by: Triton171 <triton0171@gmail.com>
3 years ago
Kirawi
93a948d889
switch redundant current! usage to doc! ( #1416 )
3 years ago
Alexis Mousset
8a019b423f
Detect workspace root using language markers ( #1370 )
...
* Detect workspace root using language markers
* Avoid allocating root_markers
* Update helix-core/src/lib.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Update helix-core/src/lib.rs
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
3 years ago
Blaž Hrastnik
a066f59dc8
Don't just filter commands by fuzzy match, also order the matches
3 years ago
WindSoilder
f1ed042c84
Fix: when goto normal mode, only want to remove indentation if the line is blank with no text following ( #1349 )
...
* when opened new line contains other characters after current position, don't dedent
* abstract checking logic
3 years ago
Stuart Hinson
34db33e1dc
Use a fuzzy matcher for commands ( #1386 )
...
* Use a fuzzy matcher for commands
* Take Clippy up on its suggestion
* Rescope FUZZY_MATCHER
3 years ago
Matouš Dzivjak
bd2ab5be43
feat(commands): ensure_selections_forward ( #1393 )
...
* feat(commands): ensure_selections_forward
Add command that ensures that selections are in forward direction.
Fixes: https://github.com/helix-editor/helix/issues/1332
* Add keybinding for ensure_selections_forward
Add `A-:` keybinding for the ensure_selections_forward command.
* Re-use range.flip for flip_selections command
3 years ago
Omnikar
5b69e9b466
Fix indentation ( #1387 )
3 years ago
Matouš Dzivjak
a4641a8613
feat(commands): sort command ( #1288 )
...
* feat(commands): sort/rsort command
Add basic implementation of sort command.
* Sort by selections instead, implement reverse sort
* Generate docs
* Rename sort! to rsort
3 years ago
Omnikar
8340d73545
Extract macro parsing to `helix-view` and add unit tests
3 years ago
Omnikar
2d4bc0aec7
Change how macros separate keypresses
...
* Keypresses are no longer separated by spaces
* Single-character keypresses are serialized as-is
* Multi-character keypresses are delimited by `<>`
3 years ago
Ivan Tham
ee3eb4057a
Update macro display as [q] in message
3 years ago
Ivan Tham
b9cb3930e2
Mark macros as experimental in docs
...
Given that currently macro does not integrate well with registers and
the internal representation of macros is expected to be changed.
3 years ago
Ivan Tham
9a32617b30
Rename play macro to replay macro
...
Macro needs to be defined first before playing so replay is more accurate.
Also, replay have the same length as record which makes it looks nice.
3 years ago
Ivan Tham
5326a05117
Improve macro error handling
3 years ago
Tamo
a306a1052a
Update settings at runtime ( #798 )
...
* feat: Update settings at runtime
fix the clippy warning
* update the documentation
* use to_value instead of to_vec+from_value
* drop the equal
* remove an useless comment
* apply suggestion
3 years ago
Matouš Dzivjak
75a8b789d2
LSP code action commands ( #1304 )
...
* feat(lsp): codeAction commands
* Don't block on command call
* Fix lifetime of command execution
* Fix lint issues
3 years ago