aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Jump to symbol ranges in LSP goto commands (#5986)Michael Davis2023-03-08
| | | | This follows prior changes like 42ad1a9e: we select the range given by the language server rather than the starting point.
* LSP: Send replies for malformed and unhandled RPC requests (#6058)Michael Davis2023-03-08
| | | | | | | | | | | | | | | | Previously we did not respond to malformed or unhandled LSP requests. The JSONRPC spec says that all non-notification requests must have responses: > When a rpc call is made, the Server MUST reply with a Response, > except for in the case of Notifications (Note that Helix is the "Server" in this case. Also from the spec: "The Server is defined as the origin of Response objects and the handler of Request objects.") So this change sends error replies for requests which can't be parsed or handled. Request IDs are also now added to the log messages for unhandled requests.
* tui: Log keyboard enhancement query timeMichael Davis2023-03-08
| | | | | | In my testing this takes around 3-4ms in terminals that support the enhanced keyboard protocol (Kitty, WezTerm) and a few hundred microseconds in terminals that don't (st, Alacritty).
* tui: Cache the keyboard enhancement checkMichael Davis2023-03-08
| | | | | | | | | | | Wether the host terminal supports keyboard enhancement can be cached for the lifetime of a Helix session. Caching this lookup prevents a potential lockup within crossterm's event reading system where the query for the keyboard enhancement support waits on the next keyboard event, which can happen if the crossterm event stream is checked by `tokio::select!` in another thread.
* Move terminal claim/restore code to helix-tuiMichael Davis2023-03-08
| | | | | | | | | | | | | | | | | | This moves the `Application::claim_term` and `helix-term::application::restore_term` functions into the helix-tui crate. How the terminal should be claimed and restored is a TUI concern and is implemented differently through different TUI backends. This cleans out a lot of crossterm and TUI code in Application and makes it easier to modify claim/restore based on information we query from the terminal host. The child commit will take advantage of this to cache the check for whether the host terminal supports the keyboard enhancement protocol. Without this change, caching that information takes much more code which is not easily reusable for anything else. The code to restore the terminal is somewhat duplicated by this patch: we want to restore the terminal in cases of panics. Panic handler hooks must live for `'static` and the Application's terminal does not.
* Add command for resetting diff hunks (#5736)Pascal Kuthe2023-03-08
|
* Handle snippets for LSPs not providing offsets for completionAndrii Grynenko2023-03-08
|
* Add nested placeholder parsing for LSP snippetsAndrii Grynenko2023-03-08
| | | | | And fix `text` over-parsing, inspired by https://github.com/neovim/neovim/blob/d18f8d5c2d82b209093b2feaa8921a4792b71d59/runtime/lua/vim/lsp/_snippet.lua
* Render every LSP snippets for every cursorAndrii Grynenko2023-03-08
| | | | | | | This refactors the snippet logic to be largely unaware of the rest of the document. The completion application logic is moved into generate_transaction_from_snippet which is extended to support dynamically computing replacement text.
* Correctly handle multiple cursors with LSP snippetsUrgau2023-03-08
|
* Delete snippet placeholders when accepting completionPascal Kuthe2023-03-08
| | | | | | | When accepting a snippet completion we automatically delete the placeholders for now as doing so manual is quite cumbersome. In the future we should keep these as a mark + virtual text that is automatically removed once the cursor moves there.
* Implement LSP snippet tabstops sorting and mergingUrgau2023-03-08
|
* LSP: Advertise snippet supportMichael Davis2023-03-08
|
* Apply snippets as transactionsMichael Davis2023-03-08
|
* Remove now unused the pattern combinatorUrgau2023-03-08
|
* Optimize LSP snippet parsingUrgau2023-03-08
|
* Add parser for LSP snippetMichael Davis2023-03-08
|
* Add a parser-combinator crateMichael Davis2023-03-08
| | | | | | | | | | | | | | | | | | | | | | Parser-combinators are one of the simpler tools for building ad-hoc parsers. They're a good fit because they are... * Small: each parser / parser-combinator is around 10 LOC. * Functional: helix_core strives to be a functional set of utilities usable throughout the rest of the editor. * Flexible: use them to build any sort of ad-hoc parser. In the child commit, we'll parse LSP Snippet syntax using these new parser combinators. Why not use an existing parser-combinator crate? Existing popular parser-combinator crates have histories of making breaking changes (for example nom and combine). > Implementation note: I tried to not introduce a new trait since the > types can be expressed in terms of `impl Fn`s. The trait is necessary > to build `seq` implementations without a proc macro though, and also > allows us to use `&'static str`s very conveniently: see the trait > implementation for `&'static str`.
* Allow LSP server to be stopped (#5964)Davide Galassi2023-03-08
|
* Update highlights for golang (#6204)Erasin Wang2023-03-08
| | | | | | - update tree-sitter-go - refine keywords - set package as namespace - add label
* Update highlight for PHP (#6203)Erasin Wang2023-03-08
| | | | | - update tree-sitter-php - add basic types, operator - refine keyword
* Pin tree-sitter at git master (#6218)Michael Davis2023-03-07
| | | | | | | Tree-sitter has some unreleased improvements that can speed up small queries and prevent hangs due to error recovery in some parsers. This change pins tree-sitter to the latest master. Neovim also pins tree-sitter to a commit on master.
* build(deps): bump grep-regex from 0.1.10 to 0.1.11 (#6215)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | | Bumps [grep-regex](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-regex-0.1.10...0.1.11) --- updated-dependencies: - dependency-name: grep-regex 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>
* build(deps): bump tokio from 1.25.0 to 1.26.0 (#6212)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.25.0...tokio-1.26.0) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump thiserror from 1.0.38 to 1.0.39 (#6216)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.38 to 1.0.39. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.38...1.0.39) --- updated-dependencies: - dependency-name: thiserror 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>
* build(deps): bump ignore from 0.4.18 to 0.4.20 (#6214)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | | Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.18 to 0.4.20. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/ignore-0.4.18...ignore-0.4.20) --- updated-dependencies: - dependency-name: ignore 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>
* build(deps): bump serde_json from 1.0.93 to 1.0.94 (#6211)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.93 to 1.0.94. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.93...v1.0.94) --- updated-dependencies: - dependency-name: serde_json 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>
* build(deps): bump grep-searcher from 0.1.10 to 0.1.11 (#6213)dependabot[bot]2023-03-07
| | | | | | | | | | | | | | | | Bumps [grep-searcher](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/grep-searcher-0.1.10...0.1.11) --- updated-dependencies: - dependency-name: grep-searcher 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>
* feat(theme): Update pop-dark for color-modes (#6208)workingj2023-03-06
|
* Update highlight for ecma/js/ts (#6205)Erasin Wang2023-03-06
|
* Update onelight theme (#6192)Erasin Wang2023-03-06
|
* Rewrite and refactor all documentation (#5534)David Else2023-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rewrite and refactor all documentation * Rewrite and refactor the guides * update runtime directory instructions for windows * Update the Ubuntu 3rd party repo section with 22.10 * Merge from upstream * Rewrite and refactor all documentation * Apply suggestions from code review Apply the suggestions that can be committed from the GitHub web interface. Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Add Windows themes folder Co-authored-by: digidoor <37601466+digidoor@users.noreply.github.com> * Apply the rest of the suggestions from the code review * Revert "Apply the rest of the suggestions from the code review" This reverts commit 498be1b7a1aec3ff567b95130148628beeef9b77. * Revert "Merge branch 'rewrite-and-refactor-all-documentation' of github.com:David-Else/helix into rewrite-and-refactor-all-documentation" This reverts commit 7c8404248ffef73b80b9051d5a4359c5bcfa5d1a, reversing changes made to d932969cfc9fadda12a74cc01665919dee7152fb. * Apply code review suggestions * Changes after re-reading all documents * Missed a full stop * Code review suggestions and remove macOS and Windows specific sections * Add OpenBSD to heading * Add back macOS and Windows sections and further simplify and improve * Change wording to nightly * Remove README installation section and turn into a link * Simplify building from source and follow code review suggestions * Code review revisions * Fix copy paste mistake * Apply the latest code review suggestions * More small code review items * Change minor modes for code review * Fix link and typos * Add note that you need a c++ compiler to install the tree-sitter grammars * Add pacman example * Make sure all headings are lower case * Revert to the original passage adding a reference to Windows that was missing * Update book/src/guides/adding_languages.md Fix grammar typo Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Update book/src/install.md Fix tree sitter typo Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Remove TOC links to main heading --------- Co-authored-by: CptPotato <3957610+CptPotato@users.noreply.github.com> Co-authored-by: Michael Davis <mcarsondavis@gmail.com> Co-authored-by: digidoor <37601466+digidoor@users.noreply.github.com>
* docs: describe tab-width and unit subkeys (#5862)cinerea02023-03-06
|
* feat(dap): implement Restart request (#5651)Filip Dutescu2023-03-06
| | | | | | | | | | | | | | | Add a restart debug session command, which would issue a [Restart Request][1], if the debugger supports it and a session is running. It uses the same arguments and requests used to start the initial session, when recreating it. It builds upon #5532, making use of the changes to the termination workflow of a session. [1]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Restart Closes: #5594 Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
* Remove centering view from Unimpaired commands (#6193)Santiago Vrancovich2023-03-05
| | | Remove `align_view` calls from `goto_*_diag` as per issue #6177
* Update queries for godot4 (#6186)Erasin Wang2023-03-05
|
* Fix lacking space panic (#6109)nuid322023-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | * Fix lack of space for popup crash * Fix saturating -> wrapping * Fix wrapping -> saturating (I am an idiot) * Remove useless "mut" in helix-tui/src/buffer.rs Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Remove redundant bound-check * Return bound-check back * Add bound-check for set_style * Remove set_style bound-check * Revert bound-check --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* update MSRV to 1.65Pascal Kuthe2023-03-05
|
* Update helix-vcs/Cargo.tomlSebastian Thiel2023-03-05
| | | Co-authored-by: Ivan Tham <pickfire@riseup.net>
* upgrade `git-repository` to `gix` 0.36.1; up min. rustc version to 1.64Sebastian Thiel2023-03-05
| | | | | | | | This fixes breakage when installing `helix` due to an incorrect usage of `as_ref()` when interacting with `bstr` in the `gitoxide` codebase. However, this upgrade also requires a higher rustc version, as `gitoxide` recently updated its `windows` crate version.
* Add support for reStructuredText (#6180)Roberto Vidal2023-03-05
|
* Theme: Papercolor: Add ui.highlight (#6162)Henrik Tjäder2023-03-05
| | | | | | | Using the picker with syntax highlighting the fallback `ui.selection` makes a lot of text, especially for the light variant, hard to read. Instead, use a lighter background for highlights
* fix: Handle signals before crossterm events (#6170)Alexander Brevig2023-03-05
| | | | | | | | | | | This is a workaround for a freeze when suspending Helix with C-z on non-Windows systems. The check for the keyboard enhancement protocol locks up crossterm's internal event reading/polling system by trying to set up multiple concurrent readers. `input_stream.next()` sets up one reader looking for regular crossterm events while the `supports_keyboard_enhancement` query sets up another looking for internal events. The latter hangs for two seconds or until the former yields an event. By handling signals first we don't lock up the mutex by trying to read keyboard events.
* Document the file-modification-indicator statusline element (#6036)Nick2023-03-04
|
* feat(prql): add prql support (#6126)Matthias Q2023-03-03
|
* Fix scrolloff at view bottom (#6142)Pascal Kuthe2023-03-03
| | | | | | | Fixes a regression introduced in #5420 where a scrolloff of `x - 1` was used instead if `x` at the bottom of the screen. This was especially problematic if the scrolloff was set to `0` in that case the scrolloff behaved as tough set to `-1` and the cursor disappeared from the view if scrolled to the botoom.
* Extend the set of tags highlighted in comments (#6143)István Donkó2023-03-03
|
* Fix 'attempt to divide by zero' panic (#6155)nuid322023-03-03
|
* CI: Update cachix/install-nix-action to v20 (#6163)Michael Davis2023-03-02
| | | | This fixes an issue with installing Nix 1.14 which causes the cachix/cachix-action in the next step to fail.
* Add graphql schema file type (#6159)Andrey Grebenyk2023-03-02
| | | Co-authored-by: Andrey Grebenyk <GrebenyukAE@ugpa.ru>