mirror of https://github.com/helix-editor/helix
Compare commits
4 Commits
cb1ecc9128
...
bfd2c72715
Author | SHA1 | Date |
---|---|---|
|
bfd2c72715 | |
|
4c8600967c | |
|
313ef30f64 | |
|
9bb370c91e |
|
@ -13,7 +13,7 @@ Some suggestions to get started:
|
||||||
- Instead of running a release version of Helix, while developing you may want to run in debug mode with `cargo run` which is way faster to compile
|
- Instead of running a release version of Helix, while developing you may want to run in debug mode with `cargo run` which is way faster to compile
|
||||||
- Looking for even faster compile times? Give a try to [mold](https://github.com/rui314/mold)
|
- Looking for even faster compile times? Give a try to [mold](https://github.com/rui314/mold)
|
||||||
- If your preferred language is missing, integrating a tree-sitter grammar for
|
- If your preferred language is missing, integrating a tree-sitter grammar for
|
||||||
it and defining syntax highlight queries for it is straight forward and
|
it and defining syntax highlight queries for it is straightforward and
|
||||||
doesn't require much knowledge of the internals.
|
doesn't require much knowledge of the internals.
|
||||||
- If you don't use the Nix development shell and are getting your rust-analyzer binary from rustup, you may need to run `rustup component add rust-analyzer`.
|
- If you don't use the Nix development shell and are getting your rust-analyzer binary from rustup, you may need to run `rustup component add rust-analyzer`.
|
||||||
This is because `rust-toolchain.toml` selects our MSRV for the development toolchain but doesn't download the matching rust-analyzer automatically.
|
This is because `rust-toolchain.toml` selects our MSRV for the development toolchain but doesn't download the matching rust-analyzer automatically.
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
The default Helix build. Uses the latest stable Rust toolchain, and unstable
|
The default Helix build. Uses the latest stable Rust toolchain, and unstable
|
||||||
nixpkgs.
|
nixpkgs.
|
||||||
|
|
||||||
The build inputs can be overriden with the following:
|
The build inputs can be overridden with the following:
|
||||||
|
|
||||||
packages.${system}.default.override { rustPlatform = newPlatform; };
|
packages.${system}.default.override { rustPlatform = newPlatform; };
|
||||||
|
|
||||||
|
|
11
grammars.nix
11
grammars.nix
|
@ -1,22 +1,13 @@
|
||||||
{
|
{
|
||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
runCommandLocal,
|
|
||||||
runCommand,
|
runCommand,
|
||||||
yj,
|
|
||||||
includeGrammarIf ? _: true,
|
includeGrammarIf ? _: true,
|
||||||
grammarOverlays ? [],
|
grammarOverlays ? [],
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# HACK: nix < 2.6 has a bug in the toml parser, so we convert to JSON
|
|
||||||
# before parsing
|
|
||||||
languages-json = runCommandLocal "languages-toml-to-json" {} ''
|
|
||||||
${yj}/bin/yj -t < ${./languages.toml} > $out
|
|
||||||
'';
|
|
||||||
languagesConfig =
|
languagesConfig =
|
||||||
if lib.versionAtLeast builtins.nixVersion "2.6.0"
|
builtins.fromTOML (builtins.readFile ./languages.toml);
|
||||||
then builtins.fromTOML (builtins.readFile ./languages.toml)
|
|
||||||
else builtins.fromJSON (builtins.readFile (builtins.toPath languages-json));
|
|
||||||
isGitGrammar = grammar:
|
isGitGrammar = grammar:
|
||||||
builtins.hasAttr "source" grammar
|
builtins.hasAttr "source" grammar
|
||||||
&& builtins.hasAttr "git" grammar.source
|
&& builtins.hasAttr "git" grammar.source
|
||||||
|
|
|
@ -626,7 +626,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote
|
||||||
|
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "cpp"
|
name = "cpp"
|
||||||
source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "670404d7c689be1c868a46f919ba2a3912f2b7ef" }
|
source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "56455f4245baf4ea4e0881c5169de69d7edd5ae7" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "crystal"
|
name = "crystal"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
; Constants
|
; Constants
|
||||||
|
|
||||||
(this) @variable.builtin
|
(this) @variable.builtin
|
||||||
(nullptr) @constant.builtin
|
(null) @constant.builtin
|
||||||
|
|
||||||
; Types
|
; Types
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,9 @@
|
||||||
(port_identifier
|
(port_identifier
|
||||||
(simple_identifier) @variable)
|
(simple_identifier) @variable)
|
||||||
|
|
||||||
|
(variable_port_header ("var") @type.builtin)
|
||||||
|
(data_declaration ("var") @type.builtin)
|
||||||
|
(tf_port_item1 ("var") @type.builtin)
|
||||||
[
|
[
|
||||||
(net_type)
|
(net_type)
|
||||||
(integer_vector_type)
|
(integer_vector_type)
|
||||||
|
|
Loading…
Reference in New Issue