aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--book/src/generated/lang-support.md1
-rw-r--r--languages.toml10
-rw-r--r--runtime/queries/sage/highlights.scm1
-rw-r--r--runtime/queries/sage/injections.scm2
-rw-r--r--runtime/queries/sage/textobjects.scm1
5 files changed, 15 insertions, 0 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 00e6a91e..c0b5b558 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -109,6 +109,7 @@
| ron | ✓ | | ✓ | |
| ruby | ✓ | ✓ | ✓ | `solargraph` |
| rust | ✓ | ✓ | ✓ | `rust-analyzer` |
+| sage | ✓ | ✓ | | |
| scala | ✓ | | ✓ | `metals` |
| scheme | ✓ | | | |
| scss | ✓ | | | `vscode-css-language-server` |
diff --git a/languages.toml b/languages.toml
index d1ab92b6..1685c2a3 100644
--- a/languages.toml
+++ b/languages.toml
@@ -2109,3 +2109,13 @@ formatter = { command = "dhall" , args = ["format"] }
[[grammar]]
name = "dhall"
source = { git = "https://github.com/jbellerb/tree-sitter-dhall", rev = "affb6ee38d629c9296749767ab832d69bb0d9ea8" }
+
+[[language]]
+name = "sage"
+scope = "source.sage"
+file-types = ["sage"]
+injection-regex = "sage"
+roots = []
+comment-token = "#"
+indent = { tab-width = 4, unit = " " }
+grammar = "python"
diff --git a/runtime/queries/sage/highlights.scm b/runtime/queries/sage/highlights.scm
new file mode 100644
index 00000000..0b920cbf
--- /dev/null
+++ b/runtime/queries/sage/highlights.scm
@@ -0,0 +1 @@
+; inherits: python
diff --git a/runtime/queries/sage/injections.scm b/runtime/queries/sage/injections.scm
new file mode 100644
index 00000000..321c90ad
--- /dev/null
+++ b/runtime/queries/sage/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))
diff --git a/runtime/queries/sage/textobjects.scm b/runtime/queries/sage/textobjects.scm
new file mode 100644
index 00000000..0b920cbf
--- /dev/null
+++ b/runtime/queries/sage/textobjects.scm
@@ -0,0 +1 @@
+; inherits: python