feat: add support for haskell persistent library

This commit is contained in:
Borys Lykah 2023-06-24 13:00:47 -06:00 committed by GitHub
parent 68c619f2e3
commit e9984bb744
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 0 deletions

View file

@ -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",

View file

@ -76,3 +76,10 @@
(#eq? @_name "sql")
((quasiquote_body) @sql)
)
; persistent
(quasiquote
(quoter) @_name
(#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith")
((quasiquote_body) @haskell_persistent)
)

View file

@ -0,0 +1,3 @@
[
(entity_definition)
] @fold

View 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