Ivan Tham
f7c8500797
Fix append newline indent
...
Fix #492
3 years ago
Blaž Hrastnik
63e54e30a7
Implement in-memory prompt history
...
Implementation is similar to kakoune: we store the entries into
a register.
3 years ago
Blaž Hrastnik
29cefa1be8
rust: Indent multi line call expressions one level deeper
3 years ago
Blaž Hrastnik
f24007b30f
Improve rust indentation queries
...
if/if let are already handled by block, and keeping these scopes would
indent else blocks one level too far.
3 years ago
Omnikar
112ae5cffe
Determine whether to use a margin of 0 or 1 when uncommenting ( #476 )
...
* Implement `margin` calculation for uncommenting
* Move `margin` calculation to `find_line_comment`
* Fix comment bug with multiple selections on a line
* Fix `find_line_comment` test for new return type
* Generate a single vec of lines for comment toggle
`toggle_line_comments` collects the lines covered by all selections into
a `Vec`, skipping duplicates. `find_line_comment` now returns the lines
to operate on, instead of returning the lines to skip.
* Fix test for `find_line_comment`
* Reserve length of `to_change` instead of `lines`
The length of `lines` includes blank lines which will be skipped, and as
such do not need space for a change reserved for them. `to_change`
includes only the lines which will be changed.
* Use `token.chars().count()` for token char length
* Create `changes` with capacity instead of reserving
* Remove unnecessary clones in `test_find_line_comment`
* Add test case for 0 margin comments
* Add comments explaining `find_line_comment`
3 years ago
Gokul Soumya
e07e42dcfb
fix(term): undo-ing code actions
3 years ago
gbaranski
8da58fe44a
fix(term): use existing implementation of edits_to_transaction
3 years ago
Yusuf Bera Ertan
41f62c3157
build(nix): fix build issues
3 years ago
Gokul Soumya
6a8a01df6b
Add missing keybinds to docs
3 years ago
Grzegorz Baranski
48e344a2a8
feat: code actions - document edits ( #478 )
...
* wip: Code actions
* fix(term): use current macro instead Context::context
* feat(lsp): set code_action capabilities
* feat(term): set SPC-a to code_action
* feat(term): wip on applying code actions
* deps: `cargo update`
* feat(term): applying code actions edits
* fix(term): cleanup of apply_edit
* fix(term): applying edits as a whole thing instead one by one
* refactor(term): move apply_edits below
* fix(term): improve unimplemented messages for further investigation
* fix(term): change code action command comment
Co-authored-by: Ivan Tham <pickfire@riseup.net>
* fix(term): add matching `}`
* fix(term): cleanup, todo!() on workspace edit
* fix(term): remove unrelated workspace_symbol_picker
* fix(term): apply cargo-clippy suggestions
* fix(term): replace todo!'s with editor.set_error
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Ivan Tham
bda4f5c1cd
Simplify replace dashes with underscore
3 years ago
Blaž Hrastnik
1789dfabfe
fix: ui/menu: Don't allow scrolling past the end of completion
...
Fixes #472
3 years ago
Blaž Hrastnik
e5d438705b
Add rustfmt.toml to force formatting to use rustfmt defaults
...
Closes #480
3 years ago
Blaž Hrastnik
817a7e0bd6
fix: Only try expanding directory completion if it makes sense
...
Fixes #487
3 years ago
Blaž Hrastnik
58d08d36ae
Simplify ui/menu.rs
3 years ago
Shafkath Shuhan
25103833b2
mark reloaded buffers as unchanged
3 years ago
fossdd
d4bd5b3766
The item `fmt` was imported redundantly
...
Fixed warning:
```
warning: the item `fmt` is imported redundantly
--> helix-core/src/syntax.rs:98:9
|
16 | fmt,
| --- the item `fmt` is already imported here
...
98 | use std::fmt;
| ^^^^^^^^
|
```
3 years ago
Ivan Tham
eba0bbda2e
Resume last picker
...
Inspired by space ' in doom emacs.
3 years ago
Kirawi
df0ed80931
Update dark_plus.toml
...
Corrects primary selection color and makes matching cursor easier to spot.
3 years ago
Ivan Tham
17f9dfce7e
Fix typo
3 years ago
Luctius
585d6f8242
Fixes toggle_comment not finding the correct language comment token
3 years ago
dependabot[bot]
d754c72b4d
Bump tokio from 1.8.1 to 1.8.2
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.8.1...tokio-1.8.2 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Blaž Hrastnik
5292fe0f7d
Calculate completion popup sizing
...
Fixes #220
3 years ago
Blaž Hrastnik
bf43fabf65
Remove ExactSizeIterator requirement on Transaction::change
...
Size hint is enough.
3 years ago
Cor Peters
cd65a48635
Made toggle_comments language dependent ( #463 )
...
* Made toggle_comments language dependent
* Fixed Test Cases
* Added clippy suggestion
* Small Fixes
* Clippy Suggestion
Co-authored-by: Cor <prive@corpeters.nl>
3 years ago
Cor Peters
0aa43902ca
Added option to provide a custom config file to the lsp. ( #460 )
...
* Added option to provide a custom config file to the lsp.
* Simplified lsp loading routine with anyhow
* Moved config to language.toml
* Fixed test case
* Cargo fmt
* Revert now-useless changes
* Renamed custom_config to config
Co-authored-by: Cor <prive@corpeters.nl>
3 years ago
kabirz
6cba62b499
action: copy grammar libraries to runtime
3 years ago
Cor
9fcbbfa467
Changed startup behaviour to only open a single view when multiple files are specified on the commandline.
...
Changed the behaviour; the first argument on the commandline is the file on display
3 years ago
Blaž Hrastnik
000b7b7c97
Make instructions regarding runtime clearer
3 years ago
Cor Peters
722cfedb38
Added change_case command ( #441 )
...
* Added change_case command
* Added switch_to_uppercase and switch_to_lowercase
Renamed change_case to switch_case.
* Updated the Keymap section of the Book
* Use flat_map instead of map + flatten
* Fix switch_to_uppercase using to_lowercase
* Switched 'Alt-`' to uppercase and '`' to lowercase
Co-authored-by: Cor <prive@corpeters.nl>
3 years ago
Cor
e2bcef718a
Removed double entry of extend_line
3 years ago
Kirawi
0b1ed8656d
Fix #442 ( #446 )
...
* fix #442
fix #442
fmt
* create Rope from default line ending
* Fix use of encoding in Document::open()
3 years ago
Kirawi
d84b3a198a
Update dark_plus.toml
...
Didn't realize what `ui.statusline.active` was for. It's needed for view splits.
3 years ago
Blaž Hrastnik
a4b077e9b9
Build ts/tsx again, refactor collect_tree_sitter_dirs
3 years ago
Blaž Hrastnik
3ca05fce31
Fix number highlighting
3 years ago
Blaž Hrastnik
e6bf6a8f28
Build each grammar in it's own src dir
...
Windows places temporary files in the current dir, so compiling in
parallel caused conflicts.
3 years ago
Blaž Hrastnik
a7fa5621ce
Try to rearrange the file order?
3 years ago
Blaž Hrastnik
c8dc9b64dd
windows: Try building inside OUT_DIR?
3 years ago
Blaž Hrastnik
dd2903ff10
Dynamically load grammar libraries at runtime
3 years ago
dependabot[bot]
dd5e8082e4
Bump anyhow from 1.0.41 to 1.0.42
...
Bumps [anyhow](https://github.com/dtolnay/anyhow ) from 1.0.41 to 1.0.42.
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.41...1.0.42 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
7e5c20cc58
Bump cc from 1.0.68 to 1.0.69
...
Bumps [cc](https://github.com/alexcrichton/cc-rs ) from 1.0.68 to 1.0.69.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases )
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.68...1.0.69 )
---
updated-dependencies:
- dependency-name: cc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
c74198a3bf
Bump tokio-stream from 0.1.6 to 0.1.7
...
Bumps [tokio-stream](https://github.com/tokio-rs/tokio ) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.6...tokio-stream-0.1.7 )
---
updated-dependencies:
- dependency-name: tokio-stream
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
929f553f89
Bump tokio from 1.8.0 to 1.8.1
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.8.0...tokio-1.8.1 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Blaž Hrastnik
4a5cb0e04b
Restore C-w shortcut
3 years ago
Blaž Hrastnik
d530d6e39d
Further simplify error handling in :commands
3 years ago
Lionel Flandrin
9c02a1b070
Make command implementation return a Result<()>
...
The error message is displayed with cx.editor.set_error.
3 years ago
Ivan Tham
3e4cd8f8e6
Add infobox for view
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
Kirawi
084a8a9522
Rewritten Rust `highlights.scm` ( #425 )
...
* rewrote Rust highlights.scm
* wip
* wip
* wip
* wip
* fixed type highlighting
* wip
* rewrite again
* moved operators
* missing newline
* missing newline
* update book
* fix constructor highlighting
* fix constructor highlighting
* fix const highlighting
* better constructor highlighting
* remove dup, bug was my locals.scm file
* fixed docs
* merge
* fixed for highlighting
* add yield
* remove yield
* added yield back
* fixed yield highlighting
* unecessary
3 years ago
Kirawi
c7aa7bf4ba
VSCode Dark+ Theme ( #414 )
...
* wip
* Add VSCode Dark+ Theme
wip
wip
wip
wip
wip
wip
properly detect constants
add bool
wip
* suggestion
* add variant for c/c++
* fix hexcode error
* removed regex highlight
* fixed constant higlighting
* wip
* add space
* add suggestions
* update theme
* update book
* suggestions
* fix c/c++ enum
* update book
3 years ago