Commit Graph

138 Commits (581a3d42c81e65a8373329fd61ff6b7d0dae8c84)

Author SHA1 Message Date
Gokul Soumya 88d6f65239
Allow multi key remappings in config file (#454)
* Use tree like structure to store keymaps

* Allow multi key keymaps in config file

* Allow multi key keymaps in insert mode

* Make keymap state self contained

* Add keymap! macro for ergonomic declaration

* Add descriptions for editor commands

* Allow keymap! to take multiple keys

* Restore infobox display

* Fix keymap merging and add infobox titles

* Fix and add tests for keymaps

* Clean up comments and apply suggestions

* Allow trailing commas in keymap!

* Remove mode suffixes from keymaps

* Preserve order of keys when showing infobox

* Make command descriptions smaller

* Strip infobox title prefix from items

* Strip infobox title prefix from items
3 years ago
Kirawi bb121a3e4b
Injection Query Support (#430)
* wip

* wip

* fixed unsafe

* fix clippy

* move out reference variable

* fmt

* remove arc

* change safety comment
3 years ago
Nathan Vegdahl 4952d6f801 Fix phantom lines in some CRLF files.
Fixes #415.  The issue was that cursor highlighting wasn't extending
to encompass the entire CRLF grapheme, and therefore ended up splitting
it.  This presumably was messing up other grapheme rendering as
well, and this fixes that as well.
3 years ago
Ivan Tham 6710855eac Fix rendering issues for infobox 3 years ago
Ivan Tham 8985c58fd3 Add infobox 3 years ago
Nathan Vegdahl efa3389b6a Fix unused variable, parameter, and `mut` warnings in helix-term. 3 years ago
Nathan Vegdahl 702a0491db Remove #[allow(unused)] from helix-term, and fix unused imports.
Lots of other warning still left.  Will address in subsequent commits.
3 years ago
Joe Neeman d64d75e724 Add some async job infrastructure. 3 years ago
Blaž Hrastnik e9159887a9 ui: Use a box drawing character vertical line for splits 3 years ago
Blaž Hrastnik 82fc28a0ce ui: Simplify conditional 3 years ago
Blaž Hrastnik bcca152ad5 Merge tab & char rendering code 3 years ago
Blaž Hrastnik 01b1a62e2c This char_index is unused 3 years ago
Blaž Hrastnik 4edfac21f6 Allocate the tab stop only once 3 years ago
Blaž Hrastnik 1b102d5532 Extract the merge "operator" into helix-core 3 years ago
Blaž Hrastnik ae58d813b2 Appease clippy 3 years ago
Blaž Hrastnik f9cdb2afe2 Turn diagnostics rendering into span injection too 3 years ago
Blaž Hrastnik 057bd630d8 Simplify selection rendering by injecting highlight scopes 3 years ago
Nathan Vegdahl a6cadddef4 Fix silly mistake in previous phantom line bug fix.
Fixes #381.  I was trying to change an index value that... wasn't
even an index value.
3 years ago
Nathan Vegdahl 2dba228c76 Fix highlight code splitting graphemes.
This resulted in phantom blank lines in files with CRLF line
endings, but could potentially have manifested with other
graphemes as well.
3 years ago
Keith Simmons 4418e17547
reverse the dependency between helix-tui and helix-view (#366)
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view

* fix tests

* clippy and format fixes

Co-authored-by: Keith Simmons <keithsim@microsoft.com>
3 years ago
Ivan Tham 10548bf0e3 Fix previous broken refactor key into helix-view
Need to be used for autoinfo

Revert "Revert "Refactor key into helix-view""

This reverts commit 10f9f72232.
3 years ago
wojciechkepka 3606d8bd24 Patch the primary cursor with insert and select styles 3 years ago
wojciechkepka c534fdefdc Refactor, add `ui.cursor.primary` 3 years ago
wojciechkepka d70be55f70 Add ability to theme primary selecition 3 years ago
wojciechkepka ac1e98d088 Add ability to theme cursor 3 years ago
Nathan Vegdahl 481c4ba044 Increment char_index by grapheme char count.
It was just assuming single-char graphemes before.
3 years ago
Blaž Hrastnik 20f33ead67 minor: Remove old TODOs 3 years ago
Blaž Hrastnik a70de6e980
Merge pull request #224 from helix-editor/line_ending_detection
Line ending detection
3 years ago
wojciechkepka cc357d5096 Add progress spinners to status line 3 years ago
Nathan Vegdahl e686c3e462 Merge branch 'master' of github.com:helix-editor/helix into line_ending_detection
Rebasing was making me manually fix conflicts on every commit, so
merging instead.
3 years ago
Nathan Vegdahl 5d22e3c4e5 Misc fixes and clean up of line ending detect code. 3 years ago
wojciechkepka 2d629a880c Fix overflow 3 years ago
Blaž Hrastnik 10f9f72232 Revert "Refactor key into helix-view"
Did not use defaults when custom keymap was used

This reverts commit ca806d4f85.
3 years ago
Jan Hrastnik cdd9347457 Merge remote-tracking branch 'origin/master' into line_ending_detection 3 years ago
Ivan Tham ca806d4f85 Refactor key into helix-view
Now also make use of Deserialize for Config.
3 years ago
wojciechkepka 1c1474c3b8 Add `ui.statusline.inactive`, use `ui.statusline` for statusline text 3 years ago
Benoît CORTIER 8664d70e73 Replace `Editor::current` by a macro
This is necessary to workaround ownership issues across function calls.
The issue notably arised when implementing the registers into `Editor`
and I was getting annoyed again when implementing copy/pasting into
system clipboard.
The problem is addressed by using macro calls instead of function calls.
There is no notable side effect.
3 years ago
PabloMansanet f7e00cf720
Configurable keys 2 (Mapping keys to commands) (#268)
* 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
3 years ago
Jan Hrastnik a4f5a0134e trying out line ending helper functions in commands.rs 3 years ago
Jan Hrastnik 3756c21bae rebase on branch line_ending_detection 3 years ago
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
3 years ago
Ivan Tham 124514aa70 Add cursor kind to separate hidden cursor from pos
Now IME cursor position should be correct since we can still set cursor
position without drawing the cursor.
3 years ago
Benoît CORTIER 6bdf609caa Remove RwLock for registers
Registers are stored inside `Editor` and accessed without `RwLock`.
To work around ownership, I added a sister method to `Editor::current`:
`Editor::current_with_context`. I tried to modify `Editor::current`
directly but it's used at a lot of places so I reverted into this for
now at least.
3 years ago
Benoît CORTIER 6fb2d2679d Use `_impl` suffix instead of `_` prefix
Helpers / internal implementations where using the `_` prefix.
However, this prefix also suppress unused warnings.
I suggest we use the `_impl` suffix instead.
3 years ago
Nathan Vegdahl 4faf1d3bf4 Remove indent style status-line display for now. 3 years ago
Nathan Vegdahl 358ea6a37c Implement command to change the indent-style setting of a document. 3 years ago
Nathan Vegdahl 8648e483f7 Render indent-style status in status line.
Also cleaned up the status line code a little.
3 years ago
Gokul Soumya f33aaba53f Add ui.selection to theme.toml
Enables changing the color of the selection which was previously
hard coded.
3 years ago
Zheming Li ae51065213 Support go to line 1 3 years ago
Wojciech Kępka 1bffb34350 Make matching bracket dimmed, prevent out of bounds rendering 3 years ago