Commit graph

1503 commits

Author SHA1 Message Date
Blaž Hrastnik
b5b650cfe7 Fix the last line calculation inside ensure_cursor_in_view 2021-04-14 17:15:32 +09:00
Blaž Hrastnik
c64240b6ef Implement most of the view mode (z). 2021-04-14 17:15:11 +09:00
Blaž Hrastnik
5edb374237 And some more indent patterns. 2021-04-14 17:14:13 +09:00
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.
2021-04-14 15:39:31 +09:00
Blaž Hrastnik
811f952a41 Center search results. 2021-04-14 15:39:31 +09:00
Blaž Hrastnik
9e6c8c2a5a Rust: add a few more scopes to indent. 2021-04-14 15:39:31 +09:00
Blaž Hrastnik
9445b24b88 Simplify calculate_indentation. 2021-04-14 14:28:31 +09:00
Blaž Hrastnik
180521fefe Adjust scroll() to match kakoune: only scroll the view if cursor in bounds. 2021-04-14 14:27:47 +09:00
Blaž Hrastnik
dfb1ae2d33 Rust: Highlight 'crate' as a keyword. 2021-04-13 17:06:35 +09:00
Blaž Hrastnik
2a1f10d1b5 Center the new position on screen after doing a goto jump. 2021-04-13 16:56:03 +09:00
Blaž Hrastnik
95dd55ba94 Fix overlap calculation. 2021-04-10 12:02:23 +09:00
Blaž Hrastnik
7493d19098 Re-introduce clearing with bg color, seems the TUI issue was fixed. 2021-04-10 00:25:46 +09:00
Blaž Hrastnik
392c4a9c02 Keep primary selection as space+space. 2021-04-10 00:21:54 +09:00
Blaž Hrastnik
73f4abbb37 N as extend with search (for now, N should be search_prev). 2021-04-10 00:21:13 +09:00
Blaž Hrastnik
35b4fe4cd0 Fix range.overlap() 2021-04-10 00:20:12 +09:00
Blaž Hrastnik
5253f40477 nix: Switch to stable rust. 2021-04-09 19:29:01 +09:00
Blaž Hrastnik
978f5114d8 Horizontal scrolling! It only took a year to get around to it. 2021-04-09 19:29:01 +09:00
Blaž Hrastnik
d692390d10 Render current line:col. 2021-04-09 18:57:46 +09:00
Blaž Hrastnik
865429643b <space>w for save, <space>c for close current split. 2021-04-09 18:57:46 +09:00
Blaž Hrastnik
4e31d1521b Add tree-sitter queries. 2021-04-09 18:57:46 +09:00
Blaž Hrastnik
c1e5733b02 Remove the path specifier. 2021-04-09 18:57:46 +09:00
Blaž Hrastnik
61872de6c0 queries: rust: highlight number constants correctly. 2021-04-08 23:25:54 +09:00
Blaž Hrastnik
71c06c11cb Import tree sitter queries. 2021-04-08 23:25:35 +09:00
Blaž Hrastnik
52da68e49a Render a separator between vertical splits. 2021-04-08 22:34:06 +09:00
Blaž Hrastnik
9f318a8529 Fix an issue with closing nested splits.
The parent id was never assigned to the split, so removing the container
when it became empty failed.
2021-04-08 22:34:06 +09:00
Blaž Hrastnik
9ca2909c80 Loop around the end on regex searches. 2021-04-08 22:34:06 +09:00
Blaž Hrastnik
8b33ba2284 Correct the naming issue with vsplit and hsplit being swapped. 2021-04-08 15:52:04 +09:00
Blaž Hrastnik
58c5fec592 minor: This comment was resolved. 2021-04-08 14:25:04 +09:00
Blaž Hrastnik
b1290ee609 Update book css styling. 2021-04-07 23:56:56 +09:00
Blaž Hrastnik
bc4e54c0c4 Load config files from ~/.config/helix, fallback to defaults. 2021-04-07 23:56:20 +09:00
Blaž Hrastnik
f0d49d3ca4 hack: make queries load relative to source dir for now.
We want to provide a runtime dir later on.
2021-04-07 18:05:59 +09:00
Blaž Hrastnik
12961d657f Implement P as paste_before. 2021-04-07 17:03:29 +09:00
Blaž Hrastnik
31e6bcbeb4 Clippy lint: replace with default -> take 2021-04-07 16:58:23 +09:00
Blaž Hrastnik
e8298a398c Fix selection rendering, it would be off by 1 if reverse. 2021-04-07 16:57:58 +09:00
Blaž Hrastnik
63e602bda6 Fix issues with "enum A {|}" <Enter> indent calculation. 2021-04-07 16:39:13 +09:00
Blaž Hrastnik
4103349be1 Update flake.lock 2021-04-07 16:38:17 +09:00
Blaž Hrastnik
82ff996662 Yank selection when deleting. 2021-04-07 15:40:15 +09:00
Blaž Hrastnik
89f81be31b Add yet more language definitions. 2021-04-07 14:04:13 +09:00
Blaž Hrastnik
fb792c5bca Add a python language definition. 2021-04-07 13:51:09 +09:00
Blaž Hrastnik
3bab640491 Add c++, js, css, html language definitions. 2021-04-07 13:40:20 +09:00
Blaž Hrastnik
463f58dfda Fix clamping scroll in certain cases.
.clamp(min, max) requires that min < max. In some cases
first + scrolloff > last - scrolloff and we would panic.
2021-04-07 13:38:50 +09:00
Blaž Hrastnik
5aed1f3c00 lsp: Gracefully fail if binary doesn't exist. 2021-04-07 13:38:24 +09:00
Blaž Hrastnik
9dfd6f6bbc clippy lint 2021-04-06 20:00:35 +09:00
Blaž Hrastnik
0e9ecccfc1 clippy: Drop or-patterns for now because they're not on stable rust yet 2021-04-06 19:51:15 +09:00
Blaž Hrastnik
91462af546 Allow starting hx without a file. A new blank file will be created. 2021-04-06 19:02:22 +09:00
Blaž Hrastnik
f00cb15137 core: Improve changeset composition behavior.
It would fail to combine with an empty set.
2021-04-06 19:01:48 +09:00
Blaž Hrastnik
cf7b19d711 Always update selection: Empty transactions can still change selections. 2021-04-06 17:29:39 +09:00
Blaž Hrastnik
015fd2ffa2 pairs: Use token utf8 lengths instead of 1. 2021-04-06 17:28:56 +09:00
Blaž Hrastnik
7c44443994 Handle c-n, c-p, etc. autocompletion events. 2021-04-06 15:34:52 +09:00
Blaž Hrastnik
95d0bba81a ui: Improve completion state handling. 2021-04-05 18:23:37 +09:00