Commit graph

9 commits

Author SHA1 Message Date
Michael Davis
b03421a8c0
remove hardcoded '/' from grammar source path (#1986) 2022-04-07 00:32:00 +09:00
Marcin Puc
f2dd3d4469
Avoid using the format ident Rust feature (#1881) 2022-03-30 09:08:30 +09:00
Michael Davis
c6bd105484
fix enum definition for use-grammars selections (#1818)
See https://github.com/helix-editor/helix/discussions/1817

It looks like we need the enums to have the `only`/`except` fields in order
to deserialize correctly.
2022-03-16 18:26:22 +09:00
Michael Davis
98851d1594
remove stray 'println!' from grammar building function (#1785) 2022-03-11 12:28:34 +09:00
Michael Davis
7044d7d804 rename '--fetch/build-grammars' flags into '--grammar fetch/build'
The old flags were a bit long. --grammar is also aliased to -g to make
it even easier.
2022-03-10 17:31:57 +09:00
Michael Davis
6fcab90d16 only fetch git-sourced grammars
This is a bit of a micro-optimization: in the current setup we waste
a thread in the pool for a local grammar only to println! a message
saying we're skipping fetching because it's a local grammar.
2022-03-10 17:31:57 +09:00
Skyler Hawthorne
a229f405cc shallow clone 2022-03-10 17:31:57 +09:00
Skyler Hawthorne
31b7596f09 fix context in error 2022-03-10 17:31:57 +09:00
Michael Davis
4fc991fdec migrate grammar fetching/building code into helix-loader crate
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.
2022-03-10 17:31:57 +09:00