mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: add support for haskell persistent library
This commit is contained in:
parent
68c619f2e3
commit
e9984bb744
4 changed files with 57 additions and 0 deletions
|
|
@ -633,6 +633,15 @@ list.haskell = {
|
|||
},
|
||||
}
|
||||
|
||||
list.haskell_persistent = {
|
||||
install_info = {
|
||||
url = "https://github.com/MercuryTechnologies/tree-sitter-haskell-persistent",
|
||||
files = { "src/parser.c", "src/scanner.cc" },
|
||||
},
|
||||
filetype = "haskell.persistent",
|
||||
maintainers = { "@lykahb" },
|
||||
}
|
||||
|
||||
list.hcl = {
|
||||
install_info = {
|
||||
url = "https://github.com/MichaHoffmann/tree-sitter-hcl",
|
||||
|
|
|
|||
|
|
@ -76,3 +76,10 @@
|
|||
(#eq? @_name "sql")
|
||||
((quasiquote_body) @sql)
|
||||
)
|
||||
|
||||
; persistent
|
||||
(quasiquote
|
||||
(quoter) @_name
|
||||
(#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith")
|
||||
((quasiquote_body) @haskell_persistent)
|
||||
)
|
||||
|
|
|
|||
3
queries/haskell_persistent/folds.scm
Normal file
3
queries/haskell_persistent/folds.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
(entity_definition)
|
||||
] @fold
|
||||
38
queries/haskell_persistent/highlights.scm
Normal file
38
queries/haskell_persistent/highlights.scm
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
;; ----------------------------------------------------------------------------
|
||||
;; Literals and comments
|
||||
|
||||
(integer) @number
|
||||
(float) @float
|
||||
(char) @character
|
||||
(string) @string
|
||||
(attribute_name) @attribute
|
||||
(attribute_exclamation_mark) @attribute
|
||||
|
||||
(con_unit) @symbol ; unit, as in ()
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Keywords, operators, includes
|
||||
|
||||
[
|
||||
"Id"
|
||||
"Primary"
|
||||
"Foreign"
|
||||
"deriving"
|
||||
] @keyword
|
||||
|
||||
"=" @operator
|
||||
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Functions and variables
|
||||
|
||||
(variable) @variable
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Types
|
||||
|
||||
(type) @type
|
||||
|
||||
(constructor) @constructor
|
||||
Loading…
Add table
Add a link
Reference in a new issue