aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
Commit message (Collapse)AuthorAge
...
* Add (prev) paragraph motionIvan Tham2022-04-02
| | | | | | Also improved testing facility. Fix #1580
* Added checkmarks to health.rs output, Resolves #1894 (#1918)Simon H2022-04-02
| | | | | * Added checkmarks to health.rs output * replaced found/not found text with checkmarks
* Avoid unnecessary clone when formatting error (#1903)jeepee2022-04-01
| | | | Instead of first cloning the query and then allocating again to format the error, format the error using a reference to the query.
* Fix start-position of next search (#1904)jeepee2022-04-01
| | | | | | | | | The search implementation would start searching at the next grapheme boundary after the previous selection. In case the next occurence of the needle is immediately after the current selection, this occurence would not be found (without wraparound) because the first grapheme is skipped. The correct approach is to use the ensure_grapheme_boundary functions instead of using the functions that skip unconditionally to the next grapheme.
* Jump to the next number on the line before incrementing (#1778)antoyo2022-04-01
| | | | | | | * Jump to the next number on the line before incrementing Partially fix #1645 * Refactor to avoid duplicating find_nth_next
* lsp: Implement support for workspace_folders (currently just one)Blaž Hrastnik2022-04-01
| | | | Refs #1898
* fix: copy_selections was broken with selections (not cursors)Blaž Hrastnik2022-04-01
|
* Resolve conflicts between prompt/picker bindings (#1792)Rohan Jain2022-03-31
| | | | | | | | | | | | | | Currently, the picker's re-using a few bindings which are also present in the prompt. This causes some editing behaviours to not function on the picker. **Ctrl + k** and **Ctrl + j** This should kill till the end of the line on prompt, but is overridden by the picker for scrolling. Since there are redundancies (`Ctrl + p`, `Ctrl + n`), we can remove it from picker. **Ctrl + f** and **Ctrl + b** This are used by the prompt for back/forward movement. We could modify it to be Ctrl + d and Ctrl + u, to match the `vim` behaviour.
* Add a TODO for the futureBlaž Hrastnik2022-03-31
|
* fix: copy_selection needs to account for to() being exclusiveBlaž Hrastnik2022-03-31
| | | | | Fixes #1367 Fixes #1590
* Indentation rework (#1562)Triton1712022-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Rework indentation system * Add ComplexNode for context-aware indentation (including a proof of concept for assignment statements in rust) * Add switch statements to Go indents.toml (fixes the second half of issue #1523) Remove commented-out code * Migrate all existing indentation queries. Add more options to ComplexNode and use them to improve C/C++ indentation. * Add comments & replace Option<Vec<_>> with Vec<_> * Add more detailed documentation for tree-sitter indentation * Improve code style in indent.rs * Use tree-sitter queries for indentation instead of TOML config. Migrate existing indent queries. * Add documentation for the new indent queries. Change xtask docgen to look for indents.scm instead of indents.toml * Improve code style in indent.rs. Fix an issue with the rust indent query. * Move indentation test sources to separate files. Add `#not-kind-eq?`, `#same-line?` and `#not-same-line` custom predicates. Improve the rust and c indent queries. * Fix indent test. Improve rust indent queries. * Move indentation tests to integration test folder. * Improve code style in indent.rs. Reuse tree-sitter cursors for indentation queries. * Migrate HCL indent query * Replace custom loading in indent tests with a designated languages.toml * Update indent query file name for --health command. * Fix single-space formatting in indent queries. * Add explanation for unwrapping. Co-authored-by: Triton171 <triton0171@gmail.com>
* Handle BrokenPipe when piping hx --health through head (#1876)Nirmal Patel2022-03-30
| | | Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* Avoid using the format ident Rust feature (#1881)Marcin Puc2022-03-30
|
* Revert "Resize is not necessary inside SIGCONT, handled by render()"Blaž Hrastnik2022-03-29
| | | | | | Fixes #1877 This reverts commit 85264a861aeda7a002dda548403258620e914b57.
* Address clippy lintBlaž Hrastnik2022-03-28
|
* Make truncate_start a builder method insteadBlaž Hrastnik2022-03-28
|
* Strip some more paramsBlaž Hrastnik2022-03-28
|
* Clean up global searchBlaž Hrastnik2022-03-28
|
* Make line a private propertyBlaž Hrastnik2022-03-28
|
* Remove more push_layer callsBlaž Hrastnik2022-03-28
|
* Make regex_prompt directly call cx.push_layerBlaž Hrastnik2022-03-28
|
* This doesn't need to be mutBlaž Hrastnik2022-03-28
|
* Split off dap event handlers into helix-view to allow reuseBlaž Hrastnik2022-03-28
|
* Resize is not necessary inside SIGCONT, handled by render()Blaž Hrastnik2022-03-28
|
* Move top level lsp config to editor.lsp (#1868)Gokul Soumya2022-03-28
| | | | | | | | | | | * Move top level lsp config to editor.lsp This is mainly done to accomodate the new lsp.signature-help config option that will be introduced in https://github.com/helix-editor/helix/pull/1755 which will have to be accessed by commands. The top level config struct is split and moved to different places, making the relocation necessary * Revert rebase slipup
* Add refresh-config and open-config command (#1803)Joe2022-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add refresh-config and open-config command * clippy * Use dynamic dispatch for editor config * Refactor Result::Ok to Ok * Remove unused import * cargo fmt * Modify config error handling * cargo xtask docgen * impl display for ConfigLoadError * cargo fmt * Put keymaps behind dyn access, refactor config.load() * Update command names * Update helix-term/src/application.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * Switch to unbounded_channel * Remove --edit-config command * Update configuration docs * Revert "Put keymaps behind dyn access", too hard This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79. * Add refresh for keys * Refactor default_keymaps, fix config default, add test * swap -> store, remove unneeded clone * cargo fmt * Rename default_keymaps to default Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Handle RPC returning an invalid callBlaž Hrastnik2022-03-23
|
* No need for KeymapResult anymore since we can query .sticky()Blaž Hrastnik2022-03-20
|
* keymap: Store pending/sticky on the root levelBlaž Hrastnik2022-03-20
|
* Put esoteric line endings behind a feature flagBlaž Hrastnik2022-03-17
|
* Optimize rendering by using Ropey::byte_sliceBlaž Hrastnik2022-03-17
| | | | | | | This avoids costly conversions via byte_to_char (which are then reversed back into bytes internally in Ropey). Reduces time spent in slice/byte_to_char from ~24% to ~5%.
* Refactor :set to parse by deserializing values (#1799)Gokul Soumya2022-03-15
| | | | | * Refactor :set to parse by deserializing values * Implement serialize for idle_timeout config
* Add horizontal and vertical split scratch buffers (#1763)Joe2022-03-14
| | | | | | | Make subcommand name more descriptive Fix vsplit completer Run cargo xtask docgen
* Handle panic on move within empty picker (#1786)Rohan Jain2022-03-14
| | | | | | | | | When the picker results output is empty, movement actions result in a panic: ``` thread 'main' panicked at 'attempt to calculate the remainder with a divisor of zero', helix-term/src/ui/picker.rs:420:31 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` This could be a no-op instead when the matches length is zero.
* Perform extend line on every selection (#1804)Ivan Tham2022-03-14
| | | | Currently `x` only affect the current selection, but this will make it affect every selection so `x` can be more useful with multi-cursors.
* Match in visual use head not anchor (#1805)Ivan Tham2022-03-14
| | | | | | Currently match is finding the match based on the anchor rather than the head (cursor) so this behavior is rather unexpected when user is doing a match but a different item was matched instead when the selection is more than one character.
* minor: occurance -> occurrenceBlaž Hrastnik2022-03-14
|
* Fix: insert_register (#1751)Narazaki Shuji2022-03-13
| | | | | - set register name correctly - use autoinfo to display register contents - call `paste` with `Paste::Cursor`
* Use `^` and `$` to match the beginning and end of a line when searching (#1790)nibon72022-03-12
| | | | | Fixes #1737 Signed-off-by: nibon7 <nibon7@163.com>
* fix '--grammar' flag in help text (#1784)Michael Davis2022-03-10
|
* rename '--fetch/build-grammars' flags into '--grammar fetch/build'Michael Davis2022-03-10
| | | | | The old flags were a bit long. --grammar is also aliased to -g to make it even easier.
* migrate grammar fetching/building code into helix-loader crateMichael Davis2022-03-10
| | | | | | | | | This is a rather large refactor that moves most of the code for loading, fetching, and building grammars into a new helix-loader module. This works well with the [[grammars]] syntax for languages.toml defined earlier: we only have to depend on the types for GrammarConfiguration in helix-loader and can leave all the [[language]] entries for helix-core.
* add 'use-grammars' to languages.tomlMichael Davis2022-03-10
| | | | | | | | The vision with 'use-grammars' is to allow the long-requested feature of being able to declare your own set of grammars that you would like. A simple schema with only/except grammar names controls the list of grammars that is fetched and built. It does not (yet) control which grammars may be loaded at runtime if they already exist.
* implement build_grammars and fetch_grammarsMichael Davis2022-03-10
| | | | | | | | build_grammars adapts the functionality that previously came from helix-syntax to be used at runtime from the command line flags. fetch_grammars wraps command-line git to perform the same actions previously done in the scripts in #1560.
* add --fetch-grammars and --build-grammars CLI flagsMichael Davis2022-03-10
|
* migrate helix-syntax crate into helix-core and helix-termMichael Davis2022-03-10
| | | | | | | | | | | | helix-syntax mostly existed for the sake of the build task which checks and compiles the submodules. Since we won't be relying on that process anymore, it doesn't end up making much sense to have a very thin crate just for some functions that we could port to helix-core. The remaining build-related code is moved to helix-term which will be able to provide grammar builds through the --build-grammars CLI flag.
* Add --edit-config flag to directly open config.toml (#1771)Joe2022-03-09
| | | Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* Fix bug in LSP when creating a file in a folder that does not exist (#1775)Emil Fresk2022-03-08
|
* Add --health command for troubleshooting (#1669)Gokul Soumya2022-03-08
| | | | | | | | | | | | | | | * Move runtime file location definitions to core * Add basic --health command * Add language specific --health * Show summary for all langs with bare --health * Use TsFeature from xtask for --health * cargo fmt Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Add arrow key mappings for tree-sitter parent/child/sibling nav (#1724)Daniel S Poulin2022-03-08
| | | | | | | | | * Add arrow key mappings for tree-sitter parent/child/sibling nav This helps my use case, where I use a non-qwerty layout with a programmable mechanical keyboard, and use a layer switching key (think fn) to send left down up right from the traditional hjkl positions. * Add new bindings to docs