mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
feat: add CSV, PSV, & TSV
This commit is contained in:
parent
977e932726
commit
17d3398b5b
7 changed files with 54 additions and 5 deletions
|
|
@ -199,6 +199,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [cpon](https://github.com/amaanq/tree-sitter-cpon) (maintained by @amaanq)
|
- [x] [cpon](https://github.com/amaanq/tree-sitter-cpon) (maintained by @amaanq)
|
||||||
- [x] [cpp](https://github.com/tree-sitter/tree-sitter-cpp) (maintained by @theHamsta)
|
- [x] [cpp](https://github.com/tree-sitter/tree-sitter-cpp) (maintained by @theHamsta)
|
||||||
- [x] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD)
|
- [x] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD)
|
||||||
|
- [x] [csv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq)
|
||||||
- [x] [cuda](https://github.com/theHamsta/tree-sitter-cuda) (maintained by @theHamsta)
|
- [x] [cuda](https://github.com/theHamsta/tree-sitter-cuda) (maintained by @theHamsta)
|
||||||
- [x] [cue](https://github.com/eonpatapon/tree-sitter-cue) (maintained by @amaanq)
|
- [x] [cue](https://github.com/eonpatapon/tree-sitter-cue) (maintained by @amaanq)
|
||||||
- [x] [d](https://github.com/CyberShadow/tree-sitter-d) (experimental, maintained by @nawordar)
|
- [x] [d](https://github.com/CyberShadow/tree-sitter-d) (experimental, maintained by @nawordar)
|
||||||
|
|
@ -311,6 +312,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [promql](https://github.com/MichaHoffmann/tree-sitter-promql) (maintained by @MichaHoffmann)
|
- [x] [promql](https://github.com/MichaHoffmann/tree-sitter-promql) (maintained by @MichaHoffmann)
|
||||||
- [x] [proto](https://github.com/treywood/tree-sitter-proto) (maintained by @treywood)
|
- [x] [proto](https://github.com/treywood/tree-sitter-proto) (maintained by @treywood)
|
||||||
- [x] [prql](https://github.com/PRQL/tree-sitter-prql) (maintained by @matthias-Q)
|
- [x] [prql](https://github.com/PRQL/tree-sitter-prql) (maintained by @matthias-Q)
|
||||||
|
- [x] [psv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq)
|
||||||
- [x] [pug](https://github.com/zealot128/tree-sitter-pug) (experimental, maintained by @zealot128)
|
- [x] [pug](https://github.com/zealot128/tree-sitter-pug) (experimental, maintained by @zealot128)
|
||||||
- [x] [puppet](https://github.com/amaanq/tree-sitter-puppet) (maintained by @amaanq)
|
- [x] [puppet](https://github.com/amaanq/tree-sitter-puppet) (maintained by @amaanq)
|
||||||
- [x] [PyPA manifest](https://github.com/ObserverOfTime/tree-sitter-pymanifest) (maintained by @ObserverOfTime)
|
- [x] [PyPA manifest](https://github.com/ObserverOfTime/tree-sitter-pymanifest) (maintained by @ObserverOfTime)
|
||||||
|
|
@ -358,6 +360,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) (maintained by @ahelwer, @susliko)
|
- [x] [tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) (maintained by @ahelwer, @susliko)
|
||||||
- [x] [todotxt](https://github.com/arnarg/tree-sitter-todotxt.git) (experimental, maintained by @arnarg)
|
- [x] [todotxt](https://github.com/arnarg/tree-sitter-todotxt.git) (experimental, maintained by @arnarg)
|
||||||
- [x] [toml](https://github.com/ikatyang/tree-sitter-toml) (maintained by @tk-shirasaka)
|
- [x] [toml](https://github.com/ikatyang/tree-sitter-toml) (maintained by @tk-shirasaka)
|
||||||
|
- [x] [tsv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq)
|
||||||
- [x] [tsx](https://github.com/tree-sitter/tree-sitter-typescript) (maintained by @steelsojka)
|
- [x] [tsx](https://github.com/tree-sitter/tree-sitter-typescript) (maintained by @steelsojka)
|
||||||
- [x] [turtle](https://github.com/BonaBeavis/tree-sitter-turtle) (maintained by @BonaBeavis)
|
- [x] [turtle](https://github.com/BonaBeavis/tree-sitter-turtle) (maintained by @BonaBeavis)
|
||||||
- [x] [twig](https://github.com/gbprod/tree-sitter-twig) (maintained by @gbprod)
|
- [x] [twig](https://github.com/gbprod/tree-sitter-twig) (maintained by @gbprod)
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,9 @@
|
||||||
"css": {
|
"css": {
|
||||||
"revision": "5f2c94b897601b4029fedcce7db4c6d76ce8a128"
|
"revision": "5f2c94b897601b4029fedcce7db4c6d76ce8a128"
|
||||||
},
|
},
|
||||||
|
"csv": {
|
||||||
|
"revision": "1f584470170b708880b024142d901b05b2b2b602"
|
||||||
|
},
|
||||||
"cuda": {
|
"cuda": {
|
||||||
"revision": "607851cc524d9f5b5a5cd31ad4044fd431cee54e"
|
"revision": "607851cc524d9f5b5a5cd31ad4044fd431cee54e"
|
||||||
},
|
},
|
||||||
|
|
@ -413,6 +416,9 @@
|
||||||
"prql": {
|
"prql": {
|
||||||
"revision": "09e158cd3650581c0af4c49c2e5b10c4834c8646"
|
"revision": "09e158cd3650581c0af4c49c2e5b10c4834c8646"
|
||||||
},
|
},
|
||||||
|
"psv": {
|
||||||
|
"revision": "1f584470170b708880b024142d901b05b2b2b602"
|
||||||
|
},
|
||||||
"pug": {
|
"pug": {
|
||||||
"revision": "a7ff31a38908df9b9f34828d21d6ca5e12413e18"
|
"revision": "a7ff31a38908df9b9f34828d21d6ca5e12413e18"
|
||||||
},
|
},
|
||||||
|
|
@ -554,6 +560,9 @@
|
||||||
"toml": {
|
"toml": {
|
||||||
"revision": "8bd2056818b21860e3d756b5a58c4f6e05fb744e"
|
"revision": "8bd2056818b21860e3d756b5a58c4f6e05fb744e"
|
||||||
},
|
},
|
||||||
|
"tsv": {
|
||||||
|
"revision": "1f584470170b708880b024142d901b05b2b2b602"
|
||||||
|
},
|
||||||
"tsx": {
|
"tsx": {
|
||||||
"revision": "b1bf4825d9eaa0f3bdeb1e52f099533328acfbdf"
|
"revision": "b1bf4825d9eaa0f3bdeb1e52f099533328acfbdf"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,15 @@ list.css = {
|
||||||
maintainers = { "@TravonteD" },
|
maintainers = { "@TravonteD" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.csv = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/amaanq/tree-sitter-csv",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
location = "csv",
|
||||||
|
},
|
||||||
|
maintainers = { "@amaanq" },
|
||||||
|
}
|
||||||
|
|
||||||
list.cuda = {
|
list.cuda = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/theHamsta/tree-sitter-cuda",
|
url = "https://github.com/theHamsta/tree-sitter-cuda",
|
||||||
|
|
@ -1240,6 +1249,15 @@ list.prql = {
|
||||||
maintainers = { "@matthias-Q" },
|
maintainers = { "@matthias-Q" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.psv = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/amaanq/tree-sitter-csv",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
location = "psv",
|
||||||
|
},
|
||||||
|
maintainers = { "@amaanq" },
|
||||||
|
}
|
||||||
|
|
||||||
list.pug = {
|
list.pug = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/zealot128/tree-sitter-pug",
|
url = "https://github.com/zealot128/tree-sitter-pug",
|
||||||
|
|
@ -1631,6 +1649,15 @@ list.toml = {
|
||||||
maintainers = { "@tk-shirasaka" },
|
maintainers = { "@tk-shirasaka" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.tsv = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/amaanq/tree-sitter-csv",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
location = "tsv",
|
||||||
|
},
|
||||||
|
maintainers = { "@amaanq" },
|
||||||
|
}
|
||||||
|
|
||||||
list.tsx = {
|
list.tsx = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/tree-sitter/tree-sitter-typescript",
|
url = "https://github.com/tree-sitter/tree-sitter-typescript",
|
||||||
|
|
|
||||||
3
queries/csv/highlights.scm
Normal file
3
queries/csv/highlights.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
; inherits: tsv
|
||||||
|
|
||||||
|
"," @punctuation.delimiter
|
||||||
3
queries/psv/highlights.scm
Normal file
3
queries/psv/highlights.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
; inherits: tsv
|
||||||
|
|
||||||
|
"|" @punctuation.delimiter
|
||||||
|
|
@ -54,11 +54,11 @@
|
||||||
(#eq? @_type "math"))
|
(#eq? @_type "math"))
|
||||||
|
|
||||||
; TODO: re-add when a parser for csv is added.
|
; TODO: re-add when a parser for csv is added.
|
||||||
; ((directive
|
((directive
|
||||||
; name: (type) @_type
|
name: (type) @_type
|
||||||
; body: (body (content) @injection.content))
|
body: (body (content) @injection.content))
|
||||||
; (#set! injection.language "csv")
|
(#set! injection.language "csv")
|
||||||
; (#eq? @_type "csv-table"))
|
(#eq? @_type "csv-table"))
|
||||||
|
|
||||||
;; Special roles - prefix
|
;; Special roles - prefix
|
||||||
|
|
||||||
|
|
|
||||||
4
queries/tsv/highlights.scm
Normal file
4
queries/tsv/highlights.scm
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
(text) @string
|
||||||
|
(number) @number
|
||||||
|
(float) @float
|
||||||
|
(boolean) @boolean
|
||||||
Loading…
Add table
Add a link
Reference in a new issue