Commit Graph

20 Commits (3256b013889eee5f9bc66f58b59386214bc49cf2)

Author SHA1 Message Date
Pascal Kuthe 5a3ff74221
Show (git) diff signs in gutter (#3890)
* Show (git) diff signs in gutter (#3890)

Avoid string allocation when git diffing

Incrementally diff using changesets

refactor diffs to be provider indepndent and improve git implementation

remove dependency on zlib-ng

switch to asynchronus diffing with similar

Update helix-vcs/Cargo.toml

fix toml formatting

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

fix typo in documentation

use ropey reexpors from helix-core

fix crash when creating new file

remove useless use if io::Cursor

fix spelling mistakes

implement suggested improvement to repository loading

improve git test isolation

remove lefover comments

Co-authored-by: univerz <univerz@fu-solution.com>

fixed spelling mistake

minor cosmetic changes

fix: set self.differ to None if decoding the diff_base fails

fixup formatting

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

reload diff_base when file is reloaded from disk

switch to imara-diff

Fixup formatting

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

Redraw buffer whenever a diff is updated.

Only store hunks instead of changes for individual lines to easily allow
jumping between them

Update to latest gitoxide version

Change default diff gutter position

Only update gutter after timeout

* update diff gutter synchronously, with a timeout

* Apply suggestions from code review

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* address review comments and ensure lock is always aquired

* remove configuration for redraw timeout

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Doug Kelkhoff 7ed9e9cf25
Dynamically resize line number gutter width (#3469)
* dynamically resize line number gutter width

* removing digits lower-bound, permitting spacer

* removing max line num char limit; adding notes; qualified successors; notes

* updating tests to use new line number width when testing views

* linenr width based on document line count

* using min width of 2 so line numbers relative is useful

* lint rolling; removing unnecessary type parameter lifetime

* merge change resolution

* reformat code

* rename row_styler to style; add int_log resource

* adding spacer to gutters default; updating book config entry

* adding view.inner_height(), swap for loop for iterator

* reverting change of current! to view! now that doc is not needed
2 years ago
Pascal Kuthe 71ee589bbc
make underline_style a seperate option
Underline styles are mutally exclusive and overwrite each other.
Therefore implementing as an modifier lead to incorrect behaviour
when the underline style is overwritten.

For backwards compatability the "underline" modified is retained (but
deprecated). Instead the "underline_style" and "underline_color"
optios should be used to style underlines.
2 years ago
Blaž Hrastnik 5c2b77b41f
Make mode editor-wide rather than per-document 2 years ago
Ivan Tham e8214fb1e6
Make gutters padding optional (#2996)
If all gutters are removed, there are still an extra one padding, would be nice
to remove that to save some space.
2 years ago
A-Walrus 43027d9104
Display highest severity diagnostic in gutter (#2835)
* Display highest severity diagnostic in gutter

* Improve gutter diagnostic performance

Very slight improvement (doesn't really make a difference), iterates over the diagnostics of the line
once instead of twice.

* Add comment justifying unwrap
2 years ago
Michael Davis cdeab337cd
simplify fallback for selected line-number theming (#2768) 2 years ago
Dr. David A. Kunz b04c425c63
Make gutters configurable (#1967)
* config option line numbers none

* view tests

* added tests

* doc

* comment

* Make gutters configurable

* docu

* docu

* rm none docu

* order

* order

* precedence

* simpler

* rm todo

* fixed clippy

* order

* double quotes

* only allow diagnostics and line-numbers

* tests

* docu

* format

* rm short variant and more docu

* performance improvements

* typo

* rename
2 years ago
Joe bee05dd32a
Add refresh-config and open-config command (#1803)
* Add refresh-config and open-config command

* clippy

* Use dynamic dispatch for editor config

* Refactor Result::Ok to Ok

* Remove unused import

* cargo fmt

* Modify config error handling

* cargo xtask docgen

* impl display for ConfigLoadError

* cargo fmt

* Put keymaps behind dyn access, refactor config.load()

* Update command names

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Switch to unbounded_channel

* Remove --edit-config command

* Update configuration docs

* Revert "Put keymaps behind dyn access", too hard

This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79.

* Add refresh for keys

* Refactor default_keymaps, fix config default, add test

* swap -> store, remove unneeded clone

* cargo fmt

* Rename default_keymaps to default

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Blaž Hrastnik bd549d8a20 Merge remote-tracking branch 'origin/master' into debug 2 years ago
Andrew Neth 333c2949c2
feat(helix-view): dynamic line numbers (#1522)
* feat(helix-view): dynamic line numbers

* docs: describe editor.line-number in more detail

* Make dynamic numbers the default behavior of `relative`
2 years ago
Blaž Hrastnik 35ac815409 Fix compilation
nix-direnv issues still mess with my shell..
2 years ago
Blaž Hrastnik a2b22ec152 Use binary_search when looking up diagnostics
They're sorted by range so they should also be sorted by line
2 years ago
Blaž Hrastnik d14ca05d6b Simplify some cases that use return None to use ? 2 years ago
Blaž Hrastnik ffc89e483b Mark some more TODOs as resolved 3 years ago
Blaž Hrastnik 84e939ef58 Provide a single gutter component that does breakpoint || diagnostic 3 years ago
Blaž Hrastnik d906911417 dap: Prevent crashes on files with no name or breakpoints 3 years ago
Blaž Hrastnik 30ac5869df dap: Extract diagnostics gutter into gutters.rs 3 years ago
Blaž Hrastnik 3633f85b38 Pass editor into render_view & gutter, reducing the number of params 3 years ago
Blaž Hrastnik 225e8ccf31 Extract gutters into helix-view 3 years ago