aboutsummaryrefslogtreecommitdiff
path: root/helix-term
Commit message (Collapse)AuthorAge
...
* Prefer RopeSlice to &Rope in helix_core::syntaxMichael Davis2023-07-27
| | | | | | | | | | | | | | | Pascal and I discussed this and we think it's generally better to take a 'RopeSlice' rather than a '&Rope'. The code block rendering function in the markdown component module is a good example for how this can be useful: we can remove an allocation of a rope and instead directly turn a '&str' into a 'RopeSlice' which is very cheap. A change to prefer 'RopeSlice' to '&Rope' whenever the rope isn't modified would be nice, but it would be a very large diff (around 500+ 500-). Starting off with just the syntax functions seems like a nice middle-ground, and we can remove a Rope allocation because of it. Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
* Tune regex highlights for usage in promptsMichael Davis2023-07-27
| | | | | | | | | | | Since regex is almost always injected into other languages, `pattern_character`s will inherit the highlight for the structure that injects them (for example `/foo/` in JavaScript or `~r/foo/` in Elixir). This removes the string highlight when used in the prompt. We also add `ERROR` node highlighting so that errors in regex syntax appear in the prompt. This resolves a TODO in the `regex_prompt` function about highlighting errors in the regex.
* Syntax-highlight regex promptsMichael Davis2023-07-27
| | | | | | | | | | | We can use tree-sitter-regex highlighting in prompts for entering regexes, like `search` or `global_search`. The `highlighted_code_block` function from the markdown component makes this a very small change. This could be improved in the future by leaving the parsed syntax tree on the prompt, allowing incremental updates. Prompt lines are usually so short though and tree-sitter-regex is rather small and uncomplicated, so that improvement probably wouldn't make a big difference.
* Save an undo checkpoint before accepting completion (#7747)Michael Davis2023-07-27
|
* build(deps): bump tempfile from 3.6.0 to 3.7.0 (#7726)dependabot[bot]2023-07-25
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add support for LSP DidChangeWatchedFiles (#7665)Ryan Fowler2023-07-21
| | | | | | | | | | | | | | | | | | | * Add initial support for LSP DidChangeWatchedFiles * Move file event Handler to helix-lsp * Simplify file event handling * Refactor file event handling * Block on future within LSP file event handler * Fully qualify uses of the file_event::Handler type * Rename ops field to options * Revert newline removal from helix-view/Cargo.toml * Ensure file event Handler is cleaned up when lsp client is shutdown
* feat: resolve code action (#7677)sigmaSd2023-07-21
|
* build(deps): bump indoc from 2.0.2 to 2.0.3 (#7663)dependabot[bot]2023-07-18
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Clear statusline while prompt is visible (#7646)Pascal Kuthe2023-07-17
|
* enhanced `surround_replace` to provide visual feedback (#7588)Alex Vinyals2023-07-13
|
* Fix piping to Helix on macOS (#5468)Jonathan2023-07-13
|
* Auto indent change if selection is linewise (#7316)Tudyx2023-07-11
|
* Fix crash when cwd is deleted (#7185)Yomain2023-07-11
|
* search buffer contents during global search (#5652)Pascal Kuthe2023-07-11
|
* build(deps): bump smallvec from 1.10.0 to 1.11.0 (#7597)dependabot[bot]2023-07-11
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* (Updated) Apply motion API refinements (#6078)Gabriel Hansson2023-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * _apply_motion generalization where possible API encourages users to not forget setting `editor.last_motion` when applying a motion. But also not setting `last_motion` without applying a motion first. * (rename) will_find_char -> find_char method name makes it sound like it would be returning a boolean. * use _apply_motion in find_char Feature that falls out from this is that repetitions of t,T,f,F are saved with the context extention/move and count. (Not defaulting to extend by 1 count). * Finalize apply_motion API last_motion is now a private field and can only be set by calling Editor.apply_motion(). Removing need (and possibility) of writing: `motion(editor); editor.last_motion = motion` Now it's just: `editor.apply_motion(motion)` * editor.last_message: rm Box wrap around Arc * Use pre-existing `Direction` rather than custom `SearchDirection`. * `LastMotion` type alias for `Option<Arc<dyn Fn(&mut Editor)>>` * Take motion rather than cloning it. Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * last_motion as Option<Motion>. * Use `Box` over `Arc` for `last_motion`. --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Initialize log and config files right after parsing arguments (#7585)Alex Vinyals2023-07-09
|
* Implement the wa! command (#7577)Ryan Fowler2023-07-09
|
* Fix `:log-open` when `--log` is specified (#7573)Alex Vinyals2023-07-09
|
* Add filename completer for shell prompt (#7569)Alberto Romero2023-07-08
|
* use redraw handle for debouncing LSP messages (#7538)Pascal Kuthe2023-07-07
|
* build(deps): bump indoc from 2.0.1 to 2.0.2 (#7529)dependabot[bot]2023-07-04
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* LSP: Use negotiated position encoding for workspace edits (#7469)Michael Davis2023-06-29
| | | | Previously this was hard-coded to UTF-8 but we might have negotiated another position encoding.
* LSP: Discard publishDiagnostic from uninitialized servers (#7467)Michael Davis2023-06-28
| | | | | | | | | | | | | | The spec explicitly disallows publishDiagnostic to be sent before the initialize response: > ... the server is not allowed to send any requests or notifications to > the client until it has responded with an InitializeResult ... (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize) But if a non-compliant server sends this we currently panic because we '.expect()' the server capabilities to be known to fetch the position encoding. Instead of panicking we can discard the notification and log the non-compliant behavior.
* build(deps): bump libc from 0.2.146 to 0.2.147 (#7463)dependabot[bot]2023-06-27
| | | | | | | | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.146 to 0.2.147. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.146...0.2.147) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* make TS matching fallback to plaintextPascal Kuthe2023-06-22
|
* Fix Component implementations for Picker (#7382)Michael Davis2023-06-19
|
* Completely remove old Picker and rename FilePicker to PickerGokul Soumya2023-06-18
|
* Make file preview callback optionalMichael Davis2023-06-18
| | | | | | | When Picker and FilePicker are merged, not all Pickers will be able to show a preview. Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* Move FilePicker struct def closer to impl blockGokul Soumya2023-06-18
|
* Render the preview in FilePickerGokul Soumya2023-06-18
|
* Move Picker::render into FilePicker::renderGokul Soumya2023-06-18
|
* Move Component methods except render() to FilePickerGokul Soumya2023-06-18
|
* Move handle_event methods from Picker to FilePickerGokul Soumya2023-06-18
|
* Move navigation methods from Picker to FilePickerGokul Soumya2023-06-18
|
* Move scoring functions from Picker to FilePickerGokul Soumya2023-06-18
|
* Copy struct fields and new() from Picker to FilePickerGokul Soumya2023-06-18
|
* Move FilePicker::render from Component impl to normal implGokul Soumya2023-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merges the code for the Picker and FilePicker into a single Picker that can show a file preview if a preview callback is provided. This change was mainly made to facilitate refactoring out a simple skeleton of a picker that does not do any filtering to be reused in a normal Picker and a DynamicPicker (see #5714; in particular [mikes-comment] and [gokuls-comment]). The crux of the issue is that a picker maintains a list of predefined options (eg. list of files in the directory) and (re-)filters them every time the picker prompt changes, while a dynamic picker (eg. interactive global search, #4687) recalculates the full list of options on every prompt change. Using a filtering picker to drive a dynamic picker hence does duplicate work of filtering thousands of matches for no reason. It could also cause problems like interfering with the regex pattern in the global search. I tried to directly extract a PickerBase to be reused in Picker and FilePicker and DynamicPicker, but the problem is that DynamicPicker is actually a DynamicFilePicker (i.e. it can preview file contents) which means we would need PickerBase, Picker, FilePicker, DynamicPicker and DynamicFilePicker and then another way of sharing the previewing code between a FilePicker and a DynamicFilePicker. By merging Picker and FilePicker into Picker, we only need PickerBase, Picker and DynamicPicker. [gokuls-comment]: https://github.com/helix-editor/helix/issues/5714#issuecomment-1410949578 [mikes-comment]: https://github.com/helix-editor/helix/issues/5714#issuecomment-1407451963
* Add yank_joined command (#7195)spectre2562023-06-16
| | | | | Resolves issue #6888 by adding a command to join all selections and yank them to the specified register. The typed command takes an argument as the separator to use when joining the selections.
* Add config for default line ending (#5621)Alex2023-06-16
|
* Preview scratch buffers in jumplist picker (#7331)A-Walrus2023-06-13
|
* Add rl and rla aliasses for reload and reload-all commands (#7158)Zisulin Morbrot2023-06-13
|
* Add reverse_selection_contents (#7329)Robert2023-06-13
|
* build(deps): bump libc from 0.2.145 to 0.2.146 (#7327)dependabot[bot]2023-06-13
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump tempfile from 3.5.0 to 3.6.0 (#7326)dependabot[bot]2023-06-13
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix underflow when repeating a completion that has a negative shift position ↵Philipp Mildenberger2023-06-12
| | | | (#7322)
* fix: add file argument in help text (#7307)0xHiro / ヒロ2023-06-10
|
* add config option for instant completion entry preview (defaulting to true).Luca Schlecker2023-06-09
| | | | Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
* Add register statusline element (#7222)spectre2562023-06-08
|
* Auto indent on `insert_at_line_start` (#5837)Alex2023-06-08
|