Commit Graph

313 Commits (3b1ba7fb1213c7aee744e7df4830cc7bab8703ec)

Author SHA1 Message Date
Matouš Dzivjak 4b0b1a5657
feat(ui): file encoding in statusline (#1355)
* feat(ui): file encoding in statusline

Display file encoding in statusline if the encoding
isn't UTF-8.

* Re-export encoding_rs from core

From there it can be imported by other mods
that rely on it.
3 years ago
BB 60f3225c7f
Truncate the start of file paths in the StatusLine (#1351)
* Truncate the start of file paths in the StatusLine

* cargo fmt

Co-authored-by: Bódi Balázs <97936@4ig.hu>
3 years ago
Gokul Soumya c0bbadcaaf Manually draw all block cursors 3 years ago
Gokul Soumya d4fb1d0633 Merge branch 'master' into cursor-shape-new 3 years ago
Gokul Soumya 016640f4fb Remove ui.cursor.primary and hashmap lookups 3 years ago
Blaž Hrastnik 730d3be201 Add ui.gutter to theme all gutters (i.e. set bg) 3 years ago
Omnikar e91d357fae
Macros (#1234)
* Macros WIP

`helix_term::compositor::Callback` changed to take a `&mut Context` as
a parameter for use by `play_macro`

* Default to `@` register for macros

* Import `KeyEvent`

* Special-case shift-tab -> backtab in `KeyEvent` conversion

* Move key recording to the compositor

* Add comment

* Add persistent display of macro recording status

When macro recording is active, the pending keys display will be shifted
3 characters left, and the register being recorded to will be displayed
between brackets — e.g., `[@]` — right of the pending keys display.

* Fix/add documentation
3 years ago
Oskar Nehlin a06871a689
feat: Make it possible to keybind `TypableCommands` (#1169)
* Make TypableCommands mappable

* Fix pr comments

* Update PartialEq implementation
3 years ago
Blaž Hrastnik 34f46e7502 Bump rust to 1.57, fix new lint failures 3 years ago
Blaž Hrastnik dfd499f5a9 dap: Highlight line of current stack frame 3 years ago
Blaž Hrastnik c955eaa6cd Revert "Improve dedent behavior, make kill_to_line_end behave like emacs (#1173)"
1. pressing o on a line with no indentation will open a new line as
   expected, but esc will then delete the line altogether

2. the kill_line behavior happens after insert mode changes are already
   commited to history, and the change isn't commited. pressing u after
   this will break highlighting & undo history

This reverts commit c08d2fae58.
3 years ago
Blaž Hrastnik 259678585c ui: Optimize tree-sitter style lookups
Tree sitter returns an index referring to the position of the scope in
the scopes array. We can use that same index to avoid a hashmap lookup
and instead store the styles in an array.

This currently stores the styles in both a map and an array because the
UI still uses hashmap lookups, but it's a reasonable tradeoff.
3 years ago
Blaž Hrastnik 7bbf4c5b06 ui: Only calculate span styling when it's actually in bounds 3 years ago
Blaž Hrastnik 96ae5897a1 Remove another parameter from render_view 3 years ago
Blaž Hrastnik 30ac5869df dap: Extract diagnostics gutter into gutters.rs 3 years ago
Blaž Hrastnik 8ffafb826f dap: Rewrite breakpoints so that there's a single set maintained 3 years ago
Blaž Hrastnik 3633f85b38 Pass editor into render_view & gutter, reducing the number of params 3 years ago
WindSoilder c08d2fae58
Improve dedent behavior, make kill_to_line_end behave like emacs (#1173)
* restore indent when press esc right after open a new line

* add comment for restore_indent

* fix, and make kill to line end behaves like emacs

* update comment

* fix comment

* adjust cancel restore_indent situation

* check esc logic in mode transaction

* improve comment

* add more check for dedent

* update comment

* use matches to check for last_cmd

* no need to introduct CommandFun type
3 years ago
Blaž Hrastnik 9ed930b233 Merge remote-tracking branch 'origin/master' into debug 3 years ago
Blaž Hrastnik 225e8ccf31 Extract gutters into helix-view 3 years ago
Blaž Hrastnik 27c1a84f05 Reuse a text buffer for each gutter line 3 years ago
Blaž Hrastnik ba45db84d4 Tie the GutterFn lifetime to the doc so we can avoid cloning data 3 years ago
Blaž Hrastnik 30171416cb Gutter functions 3 years ago
Gokul Soumya 7961355ba1 Change cursor shape on mode change
Fixes #323. Due to terminal limitations we can only
change the shape of the primary cursor.
3 years ago
Blaž Hrastnik 85b4410703 dap: Toggle breakpoints without changing selection, fix offset calc 3 years ago
Blaž Hrastnik 28fd704bce ui: Since diagnostics are sorted, we can use binary search 3 years ago
Blaž Hrastnik 5f329a22c4 dap: Modify breakpoints in place with no cloning 3 years ago
Blaž Hrastnik d1854d8e6a Merge remote-tracking branch 'origin/master' into debug 3 years ago
Martin Junghanns a3a3b0b517
Jump to end char of surrounding pair from any cursor pos (#1121)
* Jump to end char of surrounding pair from any cursor pos

* Separate bracket matching into exact and fuzzy search

* Add constants for bracket chars

* Abort early if char under cursor is not a bracket

* Simplify bracket char validation

* Refactor node search and unify find methods

* Remove bracket constants
3 years ago
Blaž Hrastnik 8db6fffe90 ui: Increase diagnostics sideline width to 100 max and wrap if needed 3 years ago
ath3 35c974c9c4
Implement "Goto last modification" command (#1067) 3 years ago
Cole Helbling b74912ea78 helix-term/editor: display scratch buffer name in status bar 3 years ago
Omnikar d131a9dd0e
Allow keys to be mapped to sequences of commands (#589)
* Allow keys to be mapped to sequences of commands

* Handle `Sequence` at the start of `Keymap::get`

* Use `"[Multiple commands]"` as command sequence doc

* Add command sequence example to `remapping.md`
3 years ago
Blaž Hrastnik 8b85903116 wip 3 years ago
Blaž Hrastnik 5938ab1bf1 dap: Fully extract template parameter prompts 3 years ago
Blaž Hrastnik 64bb1f7563 dap: Extract out variable rendering
Will improve on the UI later
3 years ago
Blaž Hrastnik e2a23ac0b5 If there is no live debugger, treat breakpoints as unverified 3 years ago
Blaž Hrastnik 2e1aa5f15b Fix compilation 3 years ago
Blaž Hrastnik 14a3502cf1 dap: Move template selection into a picker
It's time to move all these components out of ui/editor.rs
3 years ago
Blaž Hrastnik f2b709a3c3 Merge branch 'master' into debug 3 years ago
Omnikar cfc8285867
Allow infoboxes to be disabled (#972)
* Allow infoboxes to be disabled

* Document `infoboxes` default value

* Rename `infoboxes` to `auto_info`

* Document `auto-info`

* Fix incomplete rename
3 years ago
Blaž Hrastnik e2560f427e Replace documents SlotMap with BTreeMap 3 years ago
Blaž Hrastnik e5de103728 Extract a clear_completion method 3 years ago
Omnikar 2505802d39
Improve statusline (#916)
* Improve statusline

* Change diagnostic count display to show counts of individual
  diagnostic types next to their corresponding gutter dots.
* Add selection count to the statusline.

* Do not display info or hint count in statusline

* Reduce padding

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

* Reduce padding

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

* Use `Span::styled`

* Reduce padding

* Use `Style::patch`

* Remove unnecessary `Cow` creation

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
3 years ago
Blaž Hrastnik acc5ac5e73 fix warning 3 years ago
Blaž Hrastnik 3edca7854e completion: fully revert state before apply & insertText common prefix 3 years ago
Blaž Hrastnik cee7ad781e Mark a few functions as `const` 3 years ago
Blaž Hrastnik 0a6b60085a Merge branch 'master' into debug 3 years ago
Blaž Hrastnik f692ede2b7 fix: Don't crash on empty completion, don't retrigger on close 3 years ago
Blaž Hrastnik 66f26e82ce Filter the initial completion 3 years ago
Blaž Hrastnik 40abec80e1 Experiment with autocompletion on idle 3 years ago
Blaž Hrastnik f99bea404f idle timer wip 3 years ago
Dmitry Sharshakov bf53aff27d Merge branch 'master' into debug 3 years ago
Blaž Hrastnik dd0b15e1f1 syntax: Properly handle injection-regex for language injections 3 years ago
Blaž Hrastnik 72cf86e462 Regex prompts should have a history with a specifiable register 3 years ago
Dmitry Sharshakov 507a1f8dd6 Get breakpoint reports from debugger 3 years ago
Dmitry Sharshakov 0add0c5639
Make conditional logpoints underlined 3 years ago
Dmitry Sharshakov 0e1e4edc5e different display for conditional logpoints 3 years ago
Dmitry Sharshakov 8a609047c3 Mouse command for editing logpoint 3 years ago
Dmitry Sharshakov 3b0ec750ff Support editing breakpoint condition with right click 3 years ago
Gokul Soumya 183dcce992
Add a sticky mode for keymaps (#635) 3 years ago
Dmitry Sharshakov 1befbd076c Add command for editing breakpoint condition 3 years ago
Dmitry Sharshakov 698583c241 Support setting breakpoints with mouse 3 years ago
Blaž Hrastnik b997d2cdeb dap: Allow setting breakpoints before starting the adapter 3 years ago
Dmitry Sharshakov 2c89107349
Fix crash when stack trace not loaded
Still doesn't address the issue though
3 years ago
Dmitry Sharshakov 5b20f6020a Merge remote-tracking branch 'origin/master' into debug
Contains type fix on helix-term/src/ui/editor.rs:752:13
3 years ago
gbaranski 9c5752cbac fix: use .cursor() instead of .head 3 years ago
gbaranski b590504143 fix: use head instead of anchor for relative line 3 years ago
Blaž Hrastnik 0b0b1d850a dap: Stop comparing file paths per line number 3 years ago
Blaž Hrastnik 2c7b75475f dap: refactor frame handling 3 years ago
Omnikar 03ad9e0bfa
Fix code indentation (#671) 3 years ago
Dmitry Sharshakov b42631942b
Defaults in completions, better schema 3 years ago
Dmitry Sharshakov f53d8411cb
Add extra annotations to completions 3 years ago
Dmitry Sharshakov 98fda6b8f0
better completion 3 years ago
Dmitry Sharshakov 9d2f2a9e32
Support multiple arguments for debug configs 3 years ago
Dmitry Sharshakov 2d42766a71
wip: refactor parameters in UI start 3 years ago
Dmitry Sharshakov af657ef2ec
Fix lints 3 years ago
Dmitry Sharshakov 94901b8677
Customized completion for template parameters 3 years ago
Dmitry Sharshakov ef155e62ef
Add filename autocomplete to template args 3 years ago
Dmitry Sharshakov e315394631
Merge remote-tracking branch 'origin/master' into debug 3 years ago
Dmitry Sharshakov 8df6739759
New way of starting debug sessions 3 years ago
Dmitry Sharshakov 5e4da09be2
Don't let picker be too narrow 3 years ago
Dmitry Sharshakov 890b51b568
Paginated variables 3 years ago
Grzegorz Baranski cec5d437d8
fix: show current line number even if relative line is on (#656) 3 years ago
Dmitry Sharshakov c7759a5aa0
Merge remote-tracking branch 'origin/master' into debug 3 years ago
Dmitry Sharshakov 5d3c69d565
Support logpoints
Tested with Node (Delve and LLDB do not support logpoints)
3 years ago
Dmitry Sharshakov b78f70e602
show breakpoint condition in diagnostics 3 years ago
Dmitry Sharshakov f247858055
Support conditional breakpoints 3 years ago
Kirawi 59e0ceef8c
better panic messages for when you're missing selection scopes (#608) 3 years ago
Dmitry Sharshakov a938f5a87a
refactor: handle DAP events in editor main loop 3 years ago
Dmitry Sharshakov 3fc501c99f
Correctly display 1-based breakpoints 3 years ago
Dmitry Sharshakov 56bddb12f8
Highlight line number of stack pointer 3 years ago
Dmitry Sharshakov 5f5b383979
Fix clippy warnings 3 years ago
Dmitry Sharshakov 6458edecfd
Add stack pointer display when stopped 3 years ago
Gokul Soumya f9375f449c
Refactor new Rect construction (#575)
* Refactor new Rect construction

Introduces methods that can be chained to construct new Rects
out of pre-existing ones

* Clamp x and y to edges in Rect chop methods

* Rename Rect clipping functions
3 years ago
Dmitry Sharshakov c4970c617e
make CI green 3 years ago
Blaž Hrastnik 94a1951d40 Work towards a breakpoint UI 3 years ago
Blaž Hrastnik 0595b0626a Fix clippy attr 3 years ago
Blaž Hrastnik 5f8b1c7320 Avoid looking up ui.text per highlight range 3 years ago
Blaž Hrastnik 557fd86e71 Extract view.inner_area(), simplify render_focused_view_elements 3 years ago