nvim-treesitter/runtime/queries/commonlisp/locals.scm

110 lines
1.9 KiB
Scheme
Raw Normal View History

2021-04-04 09:45:45 +02:00
(defun_header
2024-01-06 15:05:50 +09:00
function_name: (sym_lit) @local.definition.function
(#set! definition.function.scope "parent"))
2021-04-04 09:45:45 +02:00
(defun_header
lambda_list: (list_lit
(sym_lit) @local.definition.parameter))
2021-04-04 09:45:45 +02:00
(defun_header
keyword: (defun_keyword
"defmethod")
lambda_list: (list_lit
2024-01-06 15:05:50 +09:00
(list_lit
.
(sym_lit)
.
(sym_lit) @local.definition.type)))
2024-01-06 15:05:50 +09:00
2021-04-04 09:45:45 +02:00
(defun_header
lambda_list: (list_lit
2024-01-06 15:05:50 +09:00
(list_lit
.
(sym_lit) @local.definition.parameter
.
(_))))
2021-04-04 09:45:45 +02:00
(sym_lit) @local.reference
2021-04-04 09:45:45 +02:00
(defun) @local.scope
2021-04-04 09:45:45 +02:00
2024-01-06 15:05:50 +09:00
((list_lit
.
(sym_lit) @_defvar
.
(sym_lit) @local.definition.var)
(#match? @_defvar "^(cl:)?(defvar|defparameter)$"))
2021-04-04 09:45:45 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(sym_lit) @_deftest
.
(sym_lit) @local.definition.function
(#eq? @_deftest "deftest")) @local.scope
2021-04-04 09:45:45 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(sym_lit) @_deftest
.
(sym_lit) @local.definition.function
(#eq? @_deftest "deftest")) @local.scope
(for_clause
.
(sym_lit) @local.definition.var)
(with_clause
.
(sym_lit) @local.definition.var)
(loop_macro) @local.scope
2021-04-04 09:45:45 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(sym_lit) @_let
(#match? @_let "(cl:|cffi:)?(with-accessors|with-foreign-objects|let[*]?)")
.
(list_lit
(list_lit
.
(sym_lit) @local.definition.var))) @local.scope
2021-04-04 09:45:45 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(sym_lit) @_let
(#match? @_let "(cl:|alexandria:)?(with-gensyms|dotimes|with-foreign-object)")
.
(list_lit
.
(sym_lit) @local.definition.var)) @local.scope
2021-04-05 14:37:53 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(kwd_lit) @_import_from
(#eq? @_import_from ":import-from")
.
(_)
(kwd_lit
(kwd_symbol) @local.definition.import))
2021-04-05 14:37:53 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(kwd_lit) @_import_from
(#eq? @_import_from ":import-from")
.
(_)
(sym_lit) @local.definition.import)
2021-04-05 14:37:53 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(kwd_lit) @_use
(#eq? @_use ":use")
(kwd_lit
(kwd_symbol) @local.definition.import))
2021-04-05 14:37:53 +02:00
(list_lit
2024-01-06 15:05:50 +09:00
.
(kwd_lit) @_use
(#eq? @_use ":use")
(sym_lit) @local.definition.import)