aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrydesun <rydesun@gmail.com>2021-09-01 22:25:45 +0800
committerGitHub <noreply@github.com>2021-09-01 09:25:45 -0500
commitf900e5dfc889f5c48803d0723ec395ffe46e7bad (patch)
treedb9d99606fc25ae9e99406d9482d97d9e913aaad
parentUpdate lockfile.json (#1778) (diff)
downloadnvim-treesitter-f900e5dfc889f5c48803d0723ec395ffe46e7bad.tar
nvim-treesitter-f900e5dfc889f5c48803d0723ec395ffe46e7bad.tar.gz
nvim-treesitter-f900e5dfc889f5c48803d0723ec395ffe46e7bad.tar.bz2
nvim-treesitter-f900e5dfc889f5c48803d0723ec395ffe46e7bad.tar.lz
nvim-treesitter-f900e5dfc889f5c48803d0723ec395ffe46e7bad.tar.xz
nvim-treesitter-f900e5dfc889f5c48803d0723ec395ffe46e7bad.tar.zst
nvim-treesitter-f900e5dfc889f5c48803d0723ec395ffe46e7bad.zip
Add tree-sitter-dot (#1770)
* Add tree-sitter-dot * Fix DOT highlights * highlights(DOT): add HTML string * Remove DOT ftdetect Vim and Neovim runtime have added DOT filetype detection * Update DOT highlights
-rw-r--r--README.md1
-rw-r--r--lua/nvim-treesitter/parsers.lua9
-rw-r--r--queries/dot/highlights.scm45
-rw-r--r--queries/dot/injections.scm1
4 files changed, 56 insertions, 0 deletions
diff --git a/README.md b/README.md
index ca8edc4f5..78f380da6 100644
--- a/README.md
+++ b/README.md
@@ -159,6 +159,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [dart](https://github.com/UserNobody14/tree-sitter-dart) (maintained by @Akin909)
- [x] [devicetree](https://github.com/joelspadin/tree-sitter-devicetree) (maintained by @jedrzejboczar)
- [x] [dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) (maintained by @camdencheek)
+- [x] [DOT](https://github.com/rydesun/tree-sitter-dot) (maintained by @rydesun)
- [x] [elixir](https://github.com/ananthakumaran/tree-sitter-elixir) (maintained by @nifoc)
- [ ] [elm](https://github.com/elm-tooling/tree-sitter-elm)
- [x] [erlang](https://github.com/AbstractMachinesLab/tree-sitter-erlang) (maintained by @ostera)
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index 7b9d28b1f..9c59cbd9d 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -94,6 +94,15 @@ list.dockerfile = {
maintainers = { "@camdencheek" },
}
+list.dot = {
+ install_info = {
+ url = "https://github.com/rydesun/tree-sitter-dot",
+ branch = "main",
+ files = { "src/parser.c" },
+ },
+ maintainers = { "@rydesun" },
+}
+
list.rust = {
install_info = {
url = "https://github.com/tree-sitter/tree-sitter-rust",
diff --git a/queries/dot/highlights.scm b/queries/dot/highlights.scm
new file mode 100644
index 000000000..86bb9b303
--- /dev/null
+++ b/queries/dot/highlights.scm
@@ -0,0 +1,45 @@
+(identifier) @type
+(keyword) @keyword
+(string_literal) @string
+(number_literal) @number
+
+[