mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -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
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"))
|
||||
|
||||
; TODO: re-add when a parser for csv is added.
|
||||
; ((directive
|
||||
; name: (type) @_type
|
||||
; body: (body (content) @injection.content))
|
||||
; (#set! injection.language "csv")
|
||||
; (#eq? @_type "csv-table"))
|
||||
((directive
|
||||
name: (type) @_type
|
||||
body: (body (content) @injection.content))
|
||||
(#set! injection.language "csv")
|
||||
(#eq? @_type "csv-table"))
|
||||
|
||||
;; 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