Skip to content

Commit 40b8453

Browse files
feat: support nix
1 parent 1643861 commit 40b8453

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/wasm_lang.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub enum WasmLang {
3131
Json,
3232
Kotlin,
3333
Lua,
34+
Nix,
3435
Php,
3536
Python,
3637
Ruby,
@@ -73,6 +74,7 @@ impl FromStr for WasmLang {
7374
"json" => Json,
7475
"lua" => Lua,
7576
"kotlin" => Kotlin,
77+
"nix" => Nix,
7678
"php" => Php,
7779
"python" => Python,
7880
"ruby" => Ruby,
@@ -166,6 +168,7 @@ impl Language for WasmLang {
166168
W::Haskell => 'µ',
167169
W::Kotlin => 'µ',
168170
W::Lua => '$',
171+
W::Nix => '_',
169172
W::Php => 'µ',
170173
W::Python => 'µ',
171174
W::Ruby => 'µ',

website/_data/parsers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const parserPaths = {
1414
java: 'tree-sitter-java.wasm',
1515
json: 'tree-sitter-json.wasm',
1616
kotlin: 'tree-sitter-kotlin.wasm',
17+
nix: 'tree-sitter-nix.wasm',
1718
php: 'tree-sitter-php_only.wasm',
1819
python: 'tree-sitter-python.wasm',
1920
ruby: 'tree-sitter-ruby.wasm',
@@ -62,4 +63,4 @@ export const versions: Record<string, string> = {
6263
scala: '0.23.3',
6364
tsx: '0.23.2',
6465
typescript: '0.23.2',
65-
}
66+
}
77.6 KB
Binary file not shown.

website/src/components/astGrep/lang.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const languageDisplayNames: Record<SupportedLang, string> = {
3030
java: 'Java',
3131
json: 'JSON',
3232
kotlin: 'Kotlin',
33+
nix: 'Nix',
3334
php: 'PHP',
3435
python: 'Python',
3536
ruby: 'Ruby',
@@ -139,4 +140,4 @@ export function useSetupParser(lang: Ref<SupportedLang>) {
139140
})
140141
provide(langLoadedKey, langLoaded)
141142
return langLoaded
142-
}
143+
}

0 commit comments

Comments
 (0)