Commit Graph

194 Commits (2cc30cd07c8974e10423757899ac368cce3e3294)

Author SHA1 Message Date
Blaž Hrastnik 2cc30cd07c Categorize _ as a word char, not punctuation
Blaž Hrastnik 17e9386388 Allow moving to EOL byte, also fixes
Blaž Hrastnik 138787f76e Drop clap for pico-args
We barely have any flags so it's not worth the compilation time or
binary size to use clap.
Blaž Hrastnik 6460501a44 Update architecture.md
Blaž Hrastnik 094203c74e Update deps, introduce the new tree-sitter lifetimes
Blaž Hrastnik 0e5b421646 When calculating a new selection, we need to take newly inserted text into account.
Blaž Hrastnik 4a9d1163e0 Hacky way to specify indent scopes per language via toml configs.
Can't do it via a scm query nicely because it returns an iterator over
all the matches, whereas we want to traverse the tree ourselves.

Can't extract the pattern data from a parsed query either.

Oh well, toml files for now.
Blaž Hrastnik 5cbb4efa6d Add the LICENSE file.
Blaž Hrastnik 0190fee1c2 Fix indent test, we need to use the in-tree runtime dir.
Blaž Hrastnik cd1754f783 Fix runtime dir lookup.
Blaž Hrastnik 1f2d87cb95 Make the config dir locator work on Windows.
Blaž Hrastnik 0f77f543e5 Determine runtime dir based on executable location or env override.
Blaž Hrastnik 5954dafdbc Indent array and tuple lists too.
Blaž Hrastnik 6c705f09e8 Lint
Blaž Hrastnik 7c915dc065 Add the :new command, don't crash if saving without filename.
Blaž Hrastnik f8844c6811 Implement pair expansion when pressing new line between bracket pairs.
From:
{|}

To:
{
    |
}
Blaž Hrastnik fd4fd12fa3 clippy lint
Blaž Hrastnik 28c167d71d doc: Be smarter about calculating modified status.
This way edit -> undo will properly show up as unmodified.
Blaž Hrastnik 7e9ea30a0b auto_pairs: move if cursor, extend if selection.
Blaž Hrastnik 5edb374237 And some more indent patterns.
Blaž Hrastnik 9e6c8c2a5a Rust: add a few more scopes to indent.
Blaž Hrastnik 9445b24b88 Simplify calculate_indentation.
Blaž Hrastnik 95dd55ba94 Fix overlap calculation.
Blaž Hrastnik 73f4abbb37 N as extend with search (for now, N should be search_prev).
Blaž Hrastnik 35b4fe4cd0 Fix range.overlap()
Blaž Hrastnik c1e5733b02 Remove the path specifier.
Blaž Hrastnik 71c06c11cb Import tree sitter queries.
Blaž Hrastnik bc4e54c0c4 Load config files from ~/.config/helix, fallback to defaults.
Blaž Hrastnik f0d49d3ca4 hack: make queries load relative to source dir for now.
We want to provide a runtime dir later on.
Blaž Hrastnik e8298a398c Fix selection rendering, it would be off by 1 if reverse.
Blaž Hrastnik 63e602bda6 Fix issues with "enum A {|}" <Enter> indent calculation.
Blaž Hrastnik 9dfd6f6bbc clippy lint
Blaž Hrastnik f00cb15137 core: Improve changeset composition behavior.
It would fail to combine with an empty set.
Blaž Hrastnik 015fd2ffa2 pairs: Use token utf8 lengths instead of 1.
Blaž Hrastnik 59a0fc7b59 w, b, e: Match kakoune's behavior in selecting by default.
I initially preferred only moving the cursor, but selecting the whole
word is a lot nicer for things like wd (instead of vwd).
Blaž Hrastnik cc058ad78f Simplify some code.
Blaž Hrastnik 9eaef6e333 Fully drop State references.
Blaž Hrastnik 742b3a709f Store intra-files jumps (goto) on the jumplist.
Blaž Hrastnik 1d96cbfbd2 Transaction: Add a changes_iter() that can convert back to a list of Changes
Blaž Hrastnik a74ff6bc03 Transaction: need to consume insert | delete properly.
Blaž Hrastnik b52474cf66 clippy lint
Blaž Hrastnik ad3325db8e minor: Remove a few unwraps.
Blaž Hrastnik 8b28bf2533 Fix broken test.
Blaž Hrastnik e3c4edae32 Add the machinery to load syntax config from TOML.
It's embedded into the binary at build time for now, but it's progress.
Blaž Hrastnik 9a36d2c2a8 wip: Hooks & trigger characters for completion/signature_help.
Blaž Hrastnik 06aca7691c clippy lint
Blaž Hrastnik d0530fb839 Fix a scrolling crash where it would jump past the end of the buffer.
Blaž Hrastnik 73c92a0bc1 Implement m / match_brackets (using tree sitter).
Blaž Hrastnik bd607b4cbd Provide a capacity on Selection::new's normalize.
Blaž Hrastnik 5e6716c89c Add tab_width and indent_unit config.