on master help sign in
Support sagemath language (#5649)
commit7e191f59157d024e8b8aaabc62f292183d39f6f9 authorEloi Torrents <eloitor@disroot.org> dateMon 23 Jan 2023, 19:10 (4 years ago) parent361a834
5 files changed+15
book/src/generated/lang-support.md+1 languages.toml+10 runtime/queries/sage/highlights.scm+1 runtime/queries/sage/injections.scm+2 runtime/queries/sage/textobjects.scm+1
book/src/generated/lang-support.md+1
@@ -109,6 +109,7 @@
109109| ron | ✓ | | ✓ | |
110110| ruby | ✓ | ✓ | ✓ | `solargraph` |
111111| rust | ✓ | ✓ | ✓ | `rust-analyzer` |
112+| sage | ✓ | ✓ | | |
112113| scala | ✓ | | ✓ | `metals` |
113114| scheme | ✓ | | | |
114115| scss | ✓ | | | `vscode-css-language-server` |
languages.toml+10
@@ -2109,3 +2109,13 @@ formatter = { command = "dhall" , args = ["format"] }
21092109[[grammar]]
21102110name = "dhall"
21112111source = { git = "https://github.com/jbellerb/tree-sitter-dhall", rev = "affb6ee38d629c9296749767ab832d69bb0d9ea8" }
2112+
2113+[[language]]
2114+name = "sage"
2115+scope = "source.sage"
2116+file-types = ["sage"]
2117+injection-regex = "sage"
2118+roots = []
2119+comment-token = "#"
2120+indent = { tab-width = 4, unit = " " }
2121+grammar = "python"
runtime/queries/sage/highlights.scmnew file+1
@@ -0,0 +1 @@
1+; inherits: python
runtime/queries/sage/injections.scmnew file+2
@@ -0,0 +1,2 @@
1+((comment) @injection.content
2+ (#set! injection.language "comment"))
runtime/queries/sage/textobjects.scmnew file+1
@@ -0,0 +1 @@
1+; inherits: python