aboutsummaryrefslogtreecommitdiff
path: root/helix-loader
Commit message (Collapse)AuthorAge
* Improve error handling for `which::which` failuresMichael Davis2024-01-24
| | | | Co-authored-by: Pascal Kuthe <pascalkuthe@pm.me>
* 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`.
* Use helix-stdx tilde expansion and normalization for HELIX_RUNTIME pathsMichael Davis2024-01-18
| | | | | | | | | | Previously this wasn't possible since helix-core depends on helix-loader, so helix-loader couldn't use helix-core's path extensions. We use the path normalization/canonicalization for the runtime directory provided by the HELIX_RUNTIME environment variable. This improves a scenario where you set a path containing a tilde. Now that path will be expanded and normalized.
* 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).
* 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>
* 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>
* use workspace inheritance for common version (#8925)Skyler Hawthorne2023-12-05
|
* 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
* build(deps): bump tempfile from 3.8.0 to 3.8.1 (#8672)dependabot[bot]2023-10-31
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add optional runtime fallback directory (#8610)Skyler Hawthorne2023-10-25
|
* Set the working directory before loading the config (#8498)Bjorn Ove Hay Andersen2023-10-09
|
* build(deps): bump tempfile from 3.7.1 to 3.8.0 (#8038)dependabot[bot]2023-08-22
| | | | | | | | | | | | | | | Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.7.1 to 3.8.0. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.7.1...v3.8.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>
* build(deps): bump tempfile from 3.7.0 to 3.7.1 (#7862)dependabot[bot]2023-08-08
| | | | | | | | | | | | | | | Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.7.0 to 3.7.1. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.7.0...v3.7.1) --- updated-dependencies: - dependency-name: tempfile 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>
* Reformat with nightly rustfmt for better let-else formatting (#7721)Philipp Mildenberger2023-07-27
|
* pin TS to unreleased git revision to fix freezes (#7737)Pascal Kuthe2023-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>
* Fix crash when cwd is deleted (#7185)Yomain2023-07-11
|
* Fix `:log-open` when `--log` is specified (#7573)Alex Vinyals2023-07-09
|
* 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>
* Check for 'git' before fetching/building grammars (#7320)Michael Davis2023-06-12
| | | | | | Previously the error message for this potential failure-case was confusing: "no such file or directory". `hx -g fetch`, `hx -g build` and the helix-term builder should bail early if the git binary is not available.
* build(deps): bump once_cell from 1.17.2 to 1.18.0 (#7248)dependabot[bot]2023-06-06
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix warnings from clippy (#7013)ZJPzjp2023-05-11
| | | | | * Fix warnings from clippy * revert MAIN_SEPARATOR_STR
* build(deps): bump etcetera from 0.7.1 to 0.8.0 (#6931)dependabot[bot]2023-05-02
| | | | | | | | | | | | | | | Bumps [etcetera](https://github.com/lunacookies/etcetera) from 0.7.1 to 0.8.0. - [Release notes](https://github.com/lunacookies/etcetera/releases) - [Commits](https://github.com/lunacookies/etcetera/compare/v0.7.1...v0.8.0) --- updated-dependencies: - dependency-name: etcetera 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 etcetera from 0.5.0 to 0.7.1 (#6873)dependabot[bot]2023-04-25
| | | | | | | | | | | | | | | Bumps [etcetera](https://github.com/lunacookies/etcetera) from 0.5.0 to 0.7.1. - [Release notes](https://github.com/lunacookies/etcetera/releases) - [Commits](https://github.com/lunacookies/etcetera/compare/v0.5.0...v0.7.1) --- updated-dependencies: - dependency-name: etcetera 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>
* fix windows builds (#6845)Pascal Kuthe2023-04-22
|
* fix windows build (#6834)Pascal Kuthe2023-04-21
|
* produce error when grammar build fails (#6795)Pascal Kuthe2023-04-20
| | | | | * produce error when grammar build fails * print which grammar build failed
* always build grammars with c++14 and c11 (#6792)Pascal Kuthe2023-04-18
|
* build(deps): bump libloading from 0.7.4 to 0.8.0 (#6801)dependabot[bot]2023-04-18
| | | | | | | | | | | | | | | Bumps [libloading](https://github.com/nagisa/rust_libloading) from 0.7.4 to 0.8.0. - [Release notes](https://github.com/nagisa/rust_libloading/releases) - [Commits](https://github.com/nagisa/rust_libloading/compare/0.7.4...0.8.0) --- updated-dependencies: - dependency-name: libloading 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 etcetera from 0.4.0 to 0.5.0 (#6798)dependabot[bot]2023-04-18
| | | | | | | | | | | | | | | Bumps [etcetera](https://github.com/lunacookies/etcetera) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/lunacookies/etcetera/releases) - [Commits](https://github.com/lunacookies/etcetera/commits) --- updated-dependencies: - dependency-name: etcetera 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>
* emit cargo metadata duiring build scripts to avoid outdated buildscript ↵Pascal Kuthe2023-04-14
| | | | | | outputs (#6743) * rebuild on revision change * rerun grammar build if grammars change
* implement proper lsp-workspace supportPascal Kuthe2023-03-29
| | | | | | fix typo Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
* add workspace config and manual LSP root managementPascal Kuthe2023-03-29
| | | | | | | | | | fixup documentation Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com> fixup typo Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
* Generalised to multiple runtime directories with priorities (#5411)paul-scott2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Generalised to multiple runtime directories with priorities This is an implementation for #3346. Previously, one of the following runtime directories were used: 1. `$HELIX_RUNTIME` 2. sibling directory to `$CARGO_MANIFEST_DIR` 3. subdirectory of user config directory 4. subdirectory of path to helix executable The first directory provided / found to exist in this order was used as a root for all runtime file searches (grammars, themes, queries). This change lowers the priority of `$HELIX_RUNTIME` so that the user config runtime has higher priority. More significantly, all of these directories are now searched for runtime files, enabling a user to override default or system-level runtime files. If the same file name appears in multiple runtime directories, the following priority is now used: 1. sibling directory to `$CARGO_MANIFEST_DIR` 2. subdirectory of user config directory 3. `$HELIX_RUNTIME` 4. subdirectory of path to helix executable One exception to this rule is that a user can have a `themes` directory directly in the user config directory that has higher piority to `themes` directories in runtime directories. That behaviour has been preserved. As part of implementing this feature `theme::Loader` was simplified and the cycle detection logic of the theme inheritance was improved to cover more cases and to be more explicit. * Removed AsRef usage to avoid binary growth * Health displaying ;-separated runtime dirs * Changed HELIX_RUNTIME build from src instructions * Updated doc for more detail on runtime directories * Improved health symlink printing and theme cycle errors The health display of runtime symlinks now prints both ends of the link. Separate errors are given when theme file is not found and when the only theme file found would form an inheritence cycle. * Satisfied clippy on passing Path * Clarified highest priority runtime directory purpose * Further clarified multiple runtime details in book Also gave markdown headings to subsections. Fixed a error with table indentation not building table that also appears present on master. --------- Co-authored-by: Paul Scott <paul.scott@anu.edu.au> Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* build(deps): bump toml from 0.6.0 to 0.7.0 (#5726)alice2023-01-30
|
* Fix clippy 1.67 warnings (#5697)Miguel Madrid-Mencía2023-01-27
|
* build(deps): bump toml from 0.5.10 to 0.6.0dependabot[bot]2023-01-24
| | | | | | | | | | | | | | | Bumps [toml](https://github.com/toml-rs/toml) from 0.5.10 to 0.6.0. - [Release notes](https://github.com/toml-rs/toml/releases) - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.10...toml-v0.6.0) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* Switch from toml::from_slice to toml::from_str (#5659)Pascal Kuthe2023-01-24
|
* build(deps): bump once_cell from 1.16.0 to 1.17.0 (#5373)dependabot[bot]2023-01-03
| | | | | | | | | | | | | | | | | | Bumps [once_cell](https://github.com/matklad/once_cell) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/matklad/once_cell/releases) - [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md) - [Commits](https://github.com/matklad/once_cell/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: once_cell dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* properly handle detachted git worktrees (#5097)Pascal Kuthe2022-12-11
|
* feat(lsp): pass client_info on initialization (#4904)Matouš Dzivjak2022-12-09
| | | | Pass client name ('helix') and client version (version / git hash) to LSP server on initialization.
* Resolve a bunch of upcoming clippy lintsBlaž Hrastnik2022-11-04
|
* build(deps): bump once_cell from 1.15.0 to 1.16.0 (#4548)dependabot[bot]2022-11-01
| | | | | | | | | | | | | | | | | | Bumps [once_cell](https://github.com/matklad/once_cell) from 1.15.0 to 1.16.0. - [Release notes](https://github.com/matklad/once_cell/releases) - [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md) - [Commits](https://github.com/matklad/once_cell/compare/v1.15.0...v1.16.0) --- updated-dependencies: - dependency-name: once_cell dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* grammar: Don't require lower-case (#4346)Christian Speich2022-10-21
| | | | | | | | | | Currently we always lower-case the grammar name when loading it. While it is somewhat of an convention to name tree-sitter grammars in lowercase there is no rule to enforce it. This patch removes the lower-casing to allow all possible grammar names. Signed-off-by: Christian Speich <cspeich@emlix.com>
* build(deps): bump once_cell from 1.14.0 to 1.15.0 (#3987)dependabot[bot]2022-09-26
| | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Split helix_core::find_root and helix_loader::find_local_config_dirs (#3929)Riccardo Binetti2022-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split helix_core::find_root and helix_loader::find_local_config_dirs The documentation of find_root described the following priority for detecting a project root: - Top-most folder containing a root marker in current git repository - Git repository root if no marker detected - Top-most folder containing a root marker if not git repository detected - Current working directory as fallback The commit contained in https://github.com/helix-editor/helix/pull/1249 extracted and changed the implementation of find_root in find_root_impl, actually reversing its result order (since that is the order that made sense for the local configuration merge, from innermost to outermost ancestors). Since the two uses of find_root_impl have different requirements (and it's not a matter of reversing the order of results since, e.g., the top repository dir should be used by find_root only if there's not marker in other dirs), this PR splits the two implementations in two different specialized functions. In doing so, find_root_impl is removed and the implementation is moved back in find_root, moving it closer to the documented behaviour thus making it easier to verify it's actually correct * helix-core: remove Option from find_root return type It always returns some result, so Option is not needed
* Canonicalize executable pathBen Noordhuis2022-09-13
| | | | | | | When looking up the runtime/ directory relative to the executable path, canonicalize the path first in case the executable is a symbolic link. Fixes #3768
* ordinals instead of indexes when listing grammar fetch errors (#3773)Evan Richter2022-09-10
|
* build(deps): bump once_cell from 1.13.1 to 1.14.0 (#3715)dependabot[bot]2022-09-05
| | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>