aboutsummaryrefslogtreecommitdiff
path: root/helix-loader/src/lib.rs
Commit message (Collapse)AuthorAge
* 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.
* 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
* add a CLI flag for specifying config file location (#2666)Michael Davis2022-08-04
|
* Refactor 'helix-loader::merge_toml_values' to use a 'merge-depth' instead of ↵Philipp Mildenberger2022-07-26
| | | | | | 'merge_toplevel_arrays' (#3080) - This ensures that other values than just the arrays are overridden, like nested objects, where it makes sense - merge_depth is set to 3 so that top-level language features are merged (like 'scope'), but everything deeper is overridden with the user-config
* Fix initial selection of Document in new viewSkyler Hawthorne2022-06-19
| | | | | | | | | | | When a new View of a Document is created, a default cursor of 0, 0 is created, and it does not get normalized to a single width cursor until at least one movement of the cursor happens. This appears to have no practical negative effect that I could find, but it makes tests difficult to work with, since the initial selection is not what you expect it to be. This changes the initial selection of a new View to be the width of the first grapheme in the text.
* improve test harnessSkyler Hawthorne2022-06-19
| | | | | | | * Use new macro syntax for encoding sequences of keys * Make convenience helpers for common test pattern * Use indoc for inline indented raw strings * Add feature flag for integration testing to disable rendering
* Only merge top-level array when merging `languages.toml` (#2215)Michael Davis2022-04-23
| | | | | | | * Revert "Revert "override nested arrays when merging TOML (#2145)"" This reverts commit 35d2693630a4ec29a654704bc4be47badb8d6070. * flip top-level table merging flag
* Revert "override nested arrays when merging TOML (#2145)"Blaž Hrastnik2022-04-20
| | | | | | Looks like there's some follow-up issues This reverts commit c8cfd0b1a0da071618a9efc71ac5735d6147a0ca.
* override nested arrays when merging TOML (#2145)Michael Davis2022-04-20
| | | | | | | | We merge the elements of arrays for the top-level array. For `languages.toml`, this is the array of languages. For any nested arrays, we simply take the `right` array as-is instead of using the union of `left` and `right`. closes #1000
* Add support for local language configuration (#1249)Kirawi2022-04-18
| | | | | | | * add local configuration * move config loading to Application::new * simplify find_root_impl
* 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.