mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 17:30:08 -04:00
Add support for Common Lisp
This commit is contained in:
parent
89d464744b
commit
e197736061
5 changed files with 198 additions and 7 deletions
48
queries/commonlisp/locals.scm
Normal file
48
queries/commonlisp/locals.scm
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
(defun_header
|
||||
function_name: (sym_lit) @definition.function (#set! definition.function.scope "parent"))
|
||||
(defun_header
|
||||
lambda_list: (list_lit (sym_lit) @definition.parameter))
|
||||
|
||||
(defun_header
|
||||
keyword: (defun_keyword "defmethod")
|
||||
lambda_list: (list_lit (list_lit . (sym_lit) . (sym_lit) @definition.type)))
|
||||
(defun_header
|
||||
lambda_list: (list_lit (list_lit . (sym_lit) @definition.parameter . (_))))
|
||||
|
||||
(sym_lit) @reference
|
||||
|
||||
(defun) @scope
|
||||
|
||||
((list_lit . (sym_lit) @_defvar . (sym_lit) @definition.var)
|
||||
(#match? @_defvar "^(cl:)?(defvar|defparameter)$"))
|
||||
|
||||
(list_lit
|
||||
.
|
||||
(sym_lit) @_deftest
|
||||
.
|
||||
(sym_lit) @definition.function
|
||||
(#match? @_deftest "^(deftest)$")) @scope
|
||||
|
||||
(list_lit
|
||||
.
|
||||
(sym_lit) @_deftest
|
||||
.
|
||||
(sym_lit) @definition.function
|
||||
(#match? @_deftest "^(deftest)$")) @scope
|
||||
|
||||
(for_clause . (sym_lit) @definition.var)
|
||||
(with_clause . (sym_lit) @definition.var)
|
||||
(loop_macro) @scope
|
||||
|
||||
(list_lit
|
||||
.
|
||||
(sym_lit) @_let (#match? @_let "(cl:|cffi:)?(with-accessors|with-foreign-objects|let[*]?)")
|
||||
.
|
||||
(list_lit (list_lit . (sym_lit) @definition.var))) @scope
|
||||
|
||||
(list_lit
|
||||
.
|
||||
(sym_lit) @_let (#match? @_let "(cl:|alexandria)?(with-gensyms|dotimes|with-foreign-object)")
|
||||
.
|
||||
(list_lit . (sym_lit) @definition.var)) @scope
|
||||
Loading…
Add table
Add a link
Reference in a new issue