Commit Graph

451 Commits (756253b43f5ec1d8cc6fce9e6ebcf3f9fee5bc5a)

Author SHA1 Message Date
Omnikar cfc8285867
Allow infoboxes to be disabled ()
* Allow infoboxes to be disabled

* Document `infoboxes` default value

* Rename `infoboxes` to `auto_info`

* Document `auto-info`

* Fix incomplete rename
ath3 78c68fae91 Implement "Goto next buffer / Goto previous buffer" commands
CossonLeo 39584cbccd
Add c-s to pick word under doc cursor to prompt line & search completion ()
* Add prompt shourtcut to book
Add completions to search
Add c-s to pick word under doc cursor to prompt line

* limit 20 last items of search completion, update book

* Update book/src/keymap.md

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* limit search completions 200

Co-authored-by: Ivan Tham <pickfire@riseup.net>
Gokul Soumya 253bd6b3a8
Add better description for copy_selection command ()
Kirawi ee889aaa85
Updated tree-sitter query scopes ()
* updated theme scopes

variable.property -> variable.field
property -> variable.field

* updated theme scopes

* update book and themes

updated book and themes to reflect scope changes

* wip

* update more queries

* update dark_plus.toml
Gygaxis Vainhardt f140a2a00e
Add arrow-key bindings for window switching ()
Omnikar e2ed691537
Implement `hx --tutor` and `:tutor` to load `tutor.txt` ()
* Implement `hx --tutor` and `:tutor` to load `tutor.txt`

* Document `hx --tutor` and `:tutor`

* Change `Document::set_path` to take an `Option`

* `Document::set_path` accepts an `Option<&Path>` instead of `&Path`.
* Remove `Editor::open_tutor` and make tutor-open functionality use
  `Editor::open` and `Document::set_path`.

* Use `PathBuf::join`

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* Add comments explaining unsetting tutor path

Co-authored-by: Ivan Tham <pickfire@riseup.net>
Blaž Hrastnik 42eee9d5bf book: Document Alt-. and .
Oskar Nehlin 0f886af4b9
Add commands for moving between splits with a direction ()
* Add commands for moving between splits with a direction

* Update keymaps

* Change picker mapping

* Add test and clean up some comments
Gokul Soumya 4ee92cad19
Add treesitter textobjects ()
* Add treesitter textobject queries

Only for Go, Python and Rust for now.

* Add tree-sitter textobjects

Only has functions and class objects as of now.

* Fix tests

* Add docs for tree-sitter textobjects

* Add guide for creating new textobject queries

* Add parameter textobject

Only parameter.inside is implemented now, parameter.around
will probably require custom predicates akin to nvim' `make-range`
since we want to select a trailing comma too (a comma will be
an anonymous node and matching against them doesn't work similar
to named nodes)

* Simplify TextObject cell init
Blaž Hrastnik c5298caa75
book: Add a link to tutor.txt
Rowan H 6c995fa690
Fixed incorrect move commands ()
Rowan H 75a8e8afbd
Typo fix ()
Omnikar f467154e18
Add `Alt-,` to `keymap.md`, and replace hard-to-see commas with slashes ()
* Add `A-,` to `keymap.md`, and remove out-of-place commas

* Update book/src/keymap.md

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* Add slashes in place of previous commas in `keymap.md`

Co-authored-by: Ivan Tham <pickfire@riseup.net>
VuiMuich 67829976fa
Add `C-j` and `C-k` to keybinds for picker ()
* Add `C-j` and `C-k` for moving down/up in pickers

* Add new binds to keymap doc
CossonLeo 9ac0c95161
Improve completion trigger ()
* improve idle completion trigger

* add completion-trigger-len to book

* rename semantics_completion to language_server_completion and optimize idle completion trigger
Michael Davis 80b54f2f69
use special.string.symbol instead of symbol
this aligns better with how ruby highlights symbols
Michael Davis 4771cc7ee4
align highlight scopes with documented scopes
Ivan Tham 89707a858f
Make auto-completion a config ()
Blaž Hrastnik f8f63c5508
Merge pull request from helix-editor/idle-timer
Idle timer / Autocompletion
Blaž Hrastnik 633b981db2 Make idle-timeout configurable
Ivan Tham 4260b31ec0
Update mdbook style and fix unreadable table head ()
The styles are now pulled from upstream styles, some of the changes I
submitted it back to upstream.

Fix 
Omnikar e47632114a
Fix swapped selection rotation docs in `keymap.md` ()
Blaž Hrastnik 75dba1f956 experiment: space+k for LSP doc, K for keep_selections
Blaž Hrastnik 9ea9e779b2 experiment: Move keep_primary_selection to ,
lurpahi a958d34bfb
Add option for automatic insertion of closing-parens/brackets/etc ()
* Add auto-pair editor option

* Document auto-pair editor option

* Make cargo fmt happy

* Actually make cargo fmt happy

* Rename auto-pair option to auto-pairs

* Inline a few constants

Co-authored-by: miaomai <cunso@tutanota.com>
Leoi Hung Kin 9456d5c1a2
Initial implementation of global search ()
* initial implementation of global search

* use tokio::sync::mpsc::unbounded_channel instead of Arc, Mutex, Waker poll_fn

* use tokio_stream::wrappers::UnboundedReceiverStream to collect all search matches

* regex_prompt: unified callback; refactor

* global search doc
kraem 4a003782a5
enable smart case regex search by default ()
Gokul Soumya 116e562ff6
Document `diagnostic` theme scope ()
Omnikar 3e12b00993
Add `no_op` command ()
* Add `no_op` command

* Document `no_op` in `remapping.md`
Gokul Soumya 94abc52b3b
feat: Sticky view mode with Z ()
Blaž Hrastnik 4cc562318a Improve docs, fix up a few highlight scopes
Gokul Soumya e4e93e176c fix: Merge default palette with user palette
Gokul Soumya e40e6db227 feat: Default theme palette using 16 terminal colors
oberblastmeister 825bceeab6
add_newline unimpaired mapping ()
* added some keymaps

* remove

* remove wrong mappings

* remove

* wrong import

* use enum

* correct line ending

* added to book

* column
Blaž Hrastnik ce7ad2beb5 Reimplement keep-pipe, it needs to manipulate selections, not text
Omnikar e772808a5b
Shell commands ()
* Implement shell interaction commands

* Use slice instead of iterator for shell invocation

* Default to `sh` instead of `$SHELL` for shell commands

* Enforce trailing comma in `commands` macro

* Use `|` register for shell commands

* Move shell config to `editor` and use in command

* Update shell command prompts

* Remove clone of shell config

* Change shell function names to match prompts

* Log stderr contents upon external command error

* Remove `unwrap` calls on potential common errors

`shell` will no longer panic if:
  * The user-configured shell cannot be found
  * The shell command does not output UTF-8

* Remove redundant `pipe` parameter

* Rename `ShellBehavior::None` to `Ignore`

* Display error when shell command is used and `shell = []`

* Document shell commands in `keymap.md`
CossonLeo d6a9c2c0f6
Add ui.menu text style ()
* add menu text style

* add ui.menu.text ui.info ui.info.text to book

* change ui.menu.text to ui.menu

* fix book's ui.menu
Omnikar 46f537d4ce Fix missing backtick in `keymap.md`
Omnikar 048a390568
Add `Command` column to keymap documentation ()
Gokul Soumya b59b248561
Add docs for registers, multi key remaps ()
superlou 4b5090a5f6 Update configuration.md for Windows
Added explicit paths for WIndows, Mac, and Linux based on [`choose_base_strategy`](https://docs.rs/etcetera/0.3.2/etcetera/base_strategy/fn.choose_base_strategy.html)
Blaž Hrastnik dbd853a082 Document new keys in book/
Blaž Hrastnik 66a90130a5 Implement selection rotation with `(` and `)`
Blaž Hrastnik 5342f976d4 Document C/Alt-C in the keymap
Ryo Hirayama ef6a2317b7 Update keymap.md
Blaž Hrastnik 0fdb626c2c Remove embed_runtime feature
It's no longer practical to maintain. Closes 
Ivan Tham 013bec407c Quite edit page
Stolen from https://github.com/rust-lang/wg-async-foundations/pull/225
Gokul Soumya 6a8a01df6b Add missing keybinds to docs
Cor Peters 722cfedb38
Added change_case command ()
* Added change_case command

* Added switch_to_uppercase and switch_to_lowercase

Renamed change_case to switch_case.

* Updated the Keymap section of the Book

* Use flat_map instead of map + flatten

* Fix switch_to_uppercase using to_lowercase

* Switched 'Alt-`' to uppercase and '`' to lowercase

Co-authored-by: Cor <prive@corpeters.nl>
Kirawi 084a8a9522
Rewritten Rust `highlights.scm` ()
* rewrote Rust highlights.scm

* wip

* wip

* wip

* wip

* fixed type highlighting

* wip

* rewrite again

* moved operators

* missing newline

* missing newline

* update book

* fix constructor highlighting

* fix constructor highlighting

* fix const highlighting

* better constructor highlighting

* remove dup, bug was my locals.scm file

* fixed docs

* merge

* fixed for highlighting

* add yield

* remove yield

* added yield back

* fixed yield highlighting

* unecessary
Kirawi c7aa7bf4ba
VSCode Dark+ Theme ()
* wip

* Add VSCode Dark+ Theme

wip

wip

wip

wip

wip

wip

properly detect constants

add bool

wip

* suggestion

* add variant for c/c++

* fix hexcode error

* removed regex highlight

* fixed constant higlighting

* wip

* add space

* add suggestions

* update theme

* update book

* suggestions

* fix c/c++ enum

* update book
Blaž Hrastnik a4e28c6927 Implement `X` as extend selection to line bounds
Gokul Soumya 37f0b9ee15 Add missing linenr.selected key to docs
Gokul Soumya c68fe1f2a3
Add object selection (textobjects) ()
* Add textobjects for word

* Add textobjects for surround characters

* Apply clippy lints

* Remove ThisWordPrevBound in favor of PrevWordEnd

It's the same as PrevWordEnd except for taking the current char
into account, so use a "flag" to capture that usecase

* Add tests for PrevWordEnd movement

* Remove ThisWord* movements

They did not preserve anchor positions and were only used
for textobject boundary search anyway so replace them with
simple position finding functions

* Rewrite tests of word textobject

* Add tests for surround textobject

* Add textobject docs

* Refactor textobject word position functions

* Apply clippy lints on textobject

* Fix overflow error with textobjects
Jakub Bartodziej 79f096963c
Color palettes ()
* Enable using color palettes in theme files.

* Add an example theme defined using a gruvbox color palette.

* Fix clippy error.

* Small style improvement.

* Add documentation for the features to themes.md.

* Update runtime/themes/gruvbox.toml

Fix the value of purple0.

Co-authored-by: DrZingo <DrZingo@users.noreply.github.com>

Co-authored-by: DrZingo <DrZingo@users.noreply.github.com>
PabloMansanet c2a292ecf3 Update keymap.md
wojciechkepka c534fdefdc Refactor, add `ui.cursor.primary`
wojciechkepka d70be55f70 Add ability to theme primary selecition
wojciechkepka f09ccbc891 Update docs
wojciechkepka ed6528b9a6 fix: Docs, `select_line` -> `extend_line`
Blaž Hrastnik 866b32b5d7 Add repology.org packaging status
Gokul Soumya 753ed4cbc5 Add documentation for surround
wojciechkepka 618ad55dc1 Update docs
Blaž Hrastnik f41688d960 Merge `x` and `X`
Benoît CORTIER ffb54b4eac book: document new system clipboard mappings
Gokul Soumya 29f77b9c5f Fix docx formatting and links
wojciechkepka cd0ecded1f Update docs
rypervenche 0151826233
Removed unneeded escaping in Markdown docs ()
wojciechkepka a3cb79ebaa Use kebab-case for config
wojciechkepka bbefc1db63 Add an option to disable display of progress in status bar
Perry Thompson f65db9397a Fix typos in Markdown documentation
Blaž Hrastnik 14db2cc68b
Add homebrew tap instructions again
PabloMansanet f7e00cf720
Configurable keys 2 (Mapping keys to commands) ()
* Add convenience/clarity wrapper for Range initialization

* Add keycode parse and display methods

* Add remapping functions and tests

* Implement key remapping

* Add remapping book entry

* Use raw string literal for toml

* Add command constants

* Make command functions private

* Map directly to commands

* Match key parsing/displaying to Kakoune

* Formatting pass

* Update documentation

* Formatting

* Fix example in the book

* Refactor into single config file

* Formatting

* Refactor configuration and add keymap newtype wrappers

* Address first batch of PR comments

* Replace FromStr with custom deserialize
Gokul Soumya d1c8a74771 Add theme key for selected line number
Adds `ui.linenr.selected` which controls highlight of linu numbes which
have cursors on.

- Fallback to linenr if linenr.selected is missing

- Update docs and themes

- Add TODOs for themes with temporary linenr.selected
Gokul Soumya eb77de6a51 Format docs for better readability
- Wrapped appropriate table elements in inline code blocks
- Added links to different modes
- Capitalised table elements
Ivan Tham 002f1ad397 Add filter ability to picker
Inspired by doom emacs. Able to filter picker options multiple times.
Gokul Soumya f33aaba53f Add ui.selection to theme.toml
Enables changing the color of the selection which was previously
hard coded.
Robin 9baf1ecc90
add symbol picker ()
* add symbol picker

use the lsp document_symbol request

* fix errors from merging in master

* add docs for symbol picker
Robin 44cc0d8eb0
add alternate file ()
* add alternate file

inspired by vim ctrl-6/kak ga commands. the alternate file is kept per view

* apply feedback from 

* rename to last_accessed

* add ga doc

* add fail message for ga
PabloMansanet 86af55c379
Movement fixes, refactor and unit test suite ()
* Add convenience/clarity wrapper for Range initialization

* Test horizontal moves

* Add column jumping tests

* Add failing movement conditions for multi-word moves

* Refactor skip_over_next

* Add complex forward movement unit tests

* Add strict whitespace checks and edge case tests

* Restore formatting

* Remove unused function

* Add empty test case for deletion and fix nth_prev_word_boundary

* Add tests for backward motion

* Refactor word movement

* Address review comments and finish refactoring backwards move

* Finish unit test suite

* Fmt pass

* Fix lint erors

* Clean up diff restoring bad 'cargo fmt' actions

* Simplify movement closures (thanks Pickfire)

* Fmt pass

* Replace index-based movement with iterator based movement, ensuring that each move incurs a single call to the RopeSlice API

* Break down tuple function

* Extract common logic to all movement functions

* Split iterator helpers away into their own module

* WIP reducing clones

* Operate on spans

* WIP simplifying iterators

* Simplify motion helpers

* Fix iterator

* Fix all unit tests

* Refactor and simplify

* Simplify fold
Wojciech Kępka 48df05b16d commands: Add goto first non-whitespace char of line
Wojciech Kępka 4bec87ad18 Update keymap
Blaž Hrastnik ff8a031cb2 Add diagnostics keys to keymap.md
Ivan Tham 2066e866c7 Add spc w w for window mode
Ingrid 54f3548d54
theme: Enable style modifiers in theme.toml, add Ingrid's theme ()
* theme: Enable style modifiers in theme.toml

* docs: theme documentation

* fixup: parse modifiers with filter_map

* theme: tests for parse_style

* theme: Log invalid cases in theme.toml parse

* docs: theme documentation fixup

* docs: Blaz's theming comments

* docs: Theme doc fixes from pickfire

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* theme: More context in logs, TODO for alerting users

* contrib: Ingrid's theme

* docs: Theme subsection fixes

Co-authored-by: Ivan Tham <pickfire@riseup.net>
Brian Dawn ae105812d6 Apply suggestions from code review
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Brian Dawn 62d181de78 Provide a feature flag to be able to embed the runtime folder.
These changes provide a new feature flag "embed_runtime" that when
enabled and built in release mode will embed the runtime folder into the
resulting binary.
Ivan Tham 8c2fa12ffc Add window mode
Fix 
Antoni Stevenet a1f4b8f92b
Add home-end keymaps, (as kakoune/vim do) ()
* add home-end keymaps

* implement extend methods for extend_line_start, extend_line_end

* add home-end mappings to keymaps.md

* add ^-$ extend mappings for extend mode

* pass cargo linter
notoria adcfcf9044 Replace ^/$ with gh/gl
Blaž Hrastnik 4f0e3aa948 Implement gt/gm/gb, remap goto tYpe to gy
Antoni Stevent 3071339cbc update keymap.md to include arrow keys for movement
Blaž Hrastnik 67b1cd32c7 Update install notes
Blaž Hrastnik 4f56a8e248 book: Always generate the CNAME file
wullewutz cfae07e7ba
Fixed c/p error in keymap doc
Go to definition mapping is "gd" not "ge"
Blaž Hrastnik 1132c5122f Update mdbook styling, add link to AUR
Blaž Hrastnik 9c24f1ec0e Drop selection_lines completely, change move_line_start binding
Blaž Hrastnik bc99b61be2 Update the book (keymaps).
Blaž Hrastnik b1290ee609 Update book css styling.
Blaž Hrastnik 16350399ac Add book/ (mdbook based user guide)