notoria
1a3a924634
Implement Debug for data structure as a feature
3 years ago
Blaž Hrastnik
aebdef8257
Reuse a cursor from the pool if available ( fixes #202 )
3 years ago
Ivan Tham
5e2ba28e0e
Fix panic on ctrl-w empty document
3 years ago
Wojciech Kępka
c978d811d9
Cleanup find_first_non_whitespace_char funcs
3 years ago
Wojciech Kępka
48df05b16d
commands: Add goto first non-whitespace char of line
3 years ago
Kirawi
b873fb9897
Fix Unicode ( #135 )
...
* init
* wip
* wip
* fix unicode break
* fix unicode break
* Update helix-core/src/transaction.rs
Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
* clippy
* fix
* add changes
* added test
* wip
* wip
* wip
* wip
* fix
* fix view
* fix #88
Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
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
8d6fad4cac
lsp: Provide workspace root on client.initialize()
3 years ago
Blaž Hrastnik
f48a60b8e2
Release 0.0.10
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
Ethan Bodzioney
843c2cdebd
Install instructions and version number corrections ( #148 )
...
* Add MacOS install instructions
* Change version name argument
When using the -V command to get the version you are given 'helix-term x.x.x', I changed this to just helix as it makes more sense.
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
* Fixed version number
3 years ago
Benoît CORTIER
8a29086c1a
Fix panic when moving over unicode punctuation
...
`is_ascii_punctuation` will only work for ASCII punctuations, and when
we have unicode punctuation (or other) we jump into the `unreachable`.
This patch fallback into categorizing everything in this branch as
`Unknown`.
Fixes https://github.com/helix-editor/helix/issues/123
https://github.com/helix-editor/helix/pull/135 : add better support for
unicode categories.
3 years ago
Ivan Tham
df80f3c966
Add test for prev word
3 years ago
Ivan Tham
40744ce835
Add ctrl-w in insert mode
...
It seemed to panic when I pressed too many times, but that is from
lsp side.
3 years ago
Brian Dawn
5463a436a8
Return an error if we request an embedded file that does not exist.
...
This makes the load_runtime_file function behave like the non-embedded
one.
3 years ago
Brian Dawn
e09b0f4eff
Add a smoke test around loading runtime files.
...
This test makes sure we can read some amount of data from the runtime folder.
3 years ago
Brian Dawn
f3db12e240
Simplify the load_runtime_file code.
...
Reduce the number of feature switches for the embed_runtime feature.
3 years ago
Brian Dawn
676719b361
Simplify creating pathbufs.
...
Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Brian Dawn
ae105812d6
Apply suggestions from code review
...
Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Brian Dawn
255598a2cb
Make rust-embed optionally included based on the embed_runtime feature.
3 years ago
Brian Dawn
62d181de78
Provide a feature flag to be able to embed the runtime folder.
...
These changes provide a new feature flag "embed_runtime" that when
enabled and built in release mode will embed the runtime folder into the
resulting binary.
3 years ago
ahkrr
444cd0b068
fix: make find_prev_char and till_prev_char work
...
Bevore this PR `commands::find_prev_char` and `commands::till_prev_char` were triggerable through keys
but `seach::find_nth_next()` was hardcoded in `_find_char`.
The passed `fn` was nerver used. With this PR the passed `fn` is used.
The change in search.rs resolves an off by one error in the behivor of `find_nth_prev`
3 years ago
Ivan Tham
6254720f53
Add unreachable context
...
Better error for #123
3 years ago
notoria
2bb71a829e
Don't panic on empty file/buffer ( #108 )
3 years ago
Kirawi
c17dcb8633
Fixing Multiple Panics ( #121 )
...
* init
* wip
* wip
3 years ago
Blaž Hrastnik
06d8d3f55f
Try to detect language when document file path is set
...
Fixes #91
3 years ago
notoria
8af5a9a5cf
Remove swapfile
3 years ago
notoria
f76f44c8af
Convert byte index to char index for `find`
3 years ago
Blaž Hrastnik
74e4ac8d49
Merge pull request #77 from notoria/match_brackets
...
Fix match_brackets::find
3 years ago
notoria
4fe654cf9a
Fix match_brackets::find
3 years ago
Ivan Tham
d664d1dec0
Default log file to cache
3 years ago
Ivan Tham
f5f46b1fed
Separate document history into Cell
...
As history is used separately from the rest of the edits, separating it
can avoid needless borrowing and cloning. But one need to be aware later.
3 years ago
Blaž Hrastnik
f4560cb68a
Better fix for w/e that also covers `ia<esc>we`/`ia<esc>wb`
3 years ago
Blaž Hrastnik
0851110d10
f/t: Check if at bounds before searching, refs #43 , closes #37
3 years ago
Blaž Hrastnik
3ace581191
Fix panics when triggering w or e on the last char of the line
...
Closes #32
3 years ago
Blaž Hrastnik
c0264b9f7f
fix: Don't allow moving past last line, fixes #30 , #24
...
Off by 1 error
3 years ago
Blaž Hrastnik
2cc30cd07c
Categorize _ as a word char, not punctuation
3 years ago
Blaž Hrastnik
17e9386388
Allow moving to EOL byte, also fixes #15
3 years ago
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.
3 years ago
Blaž Hrastnik
6460501a44
Update architecture.md
3 years ago
Blaž Hrastnik
094203c74e
Update deps, introduce the new tree-sitter lifetimes
3 years ago
Blaž Hrastnik
0e5b421646
When calculating a new selection, we need to take newly inserted text into account.
4 years ago
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.
4 years ago
Blaž Hrastnik
5cbb4efa6d
Add the LICENSE file.
4 years ago
Blaž Hrastnik
0190fee1c2
Fix indent test, we need to use the in-tree runtime dir.
4 years ago
Blaž Hrastnik
cd1754f783
Fix runtime dir lookup.
4 years ago
Blaž Hrastnik
1f2d87cb95
Make the config dir locator work on Windows.
4 years ago
Blaž Hrastnik
0f77f543e5
Determine runtime dir based on executable location or env override.
4 years ago
Blaž Hrastnik
5954dafdbc
Indent array and tuple lists too.
4 years ago
Blaž Hrastnik
6c705f09e8
Lint
4 years ago
Blaž Hrastnik
7c915dc065
Add the :new command, don't crash if saving without filename.
4 years ago
Blaž Hrastnik
f8844c6811
Implement pair expansion when pressing new line between bracket pairs.
...
From:
{|}
To:
{
|
}
4 years ago
Blaž Hrastnik
fd4fd12fa3
clippy lint
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
7e9ea30a0b
auto_pairs: move if cursor, extend if selection.
4 years ago
Blaž Hrastnik
5edb374237
And some more indent patterns.
4 years ago
Blaž Hrastnik
9e6c8c2a5a
Rust: add a few more scopes to indent.
4 years ago
Blaž Hrastnik
9445b24b88
Simplify calculate_indentation.
4 years ago
Blaž Hrastnik
95dd55ba94
Fix overlap calculation.
4 years ago
Blaž Hrastnik
73f4abbb37
N as extend with search (for now, N should be search_prev).
4 years ago
Blaž Hrastnik
35b4fe4cd0
Fix range.overlap()
4 years ago
Blaž Hrastnik
c1e5733b02
Remove the path specifier.
4 years ago
Blaž Hrastnik
71c06c11cb
Import tree sitter queries.
4 years ago
Blaž Hrastnik
bc4e54c0c4
Load config files from ~/.config/helix, fallback to defaults.
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
63e602bda6
Fix issues with "enum A {|}" <Enter> indent calculation.
4 years ago
Blaž Hrastnik
9dfd6f6bbc
clippy lint
4 years ago
Blaž Hrastnik
f00cb15137
core: Improve changeset composition behavior.
...
It would fail to combine with an empty set.
4 years ago
Blaž Hrastnik
015fd2ffa2
pairs: Use token utf8 lengths instead of 1.
4 years ago
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).
4 years ago
Blaž Hrastnik
cc058ad78f
Simplify some code.
4 years ago
Blaž Hrastnik
9eaef6e333
Fully drop State references.
4 years ago
Blaž Hrastnik
742b3a709f
Store intra-files jumps (goto) on the jumplist.
4 years ago
Blaž Hrastnik
1d96cbfbd2
Transaction: Add a changes_iter() that can convert back to a list of Changes
4 years ago
Blaž Hrastnik
a74ff6bc03
Transaction: need to consume insert | delete properly.
4 years ago
Blaž Hrastnik
b52474cf66
clippy lint
4 years ago
Blaž Hrastnik
ad3325db8e
minor: Remove a few unwraps.
4 years ago
Blaž Hrastnik
8b28bf2533
Fix broken test.
4 years ago
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.
4 years ago
Blaž Hrastnik
9a36d2c2a8
wip: Hooks & trigger characters for completion/signature_help.
4 years ago
Blaž Hrastnik
06aca7691c
clippy lint
4 years ago
Blaž Hrastnik
d0530fb839
Fix a scrolling crash where it would jump past the end of the buffer.
4 years ago
Blaž Hrastnik
73c92a0bc1
Implement m / match_brackets (using tree sitter).
4 years ago
Blaž Hrastnik
bd607b4cbd
Provide a capacity on Selection::new's normalize.
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
c4792efead
clippy lints
4 years ago
Blaž Hrastnik
798dbd27c5
Selection: fail early if new() is called with no ranges.
4 years ago
Blaž Hrastnik
71999cce43
Implement auto-pairs behavior for open and close.
4 years ago
Blaž Hrastnik
f29f01858d
Implement iter() and len() directly on Selection.
4 years ago
Blaž Hrastnik
c331721565
Finish hiding doc.state / State as an implementation detail.
4 years ago
Blaž Hrastnik
59e6024186
Remove State from a few more signatures.
4 years ago
Blaž Hrastnik
dbcc099f48
Move things out of state.rs.
4 years ago
Blaž Hrastnik
8eaf9a432d
Make Transaction::change only rely on the rope.
4 years ago
Blaž Hrastnik
4f77d80e74
Clippy lint
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
dd91090a1a
Implement keep_selections (filter selections on regex).
4 years ago
Blaž Hrastnik
87e3cd3df2
ui: Render diagnostic errors in sideline.
4 years ago