summaryrefslogtreecommitdiff
path: root/languages.toml
diff options
context:
space:
mode:
Diffstat (limited to 'languages.toml')
-rw-r--r--languages.toml25
1 files changed, 25 insertions, 0 deletions
diff --git a/languages.toml b/languages.toml
index d81d0373..2c6f0c9a 100644
--- a/languages.toml
+++ b/languages.toml
@@ -1038,3 +1038,28 @@ roots = []
comment-token = "//"
indent = { tab-width = 4, unit = " " }
grammar = "rust"
+
+[[language]]
+name = "r"
+scope = "source.r"
+injection-regex = "(r|R)"
+file-types = ["r", "R"]
+shebangs = ["r", "R"]
+roots = []
+comment-token = "#"
+indent = { tab-width = 2, unit = " " }
+language-server = { command = "R", args = ["--slave", "-e", "languageserver::run()"] }
+
+[[grammar]]
+name = "r"
+source = { git = "https://github.com/r-lib/tree-sitter-r", rev = "cc04302e1bff76fa02e129f332f44636813b0c3c" }
+
+[[language]]
+name = "rmarkdown"
+scope = "source.rmd"
+injection-regex = "(r|R)md"
+file-types = ["rmd", "Rmd"]
+roots = []
+indent = { tab-width = 2, unit = " " }
+grammar = "markdown"
+language-server = { command = "R", args = ["--slave", "-e", "languageserver::run()"] }