Commit Graph

1481 Commits (a512f48e4574f7465dceecb89c4dbbfa9e21ff6f)
 

Author SHA1 Message Date
Gokul Soumya 25a8a475c5
Refactor theme parsing (#570) 3 years ago
Blaž Hrastnik 6d52424303 fix: Adjust scroll offset/padding calculation to prevent wobble
Fixes #324
3 years ago
Blaž Hrastnik 55f1f04717 Highlight (html) tags 3 years ago
Blaž Hrastnik 7b16ae7c4a Bump deps 3 years ago
Blaž Hrastnik 627b899315 ui: completion: Insert suggestions when tabbing over them
Fixes #498
3 years ago
Blaž Hrastnik 6cd77ef380 nix: Update flake 3 years ago
Blaž Hrastnik f917b5a441 ui: completion: Use sort_text to sort the completions 3 years ago
Nathan Vegdahl dde2be9395
Fix surround_replace replacing the wrong character on the right. (#571)
Fixes #569.
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
Kirawi b239f0f45f
add java highlighting (#448) 3 years ago
Blaž Hrastnik 86209c93a3 Appease clippy 3 years ago
Omnikar 21e5662125
Make `exit_select_mode` check current mode (#568)
Change `exit_select_mode` to check that the current mode is select mode
before switching to normal mode
3 years ago
Blaž Hrastnik a4564adadd fix: Don't crash if language servers time out 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
Nathan Vegdahl b5223618ed Document `pos_at_coords` better.
Particularly the effect of the `limit_before_line_ending`
parameter.
3 years ago
Blaž Hrastnik a2ccfffda1 config: Rename [terminal] to [editor] and pass it into Editor 3 years ago
Blaž Hrastnik f0eb6ed96a Resolve a couple TODOs 3 years ago
Blaž Hrastnik dbd853a082 Document new keys in book/ 3 years ago
Blaž Hrastnik e2c3547f26 Improve nix indents 3 years ago
Blaž Hrastnik 02cba2a7f4 Implement alt-( and alt-) to rotate selection contents 3 years ago
Blaž Hrastnik ba729349b8 languages: Add missing comment token for elixir and nix 3 years ago
Blaž Hrastnik 385a6b5a1a lsp: Refactor duplex to avoid issues with select! + read_exact
read_exact isn't cancellation safe.

Fixes #504
3 years ago
Luctius 8714b71991 Do not shutdown lsp during claim_term
Fixes a bug where the language server is told to shutdown directly after application start.
3 years ago
Blaž Hrastnik b20a5c4c0e ui: menu: Allow wrapping around on ctrl-p/shift tab 3 years ago
Blaž Hrastnik 66a90130a5 Implement selection rotation with `(` and `)` 3 years ago
Nathan Vegdahl 953125d3f3
Fix around-word text-object selection. (#546)
* Fix around-word text-object selection.

* Text object around-word: select to the left if no whitespace on the right.

Also only select around when there's whitespace at all.

* Make select-word-around select all white space on a side.

* Update commented-out test case.

* Fix unused import warning from rebase.
3 years ago
Ivan Tham 10c77cdc03 Exit extend after yank
Yank should proceed with normal mode.
3 years ago
Blaž Hrastnik 5342f976d4 Document C/Alt-C in the keymap 3 years ago
Blaž Hrastnik 0793841ac3 Refactor copy selection vertically 3 years ago
Cor f160008add Vertical Selection 3 years ago
Nathan Vegdahl c9cbc344fc Fix buggy surround behavior from #376.
Fixes #543.
3 years ago
Nathan Vegdahl 8c3a5b14de Add `goto_last_line` command, and bind it to `ge`.
Resolves #529.
3 years ago
Blaž Hrastnik 585793eb46 Use an empty stream on Windows to remove duplication 3 years ago
Ivan Tham 821565e4ef Add ctrl-z to suspend 3 years ago
Blaž Hrastnik adb5d842ba Use nicer filepaths instead of URIs in goto picker 3 years ago
Blaž Hrastnik b3aefe18cd nix: Update flake 3 years ago
dependabot[bot] cfef44e3d2 Bump which from 4.1.0 to 4.2.2
Bumps [which](https://github.com/harryfei/which-rs) from 4.1.0 to 4.2.2.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Commits](https://github.com/harryfei/which-rs/compare/4.1.0...4.2.2)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot] c9b4b48344 Bump serde_json from 1.0.64 to 1.0.66
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.64 to 1.0.66.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.64...v1.0.66)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot] 99a4e3fc79 Bump serde from 1.0.126 to 1.0.127
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.126 to 1.0.127.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.126...v1.0.127)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Omnikar bfcc6e2ca5 Update `README.md` 3 years ago
Ryo Hirayama ef6a2317b7 Update keymap.md 3 years ago
Blaž Hrastnik 557c63033c fix: Map all selections on transaction.apply 3 years ago
Nathan Vegdahl ccecda4f66 Add more unit tests for pos_at_screen_coords.
Specifically, test cases for double-width characters and grapheme
clusters.
3 years ago
Gokul Soumya eec5631140 Update popup and diagnostics in onedark theme 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
Blaž Hrastnik 0fdb626c2c Remove embed_runtime feature
It's no longer practical to maintain. Closes #451
3 years ago
Nathan Vegdahl f88d4c1e20 Move indent-style code into `helix_core::indent`. 3 years ago