forked from Mirrors/helix
Add language support for persistent library syntax (#7261)
parent
c33795e770
commit
7c338429f8
@ -0,0 +1,3 @@
|
||||
[
|
||||
(entity_definition)
|
||||
] @fold
|
@ -0,0 +1,37 @@
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Literals and comments
|
||||
|
||||
(integer) @constant.numeric.integer
|
||||
(float) @constant.numeric.float
|
||||
(char) @constant.character
|
||||
(string) @string
|
||||
(attribute_name) @attribute
|
||||
(attribute_exclamation_mark) @attribute
|
||||
|
||||
(con_unit) @constant.builtin ; unit, as in ()
|
||||
|
||||
(comment) @comment
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Keywords, operators, includes
|
||||
|
||||
[
|
||||
"Id"
|
||||
"Primary"
|
||||
"Foreign"
|
||||
"deriving"
|
||||
] @keyword
|
||||
|
||||
"=" @operator
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Functions and variables
|
||||
|
||||
(variable) @variable
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
;; Types
|
||||
|
||||
(type) @type
|
||||
|
||||
(constructor) @constructor
|
@ -0,0 +1 @@
|
||||
(fields (variable)) @local.definition
|
@ -1,6 +1,14 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
(quasiquote
|
||||
(quoter) @_quoter
|
||||
((quasiquote_body) @injection.content
|
||||
(#match? @_quoter "(persistWith|persistLowerCase|persistUpperCase)")
|
||||
(#set! injection.language "haskell-persistent")
|
||||
)
|
||||
)
|
||||
|
||||
(quasiquote
|
||||
(quoter) @injection.language
|
||||
(quasiquote_body) @injection.content)
|
||||
|
Loading…
Reference in New Issue