aboutsummaryrefslogtreecommitdiff
path: root/helix-term
Commit message (Collapse)AuthorAge
...
* Add glob file type support (#8006)Galen Abell2024-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace FileType::Suffix with FileType::Glob Suffix is rather limited and cannot be used to match files which have semantic meaning based on location + file type (for example, Github Action workflow files). This patch adds support for a Glob FileType to replace Suffix, which encompasses the existing behavior & adds additional file matching functionality. Globs are standard Unix-style path globs, which are matched against the absolute path of the file. If the configured glob for a language is a relative glob (that is, it isn't an absolute path or already starts with a glob pattern), a glob pattern will be prepended to allow matching relative paths from any directory. The order of file type matching is also updated to first match on globs and then on extension. This is necessary as most cases where glob-matching is useful will have already been matched by an extension if glob matching is done last. * Convert file-types suffixes to globs * Use globs for filename matching Trying to match the file-type raw strings against both filename and extension leads to files with the same name as the extension having the incorrect syntax. * Match dockerfiles with suffixes It's common practice to add a suffix to dockerfiles based on their context, e.g. `Dockerfile.dev`, `Dockerfile.prod`, etc. * Make env filetype matching more generic Match on `.env` or any `.env.*` files. * Update docs * Use GlobSet to match all file type globs at once * Update todo.txt glob patterns * Consolidate language Configuration and Loader creation This is a refactor that improves the error handling for creating the `helix_core::syntax::Loader` from the default and user language configuration. * Fix integration tests * Add additional starlark file-type glob --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Fix scroll track (#9508)ath32024-02-09
|
* Fix pulldown_cmark breaking changes to tag typesMichael Davis2024-02-07
| | | | | | | * Tags and TagEnd are now separate enums since <https://redirect.github.com/raphlinus/pulldown-cmark/pull/517>. * The `Tag::Heading` member has been changed from a tuple variant to a struct variant.
* build(deps): bump pulldown-cmark from 0.9.6 to 0.10.0dependabot[bot]2024-02-07
| | | | | | | | | | | | | | Bumps [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) from 0.9.6 to 0.10.0. - [Release notes](https://github.com/raphlinus/pulldown-cmark/releases) - [Commits](https://github.com/raphlinus/pulldown-cmark/compare/v0.9.6...v0.10.0) --- updated-dependencies: - dependency-name: pulldown-cmark dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump libc from 0.2.152 to 0.2.153 (#9541)dependabot[bot]2024-02-07
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix division by zero when prompt completion area is too small (#9524)Diego2024-02-06
|
* Use range positions to determine insert_newline motion (#9448)Waleed Dahshan2024-01-29
| | | | | | | * use anchor and head positions to determine motion * use range cursor to decide extending or shifting * add condition to cursor moving back on normal
* make path changes LSP spec conform (#8949)Pascal Kuthe2024-01-28
| | | | | | | | | | | | | | | | | Currently, helix implements operations which change the paths of files incorrectly and inconsistently. This PR ensures that we do the following whenever a buffer is renamed (`:move` and workspace edits) * always send did_open/did_close notifications * send will_rename/did_rename requests correctly * send them to all LSP servers not just those that are active for a buffer * also send these requests for paths that are not yet open in a buffer (if triggered from workspace edit). * only send these if the server registered interests in the path * autodetect language, indent, line ending, .. This PR also centralizes the infrastructure for path setting and therefore `:w <path>` benefits from similar fixed (but without didRename)
* Add icon to Windows executable (#9104)NitinKM2024-01-28
| | | | | | | | | | | * injecting the icon through a resource file, no extra deps * formatted * scripted rc compilation * formatted and restructured * simplified conditional func call
* Respect injections in :tree-sitter-highlight-nameMichael Davis2024-01-28
|
* Fix error message shown for goto references (#9382)Nick2024-01-25
|
* Re-export `which` from `helix-stdx::env`Michael Davis2024-01-24
| | | | | | | | | | We use `which::which` in many crates, so `which` was a separate dependency across all of them. We can centralize `which` into the stdx crate so it's easy for all crates to depend on it. I also moved the rest of `helix-view/src/env.rs` into helix-stdx's `env` module since it only contained a thin wrapper around `which` and `std::env`.
* build(deps): bump smallvec from 1.12.0 to 1.13.1 (#9405)dependabot[bot]2024-01-23
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor completion and signature help using hooksPascal Kuthe2024-01-23
|
* Add hook/event systemPascal Kuthe2024-01-23
|
* Create helix-stdx crate for stdlib extensionsMichael Davis2024-01-18
| | | | | | | | | | | | | helix-stdx is meant to carry extensions to the stdlib or low-level dependencies that are useful in all other crates. This commit starts with all of the path functions from helix-core and the CWD tracking that lived in helix-loader. The CWD tracking in helix-loader was previously unable to call the canonicalization functions in helix-core. Switching to our custom canonicalization code should make no noticeable difference though since `std::env::current_dir` returns a canonicalized path with symlinks resolved (at least on unix).
* Address clippy lints (#9371)Daniel Sedlak2024-01-17
|
* feat(lsp): implement show document request (#8865)Matouš Dzivjak2024-01-17
| | | | | | | | | | | | | | | | | | | | | | * feat(lsp): implement show document request Implement [window.showDocument](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showDocument) LSP server-sent request. This PR builds on top of helix-editor#5820, moves the external-URL opening functionality into shared crate-level function that returns a callback that is now used by both the `open_file` command as well as the window.showDocument handler if the URL is marked as external. * add return * use vertical split * refactor --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Exit a language server if it sends a message with invalid json (#9332)Ben Dennis2024-01-17
| | | | | | | | | | | | | | | | | | | | | | | * Keep lsp event listener thread alive when malformed json is encountered from the lsp server * Update unexpected error flow in recv() to close outstanding requests and close the language server * Log malformed notifications as info instead of error * Make close_language_server a nested function inside recv, similar to what's done in send * Update malformed notification log text * Clean up new log text a bit * Initialize recv_buffer closer to where it's used * Use "exit" instead of "close" * Remove whitespace * Remove the need for a helper method to exit the language server * Match on Unhandled error explicitly and keep catch-all error case around
* build(deps): bump smallvec from 1.11.2 to 1.12.0 (#9341)dependabot[bot]2024-01-16
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Select subtree within injections in :tree-sitter-subtree (#9309)Michael Davis2024-01-15
| | | | | | | `:tree-sitter-subtree` could previously only print subtrees of nodes in the root injection layer. We can improve on that by finding the layer that contains the given byte range and printing the subtree within that layer. That gives more useful results when a selection is within an injection layer.
* Fallback to filename for +arg (#9333)jw0132024-01-14
|
* make sure to sync views when applying edits to unfocused views (#9173)Gabriel Dinner-David2024-01-09
|
* health - add formatter to display (#7986)Sammo982024-01-09
|
* Initialize diagnostics when opening a document (#8873)Philipp Mildenberger2024-01-09
|
* update history of a newly focused view (#9271)Pascal Kuthe2024-01-09
|
* Check for rename support before showing LSP rename prompt (#9277)Michael Davis2024-01-09
|
* build(deps): bump libc from 0.2.151 to 0.2.152 (#9282)dependabot[bot]2024-01-09
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update goto_file docs (#8563) (#9001)jw0132024-01-08
| | | | | | Make the pluralization of files and selections consistent to emphasize the 1-to-1 relation between files and selections. The prior wording with plural "files" and singular "selection" can mislead users into thinking the command can open multiple files from a single selection.
* remove build warnings (#9180)Tshepang Mbambo2024-01-04
|
* build(deps): bump tempfile from 3.8.1 to 3.9.0 (#9199)dependabot[bot]2024-01-04
| | | | | | | | | | | | | | | Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.8.1 to 3.9.0. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.8.1...v3.9.0) --- updated-dependencies: - dependency-name: tempfile 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>
* consistent diagnostic sortingPascal Kuthe2023-12-27
|
* make diagnostics stick to word boundariesPascal Kuthe2023-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diagnostics are currently extended if text is inserted at their end. This is desirable when inserting text after an identifier. For example consider: let foo = 2; --- unused variable Renaming the identifier should extend the diagnostic: let foobar = 2; ------ unused variable This is currently implemented in helix but as a consequence adding whitespaces or a type hint also extends the diagnostic: let foo = 2; -------- unused variable let foo: Bar = 2; -------- unused variable In these cases the diagnostic should remain unchanged: let foo = 2; --- unused variable let foo: Bar = 2; --- unused variable As a heuristic helix will now only extend diagnostics that end on a word char if new chars are appended to the word (so not for punctuation/ whitespace). The idea for this mapping was inspired for the word level tracking vscode uses for many positions. While VSCode doesn't currently update diagnostics after receiving publishDiagnostic it does use this system for inlay hints for example. Similarly, the new association mechanism implemented here can be used for word level tracking of inlay hints. A similar mapping function is implemented for word starts. Together these can be used to make a diagnostic stick to a word. If that word is removed that diagnostic is automatically removed too. This is the exact same behavior VSCode inlay hints eixibit.
* Add config to mark diagnostic sources as persistentPascal Kuthe2023-12-27
|
* Support drawing popup frame (#4313)ath32023-12-19
| | | Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* fix `:indent-style` crash (#9087)TornaxO72023-12-15
| | | | | | | * removing unreachable statement in `:indent-style` * update checks when setting indent line and update docs * `cargo xtask docgen`
* Make the indent heuristic configurableDaniel Ebert2023-12-15
|
* build(deps): bump once_cell from 1.18.0 to 1.19.0 (#9053)dependabot[bot]2023-12-12
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump libc from 0.2.150 to 0.2.151 (#9056)dependabot[bot]2023-12-12
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Join empty lines with only one space in `join_selections` (#8989)TornaxO72023-12-06
| | | | | | | | | | | | | | | | | | * fix: #8977 fixes the issue that lines with only spaces are getting joined as well * reverting some renamings * improve empty line check * adding integration test * reverting code block * fix conditon check for line end * applying suggested style
* build(deps): bump open from 5.0.0 to 5.0.1 (#8992)dependabot[bot]2023-12-05
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* use workspace inheritance for common version (#8925)Skyler Hawthorne2023-12-05
|
* build(deps): bump grep-searcher from 0.1.12 to 0.1.13 (#8998)dependabot[bot]2023-12-05
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump url from 2.4.1 to 2.5.0 (#8991)dependabot[bot]2023-12-05
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump grep-regex from 0.1.11 to 0.1.12 (#8930)dependabot[bot]2023-11-29
| | | | | | | | | | | | | | | | Bumps [grep-regex](https://github.com/BurntSushi/ripgrep) from 0.1.11 to 0.1.12. - [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.11...0.1.12) --- 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>
* fix(ui): use crossterm cursor when at the end of the rope (#8934)Hendrik Norkowski2023-11-28
|
* build(deps): bump grep-searcher from 0.1.11 to 0.1.12 (#8929)dependabot[bot]2023-11-28
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* use crossterm cursor in editor when out of focus (#6858)Hendrik Norkowski2023-11-27
| | | Use crossterm cursor in the editor when the terminal is out of focus to achieve consistent out-of-focus cursor behaviour
* set Cargo feature resolver to v2 (#8917)Fomalhaut Weisszwerg2023-11-27
| | | | | | | | | | | | | | | | | | | * fix: version of Cargo feature resolver. This commit solve the ambiguity to determin the version of resolver. To get more detail, see the following two documents: - https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions - https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html * unified: Rust edition in all workspaces. Now, the Rust 2021 is available in all workspaces. * fined up: Cargo.toml by using workspace inheritance. To get more detail of the `workspace.package` table, see a following document: - https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table
* update which crate to 5.0.0 (#8902)Davide Ferrero2023-11-25
| | | | | * update which crate to 5.0.0 * update which crate to 5.0.0