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
Blaž Hrastnik
9776553ad0
Refactor view.first_line/first_col into view.offset (Position)
3 years ago
Grzegorz Baranski
78923496a6
feat: relative numbers ( #485 )
...
* feat(helix-view): configuring line-number
* feat(helix-term): relative line numbers
* feat(helix-term): passing editor::Config to render
* fix(helix-view): remove LineNumber::None
* feat(helix-term): rendering line-number according to configuration
* fix(term): put calculating current line above line iteration
* fix: add abs_diff function
* deps: cargo update
* fix: pass config argument
3 years ago
Gokul Soumya
d84f8b5fde
Show file preview in split pane in fuzzy finder ( #534 )
...
* Add preview pane for fuzzy finder
* Fix picker preview lag by caching
* Add picker preview for document symbols
* Cache picker preview per document instead of view
* Use line instead of range for preview doc
* Add picker preview for buffer picker
* Fix render bug and refactor picker
* Refactor picker preview rendering
* Split picker and preview and compose
The current selected item is cloned on every event, which is
undesirable
* Refactor out clones in previewed picker
* Retrieve doc from editor if possible in filepicker
* Disable syntax highlight for picker preview
Files already loaded in memory have syntax highlighting enabled
* Ignore directory symlinks in file picker
* Cleanup unnecessary pubs and derives
* Remove unnecessary highlight from file picker
* Reorganize buffer rendering
* Use normal picker for code actions
* Remove unnecessary generics and trait impls
* Remove prepare_for_render and make render mutable
* Skip picker preview if screen small, less padding
3 years ago
Dmitry Sharshakov
7d51805e94
Support primary clipboard ( #548 )
...
* clipboard-none: add in-memory fallback buffer
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* view: add Wayland primary clipboard
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Format
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: copy to primary selection after mouse move stops
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: don't update primary selection if it is a single character
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: discard result of setting primary selection
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: add commands for interaction with primary clipboard
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* editor: implement primary selection copy/paste using commands
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: support xsel for primary selection
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: support xclip for primary selection
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: multiple cursor support for middle click paste
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* rename primary selection to primary clipboard in scope of PR
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: make middle click paste optional
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Format
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Update helix-term/src/ui/editor.rs
* fix formatting
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* config: correct defaults if terminal prop is not set
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* refactor: merge clipboard and primary selection implementations
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Tidy up code
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* view: remove names for different clipboard/selection providers
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Update helix-view/src/clipboard.rs
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* helix-view: tidy macros
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: refactor paste-replace commands
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: use new config for middle-click-paste
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: remove memory fallback for command and windows providers
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard-win: fix build
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: return empty string when primary clipboard is missing
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* clipboard: fix errors in Windows build
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
3 years ago
Dmitry Sharshakov
27b551d345
helix-term: handle scrolling when mouse is enabled ( #554 )
...
* helix-term: handle scrolling when mouse is enabled
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: configure scrolling speed
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: use new config for scrolling
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* config: defaults for edtior config
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* config: add scroll-lines property
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: scroll hovered view
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: support inverted scrolling
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: remove duplicating code
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: do not focus view while scrolled
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* helix-term: refactor mouse events and scrolling
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* simplify
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
3 years ago
Blaž Hrastnik
86209c93a3
Appease clippy
3 years ago
Blaž Hrastnik
0a7add4ad4
Only recalculate resize during rendering, this stops flashing on resize
3 years ago
Kirawi
815ee9e334
fix small terminal size panic with info popup ( #563 )
...
* fix small terminal size panic with info popup
* remove unused enumerator
* fix subtraction overflow panic
3 years ago
Blaž Hrastnik
a2ccfffda1
config: Rename [terminal] to [editor] and pass it into Editor
3 years ago
Blaž Hrastnik
62eb8c6b40
mouse: Remove verify_screen_coords, refactor primary selection modification
3 years ago
Blaž Hrastnik
6bb744aeac
Remove the jump
3 years ago
Dmitry Sharshakov
8361de45dc
Mouse selection support ( #509 )
...
* Initial mouse selection support
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Disable mouse event capture if editor crashes
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Translate screen coordinates to view position
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Select full lines by dragging on line numbers
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* editor: don't register dragging as a jump
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Count graphemes correctly
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Do not select lines when dragging on the line number bar
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Split out verify_screen_coords
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Do not iterate over the graphemes twice
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Switch view by clicking on it
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Add disable-mouse config option
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Support multiple selections with mouse
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Remove unnecessary check
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Refactor using match expression
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Rename local variable
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Rename mouse option
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Refactor code
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Fix dragging selection
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Fix crash when clicking past last line
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Count characters better
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Remove comparison not needed anymore
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Validate coordinates before resolving position
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Tidy up references to editor tree
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Better way to determine line end and avoid overflow
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Fix for last line
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
* Add unit tests for text_pos_at_screen_coords
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
3 years ago
Nathan Vegdahl
a873e719d5
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
3 years ago
Gokul Soumya
1493313750
Show pending keys in status line ( #515 )
...
* Show pending keys and counts in status line
* Refactor pending key display
3 years ago
Nathan Vegdahl
f62ec6e51e
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
3 years ago
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
Nathan Vegdahl
0883b4fae0
Collect some common patterns into methods on `Range`.
3 years ago
Nathan Vegdahl
1910fa7723
Fix incorrect line hihglight when a selection is at the end of a line.
3 years ago
Nathan Vegdahl
b0311f4fc2
Fixed primary cursor position calculation to use 1-width semantics.
...
This had a bunch of knock-on effects that were buggy, such as bracket
match highlighting.
3 years ago
Nathan Vegdahl
079d4ed86d
Properly fix `last_line` view calculation.
...
Turned out to be simpler than I thought. Didn't even need to change the
other use-sites.
3 years ago
Nathan Vegdahl
1a9ae72fcb
Fix last line number being drawn in the status bar.
3 years ago
Nathan Vegdahl
a77274e8bb
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
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
85d5b399de
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
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
22dca3b111
Allow last line in file to lack a line break character.
3 years ago
Nathan Vegdahl
2224a1527e
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
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
Nathan Vegdahl
d07074740b
Add `Range` methods for various kinds of validation.
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
Blaž Hrastnik
3cee0bf200
Address clippy lint
3 years ago
Benoît CORTIER
68affa3c59
Implement register selection
...
User can select register to yank into with the " command.
A new state is added to `Editor` and `commands::Context` structs.
This state is managed by leveraging a new struct `RegisterSelection`.
3 years ago
Blaž Hrastnik
14830e75ff
Revert the line number rendering change, we were correct before
3 years ago
ahkrr
e2d780f993
fix: 2 panics while setting style + off by 1
...
The panics would occur because set_style
would draw outside of the the surface.
Both occured using `find_prev` or `till_prev`
In my case the first panic! would appear
in a terminal with around 80 columns
in helix/README.md going to the end of the file
with `geglf(`
the second with `geglfX`
The off by one fix ensures that `find_nth_prev`
starts at the first character to the left
3 years ago
Wojciech Kępka
16b1cfa3be
Add diagnostics keybindings
3 years ago
ahkrr
c5c3ec07f4
fix: panicked at 'attempt to subtract with overflow'
...
helix-term/src/ui/editor.rs:275:29
This would happen when the window-size was to small to display the entire width and one would start jumping forwards with f<some_char> and the beginning of the highlighted area would end up outside of the window
3 years ago
Kirawi
c17dcb8633
Fixing Multiple Panics ( #121 )
...
* init
* wip
* wip
3 years ago
Blaž Hrastnik
f2e554d761
matchbrackets: Needs to render with the viewport offset
3 years ago
Ivan Tham
29b9eed33c
Fix panic paint mysterious matching pair
...
When the matching pair is out of bounds it still paints it causing an
out of bound panic. A dirty fix since it still have some issue, at least
it does not panic now.
3 years ago
Jan Hrastnik
c1c3750d38
key is now modified in place at start of handle_event
3 years ago
Jan Hrastnik
daad8ebe12
key_canonicalization now only matches chars
3 years ago
Jan Hrastnik
68abc67ec6
put the key canonicalization in a seperate function. only chars now get stripped of Shift modifier
3 years ago
Jan Hrastnik
712f25c2b9
removed shift matching
3 years ago
notoria
c3a98b6a3e
Highlight matching brackets
3 years ago
Blaž Hrastnik
661dbdca57
Fix cursor not showing on (0, 0)
3 years ago
Blaž Hrastnik
c0332bd935
Fix split sizes getting out of sync with the terminal size, refs #69
3 years ago
Blaž Hrastnik
d54ae09d3b
ESC should exit both completion and insert mode
4 years ago
Blaž Hrastnik
094203c74e
Update deps, introduce the new tree-sitter lifetimes
4 years ago
Blaž Hrastnik
fae2127a11
Drop cx.view_id, it was used before we had cx.current.
4 years ago
Blaž Hrastnik
f0712479cb
Define text color (mostly) in theme.toml.
4 years ago
Blaž Hrastnik
7c915dc065
Add the :new command, don't crash if saving without filename.
4 years ago
Blaž Hrastnik
355ad3cb82
Tokio migration.
4 years ago
Blaž Hrastnik
d559199cec
Stop crashing if last view is closed.
4 years ago
Blaž Hrastnik
28c167d71d
doc: Be smarter about calculating modified status.
...
This way edit -> undo will properly show up as unmodified.
4 years ago
Blaž Hrastnik
3e5f24a9d5
lsp: support both utf-8 and utf-16 offsets.
...
Still need to implement the clangd encoding negotiation, but it's
a start. Should also manually override to utf8 for pyls.
4 years ago
Blaž Hrastnik
7493d19098
Re-introduce clearing with bg color, seems the TUI issue was fixed.
4 years ago
Blaž Hrastnik
73f4abbb37
N as extend with search (for now, N should be search_prev).
4 years ago
Blaž Hrastnik
978f5114d8
Horizontal scrolling! It only took a year to get around to it.
4 years ago
Blaž Hrastnik
d692390d10
Render current line:col.
4 years ago
Blaž Hrastnik
52da68e49a
Render a separator between vertical splits.
4 years ago
Blaž Hrastnik
f0d49d3ca4
hack: make queries load relative to source dir for now.
...
We want to provide a runtime dir later on.
4 years ago
Blaž Hrastnik
e8298a398c
Fix selection rendering, it would be off by 1 if reverse.
4 years ago
Blaž Hrastnik
7c44443994
Handle c-n, c-p, etc. autocompletion events.
4 years ago
Blaž Hrastnik
95d0bba81a
ui: Improve completion state handling.
4 years ago
Blaž Hrastnik
0dbd5b61ef
Simplify code by providin cx.current() = (view, doc).
4 years ago
Blaž Hrastnik
ceea5eacd8
clippy lint
4 years ago
Blaž Hrastnik
6c4093c946
Weave through view_id references so that views into one file have independent selects.
4 years ago
Blaž Hrastnik
1b5316ea74
Track document modified state.
4 years ago
Blaž Hrastnik
88bb7a1f38
Repeat insert command (.).
4 years ago
Blaž Hrastnik
8098e9bdcd
Allow setting a status message.
4 years ago
Blaž Hrastnik
aefafc25cd
Replace Mode::Goto with just using on_next_key.
4 years ago
Blaž Hrastnik
2a3910c1d9
wip: Async async. Delay response handling with a callback.
4 years ago
Blaž Hrastnik
8328fe926d
Drop refcell use, make view simply ref doc.id.
4 years ago
Blaž Hrastnik
bf95ee27aa
Store Document on the Editor type, make View reference it.
4 years ago
Blaž Hrastnik
5e6716c89c
Add tab_width and indent_unit config.
4 years ago
Blaž Hrastnik
cbcacb1063
Merge some imports.
4 years ago
Blaž Hrastnik
f29f01858d
Implement iter() and len() directly on Selection.
4 years ago
Blaž Hrastnik
8ba1e15d29
Expose doc.syntax() via accessor.
4 years ago
Blaž Hrastnik
59e6024186
Remove State from a few more signatures.
4 years ago
Blaž Hrastnik
51c15da3c3
Hold a reference to executor on the Editor type.
4 years ago
Blaž Hrastnik
143cfe13e0
minor: TODO comment cleanup
4 years ago
Blaž Hrastnik
081e0ae8ae
syntax: highlight_iter always returns Ok()
4 years ago
Blaž Hrastnik
71f899cb5b
syntax: Highlight using ropes, avoiding dumping whole doc to string.
4 years ago
Blaž Hrastnik
872d770753
ui: Restrain diagnostic sidebar w/h based on available area.
4 years ago
Blaž Hrastnik
87e3cd3df2
ui: Render diagnostic errors in sideline.
4 years ago
Blaž Hrastnik
1cf887dea9
Cleanup: use doc.selection() instead of doc.state.selection().
4 years ago
Blaž Hrastnik
3445abf88e
syntax: Hide the TSParser internally, borrowing when needed.
4 years ago
Blaž Hrastnik
b7dd7310c4
syntax: Reuse parser instances. highlight_iter() no longer needs &mut.
4 years ago
Blaž Hrastnik
9dcfe25e4a
Use diagnostic.severity to distinguish between error colors.
4 years ago
Blaž Hrastnik
62c991230f
find-till (f) prototype, on_next_key mode implementation.
4 years ago
Blaž Hrastnik
dd6db43013
ui: Adjust selection colors.
4 years ago
Blaž Hrastnik
513effd972
ui: unsafe theme_ref is no longer needed.
4 years ago
Blaž Hrastnik
8f4ff4c646
editor: We still want to be able to calculate cursor pos.
4 years ago
Blaž Hrastnik
ec4dd0a176
Add a selection mode again.
4 years ago
Blaž Hrastnik
00808afe3c
ui: Make editor more resilient about being shrunk too small.
4 years ago
Blaž Hrastnik
6336c1da20
view: Reposition cursors on tree resize.
4 years ago
Blaž Hrastnik
7162632eb7
lsp: Hover documentation draft.
4 years ago
Blaž Hrastnik
7da6bd6a71
commands: Simplify some code, only calling cx.doc() once.
4 years ago
Blaž Hrastnik
c9dd1c930e
treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref
4 years ago
Blaž Hrastnik
9cac44c7c0
minor changes
4 years ago
Blaž Hrastnik
8e1a59c140
ui: Redo selection rendering.
4 years ago
Blaž Hrastnik
de5170dcda
Parse input counts: 10w, etc.
4 years ago
Blaž Hrastnik
5e73f83efa
Implement vertical split calculations.
4 years ago
Blaž Hrastnik
d4b85ce18d
popup: wip work on completion popups
4 years ago
Blaž Hrastnik
a924ad2885
simplify.
4 years ago
Blaž Hrastnik
c70080dd68
Work around rendering errors for positions offscreen.
4 years ago
Blaž Hrastnik
a81b8f3e42
Fix statusline rendering, change colors on active view.
4 years ago
Blaž Hrastnik
a014787ee8
Correctly position the real terminal cursor.
4 years ago
Blaž Hrastnik
446a7e5743
Don't render selections/cursors on views not in focus.
4 years ago
Blaž Hrastnik
448c1abba0
View tree implementation: render multiple split views.
...
Cursors are still a bit buggy and we should render in focus statusbar
differently than in the other pane.
4 years ago
Blaž Hrastnik
05c7fb98df
Refactoring: move language_servers into Editor, proper load for doc.
4 years ago
Blaž Hrastnik
777a80917d
Address clippy lints.
4 years ago
Blaž Hrastnik
2ab069bb3f
lsp: Work on syncing the state with the language server.
4 years ago
Blaž Hrastnik
56f2193811
Retrieve completion options on ctrl-x.
4 years ago
Blaž Hrastnik
d61b4854b8
Make sure to clear the whole screen with the background color.
4 years ago
Blaž Hrastnik
4749b39b88
.
4 years ago
Blaž Hrastnik
0b63e838e0
Port over Doc::relative_path.
4 years ago
Blaž Hrastnik
7dc24a25ba
Move ui modules under a ui:: namespace.
4 years ago