aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
Commit message (Collapse)AuthorAge
...
* Compute style only once per source highlight event (#1966)Gokul Soumya2022-04-08
| | | | | During a single HighlightEvent::Source, the highlight spans do not change and we can merge them into a single style at the beginning of the event and use it instead of re-computing it for every grapheme
* Add paragraph textobject to match infobox (#1969)tomKPZ2022-04-07
|
* Add runtime language configuration (#1794) (#1866)Roland Kovacs2022-04-05
| | | | | | | | | | | | | | | | | | | | | * Add runtime language configuration (#1794) * Add set-language typable command to change the language of current buffer. * Add completer for available language options. * Update set-language to refresh language server as well * Add language id based config lookup on `syntax::Loader`. * Add `Document::set_language3` to set programming language based on language id. * Update `Editor::refresh_language_server` to try language detection only if language is not already set. * Remove language detection from Editor::refresh_language_server * Move document language detection to where the scratch buffer is saved. * Rename Document::set_language3 to Document::set_language_by_language_id. * Remove unnecessary clone in completers::language
* Add paragraph to last motion (#1956)Ivan Tham2022-04-05
| | | Fix #1954
* clear terminal after switching to alternate screenRose Hudson2022-04-04
| | | | | | when using helix over mosh, the screen doesn't get cleared and characters get left all over the place until they are overwritten. with this change, the screen gets properly cleared as soon as helix starts
* Add typed commands buffer-next and buffer-previous (#1940)Dr. David A. Kunz2022-04-03
|
* Rename _para to _paragraphIvan Tham2022-04-02
|
* Add paragraph textobjectIvan Tham2022-04-02
| | | | | Change parameter/argument key from p to a since paragraph only have p but parameter are also called arguments sometimes and a is not used.
* 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.