Compare commits

...

4 Commits

Author SHA1 Message Date
omahs bfd2c72715
fix: typos (#13505) 2025-05-10 10:36:17 -05:00
Bryce Berger 4c8600967c
verilog: add highlighting for the "var" keyword (#13493) 2025-05-10 08:08:34 -05:00
Jules Wiriath 313ef30f64
bump: tree-sitter-cpp (#13504) 2025-05-10 08:00:05 -05:00
bloxx12 9bb370c91e
chore: clean up grammars.nix (#13506) 2025-05-10 07:58:48 -05:00
6 changed files with 8 additions and 14 deletions

View File

@ -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
- 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
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.
- 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.

View File

@ -36,7 +36,7 @@
The default Helix build. Uses the latest stable Rust toolchain, and unstable
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; };

View File

@ -1,22 +1,13 @@
{
stdenv,
lib,
runCommandLocal,
runCommand,
yj,
includeGrammarIf ? _: true,
grammarOverlays ? [],
...
}: 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 =
if lib.versionAtLeast builtins.nixVersion "2.6.0"
then builtins.fromTOML (builtins.readFile ./languages.toml)
else builtins.fromJSON (builtins.readFile (builtins.toPath languages-json));
builtins.fromTOML (builtins.readFile ./languages.toml);
isGitGrammar = grammar:
builtins.hasAttr "source" grammar
&& builtins.hasAttr "git" grammar.source

View File

@ -626,7 +626,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote
[[grammar]]
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]]
name = "crystal"

View File

@ -3,7 +3,7 @@
; Constants
(this) @variable.builtin
(nullptr) @constant.builtin
(null) @constant.builtin
; Types

View File

@ -150,6 +150,9 @@
(port_identifier
(simple_identifier) @variable)
(variable_port_header ("var") @type.builtin)
(data_declaration ("var") @type.builtin)
(tf_port_item1 ("var") @type.builtin)
[
(net_type)
(integer_vector_type)