Stefan Holderbach
7aca406f13
Use better word definition ( #396 )
...
Follow UAX29: http://www.unicode.org/reports/tr29/#Word_Boundaries
This behavior is closer to VIs definition respecting identifiers and
respects special characters like fish
Fixes #346
Fixes #377
2022-04-12 11:33:37 +02:00
Darren Schroeder
77d28e3956
change dark orange in prompt to purple ( #395 )
2022-04-11 15:01:13 -05:00
Stefan Holderbach
1bf273d6e5
Clean up some stuff found by pedantic clippy ( #394 )
...
e.g.
- make modifying, non-returning functions more obvious by `;`
termination.
- merge match arms where it improves legibility
2022-04-11 17:58:36 +02:00
Stefan Holderbach
e906c008c1
Remove Hinter
and Validator
from the default ( #393 )
...
Default constructor created a Hinter and Validator.
Disabling those required writing a noop version of the trait (see #392 for an example).
Now they are off by default and can be added or removed via the
"builder" pattern.
2022-04-11 12:43:28 +02:00
Stefan Holderbach
7ce8b674e0
Allow the removal of keybindings ( #391 )
...
This was previously impossible, existing defaults could only be overridden.
2022-04-10 21:01:54 +02:00
Darren Schroeder
e3c75c1cd2
change up prompt with traditional nushell colors ( #388 )
...
* change up prompt with traditional nushell colors
* removed the changing of backslashes to slashes
2022-04-08 15:19:47 -05:00
Fernando Herrera
922fab18e0
Short description ( #390 )
...
* short descriptions
* remove new line
2022-04-08 07:14:08 +01:00
Fernando Herrera
860b110490
short descriptions ( #389 )
2022-04-08 06:49:04 +01:00
Stefan Holderbach
446a60ffa9
Add Ctrl-Delete/Backspace as default keybindings ( #386 )
...
Used to delete words
Shared between vi and emacs
Fixes #383
2022-04-07 19:02:30 +02:00
Michael Angerman
ad6015a19a
fix example in readme ( #387 )
2022-04-06 12:35:41 -07:00
Darren Schroeder
2f59d803a8
clean up query output so that it's closer to matching what key bindings want ( #381 )
...
* clean up query output so that it's closer to matching what keybindings need
* sort keybindings
2022-04-06 07:49:45 -05:00
Stefan Holderbach
51cc0cc020
Escape Ctrl-R history search with ESC
( #385 )
...
Fixes #384
2022-04-06 13:45:52 +02:00
Stefan Holderbach
6332747730
[API] Allow the Completer
impl to be stateful ( #379 )
...
Changes the completer trait to take a mutable reference of itself on
calling `Completer::complete`
This enables the `Completer` to do caching or other smart things on the fly.
2022-04-04 23:21:13 +02:00
Fernando Herrera
698190c534
generic reedline menus ( #378 )
...
* generic reedline menus
* change word in description
* correct tests in examples
* corrected menu names
* renamed menu
* option for menus to take full line buffer
* corrected list menu insertion
2022-04-04 11:04:57 +01:00
Fernando Herrera
accce4af7f
bashisms feature for reedline ( #374 )
...
* bashisms feature for reedline
* cargo fmt
2022-04-01 18:27:51 +01:00
Fernando Herrera
246706c971
format descriptions to the left ( #375 )
2022-04-01 18:27:41 +01:00
Stefan Holderbach
60386ac610
API break: remove unnecessary fallibility ( #367 )
...
The fallible std::io::Results were originally introduced for the history
file but the critical points are completely separated from the builder
pattern now.
Makes the public API nicer
2022-03-31 23:32:31 +02:00
Stefan Holderbach
0f92985c69
Expose the history as syncable and readable ( #373 )
...
Useful for nushell repl loop lifting
2022-03-30 22:11:49 +02:00
Sherub Thakur
5240130c9f
Edit stack ( #368 )
...
* Add edit stack
* Use edit stack in the core editor
* Edit stack is just a struct
* Test undo-redo behaviour instead of implementation details
2022-03-29 18:17:51 +02:00
Waleed Dahshan
0216c84aa2
Fix the first example so it can be run ( #371 )
...
The example in the read me doesn't actually run until you add a return value for propagating io results.
2022-03-29 13:21:54 +02:00
Fernando Herrera
bc18ba3260
corrects menu selection ( #369 )
2022-03-28 07:37:48 +01:00
Tomoki Aonuma
7b5e761c8e
Fix menu::menu_functions::string_difference
( #364 )
2022-03-27 13:34:11 +01:00
Fernando Herrera
072f961107
Vim normal keybingings ( #365 )
...
* corrected normal keybindings and caps
* insert checks first for mode
* vi parser test
2022-03-27 13:24:17 +01:00
Tomoki Aonuma
7c594b16ba
Fix menu::menu_functions::find_common_string
( #363 )
...
* Fix `menu::menu_functions::find_common_string`
* Add test for `DefaultCompleter`
* Add test strings
2022-03-27 11:46:57 +01:00
Fernando Herrera
e982abf7e2
update history menu ( #362 )
2022-03-27 08:47:40 +01:00
Fernando Herrera
69fad67b90
Descriptions for completion suggestions ( #358 )
...
* add description to completion suggestions
* completion menu with help
* corrected doc tests
* moved menu functions to module
* menu type with its own completer
* corrected doc tests
* function for menus to quick complete
2022-03-27 08:30:08 +01:00
Darren Schroeder
bc528de132
bump to 0.3.1 and nu-ansi-term to 0.45.1 ( #361 )
2022-03-27 15:42:39 +13:00
Jonathan Moore
2e0d35187c
fix typo [skip ci] ( #355 )
2022-03-25 10:04:38 +13:00
Jacob Rothstein
0ecf800f22
end/control-e selects the current completion ( #354 )
2022-03-23 23:16:30 +01:00
Jacob Rothstein
bf66f2e103
add missing alt-f for parity with the existing alt-b ( #353 )
2022-03-23 22:55:09 +01:00
Stefan Holderbach
c0543b875c
Prepare for new release ( #352 )
...
- Update dependencies
- Increase version number to 0.3.0
2022-03-16 23:58:25 +01:00
Stefan Holderbach
2eea8fa66a
Update developer focussed documentation ( #351 )
...
* Update developer focussed documentation
- CONTRIBUTING guide
- Update Readme and lib.rs
- remove old checklist
2022-03-16 23:39:08 +01:00
sholderbach
7802d85475
Simplify insertion_point
in LineBuffer
...
- Remove the usize wrapping type `InsertionPoint`
- Remove redundant functions returning the same result
2022-03-14 20:56:14 +01:00
sholderbach
dcabfb1990
Improve visibility and documentation of internals
...
Painter is currently leaked by `Menu` trait. Thus document the safe part
that is used for this implementation.
Also define the responsibility of editor
2022-03-14 20:56:14 +01:00
sholderbach
8ff0147927
Folderize validator
2022-03-14 20:56:14 +01:00
sholderbach
56ea39ec32
Folderize hinter
2022-03-14 20:56:14 +01:00
sholderbach
804f31d181
Folderize prompt
...
- Fix docs for Prompt trait
- Separate trait and default implementation
- Hide constants that are of little use
2022-03-14 20:56:14 +01:00
sholderbach
ebafcdfe20
Create utils folder
2022-03-14 20:56:14 +01:00
sholderbach
5bc9d6c747
Folderize painting code
...
- Move painter and styled_text into a common folder
- Separate out `PromptLines` and freestanding utility functions
2022-03-14 20:56:14 +01:00
sholderbach
ad4760e476
Remove painter debug output
2022-03-14 20:56:14 +01:00
sholderbach
2d44337324
Update UX checklist
...
Remove tests that are now well covered internally.
TODO: update expectations for the completions and hints as well as vi
mode
2022-03-14 20:56:14 +01:00
sholderbach
efbbd2f766
Pedantic clippy and code style polish
...
- Terminate with semicolon, where return type `()`
- Invert some conditionals for readability
- `match` to `if let` if binary
- pass by value vs by reference
- `must_use` attribute where applicable (builder patterns)
- make internal `Mode` enum explicitly `ViMode`
- Docstring fixes
- Format explicit identifiers in docs
2022-03-14 20:56:14 +01:00
sholderbach
4416270877
Distill DefaultPrompt
impl
...
Unnecessary redirection in the codebase removed
2022-03-14 20:56:14 +01:00
sholderbach
de49cdaf4e
Use quick_completions
in the demo app
...
Reflects the defaults from nushell.
2022-03-14 20:56:14 +01:00
sholderbach
28e74b4ebc
Remove draft file for syntax highlighting
2022-03-14 20:56:14 +01:00
Fernando Herrera
4e5a20d127
backward history bang ( #344 )
2022-03-12 09:26:51 +00:00
Fernando Herrera
87a32d5147
History menu pages ( #342 )
...
* history menu page error
* checking before update
* remove in_edit variable
* remove redundant none
2022-03-10 19:05:24 +00:00
Fernando Herrera
f60bbb2939
history menu page error ( #341 )
2022-03-10 12:03:43 +00:00
Fernando Herrera
e1767338eb
can complete case insensitive ( #340 )
2022-03-08 08:03:27 +00:00
Fernando Herrera
5cd2fa2655
space before bang ( #338 )
2022-03-07 17:24:02 +00:00