Commit Graph

22 Commits (3256b013889eee5f9bc66f58b59386214bc49cf2)

Author SHA1 Message Date
Pascal Kuthe 70d78123b9
properly handle detachted git worktrees (#5097) 1 year ago
Blaž Hrastnik c2c1280f02
Resolve a bunch of upcoming clippy lints 2 years ago
Christian Speich 4b85aeb2b6 grammar: Don't require lower-case (#4346)
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>
2 years ago
Evan Richter 01ee42bb14
ordinals instead of indexes when listing grammar fetch errors (#3773) 2 years ago
Poliorcetics 6618cf2d68
feat: shorten output for grammar fetching and building (#3396)
New look:

```
Fetching 102 grammars
98 up to date git grammars
4 updated grammars
        bash      now on 275effdfc0edce774acf7d481f9ea195c6c403cd
        beancount now on 4cbd1f09cd07c1f1fabf867c2cf354f9da53cc4c
        c         now on f05e279aedde06a25801c3f2b2cc8ac17fac52ae
        c-sharp   now on 53a65a908167d6556e1fcdb67f1ee62aac101dda
```

```
Building 102 grammars
100 grammars already built
2 grammars built now
        ["bash", "rust"]
```
2 years ago
yvt 6d16d2cbc9 feat: support grammar cross-compilation 2 years ago
yvt f6f054ae5b fix(loader): pass `cc::Tool::args()`
Certain targets, such as `aarch64-apple-*`, require additional compiler
flags to cross-compile for the intended target.
2 years ago
bootra b7fa9ba601
Fix non-msvc grammar compile on Windows (#3190) 2 years ago
Frojdholm f7c27b604f
Ignore SendErrors when handling grammars (#2641)
When handling grammars, fetching and building is done in a thread
pool.  Results are communicated over channels and the receiving
channel is closed on first error. This causes subsequent sends to
fail causing a mess in stderr. This ignores all SendErrors causing
only the first error to be printed.
2 years ago
Michael Zeller b43074dad3
illumos linker doesn't currently have -z relro (#2602) 2 years ago
Michael Davis 93e6eac15a
mention the C++ compiler in the grammar build failure message (#2597)
Earlier in the builder we enable C++ (`.cpp(true)`) but only mention
the C compiler in the build failure message. Some grammars that have
C++ external scanners can provoke build failures in this step if a
C++ compiler isn't installed, so mentioning it in the error message
should help out debugging.
2 years ago
Blaž Hrastnik 9191af3f8d
helix-loader + helix-core now compile for WASM 2 years ago
Kirawi c2a40d9d52
Add support for local language configuration (#1249)
* add local configuration

* move config loading to Application::new

* simplify find_root_impl
2 years ago
Michael Davis b03421a8c0
remove hardcoded '/' from grammar source path (#1986) 2 years ago
Marcin Puc f2dd3d4469
Avoid using the format ident Rust feature (#1881) 2 years ago
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.
2 years ago
Michael Davis 98851d1594
remove stray 'println!' from grammar building function (#1785) 2 years ago
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.
2 years ago
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.
2 years ago
Skyler Hawthorne a229f405cc shallow clone 2 years ago
Skyler Hawthorne 31b7596f09 fix context in error 2 years ago
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.
2 years ago