Skip to content

Commit b287928

Browse files
Fix missing language definitions for snippets (talonhub#1729)
talonhub#1718 added more snippets. Due to an oversight we are now missing a few language definitions that the snippets are relying on which gives the user errors.
1 parent 5982a6c commit b287928

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

core/modes/code_languages.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,16 @@ def __init__(self, id: str, spoken_form: str | list[str], extensions: list[str])
2020
Language("batch", "batch", ["bat"]),
2121
Language("c", "see", ["c", "h"]),
2222
# Language("cmake", "see make", ["cmake"]),
23-
# Language("cplusplus", "see plus plus", ["cpp", "hpp"]),
2423
Language("csharp", "see sharp", ["cs"]),
2524
Language("css", "c s s", ["css"]),
2625
# Language("elisp", "elisp", ["el"]),
2726
Language("elixir", "elixir", ["ex"]),
2827
# Language("elm", "elm", ["elm"]),
2928
Language("gdb", "g d b", ["gdb"]),
3029
Language("go", ["go lang", "go language"], ["go"]),
31-
# html doesn't actually have a language mode, but we do have snippets.
32-
Language("html", "html", ["html"]),
3330
Language("java", "java", ["java"]),
3431
Language("javascript", "java script", ["js"]),
3532
Language("javascriptreact", "java script react", ["jsx"]),
36-
# Language("json", "json", ["json"]),
3733
# Language("jsonl", "json lines", ["jsonl"]),
3834
Language("kotlin", "kotlin", ["kt"]),
3935
Language("lua", "lua", ["lua"]),
@@ -60,6 +56,12 @@ def __init__(self, id: str, spoken_form: str | list[str], extensions: list[str])
6056
Language("typescriptreact", "type script react", ["tsx"]),
6157
# Language("vba", "vba", ["vba"]),
6258
Language("vimscript", "vim script", ["vim", "vimrc"]),
59+
# These languages doesn't actually have a language mode, but we do have snippets.
60+
Language("cpp", "see plus plus", ["cpp", "hpp"]),
61+
Language("html", "html", ["html"]),
62+
Language("json", "json", ["json"]),
63+
Language("shellscript", "shell script", ["sh"]),
64+
Language("xml", "xml", ["xml"]),
6365
]
6466

6567
# Files without specific extensions but are associated with languages

core/snippets/snippets/commentLine.snippet

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,3 @@ language: xml | html
1818
-
1919
<!-- $0 -->
2020
---
21-
22-
language: scm
23-
-
24-
;; $0
25-
---

0 commit comments

Comments
 (0)