Skip to content

Commit

Permalink
Add watcher support for Go (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Steinke authored Nov 13, 2023
1 parent 0093289 commit d424d26
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/neotest/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,17 @@ local default_config = {
(import_from_statement (_ (identifier) @symbol))
(import_statement (_ (identifier) @symbol))
]],
go = [[
;query
;Captures imported types
(qualified_type name: (type_identifier) @symbol)
;Captures package-local and built-in types
(type_identifier)@symbol
;Captures imported function calls and variables/constants
(selector_expression field: (field_identifier) @symbol)
;Captures package-local functions calls
(call_expression function: (identifier) @symbol)
]],
lua = [[
;query
;Captures module names in require calls
Expand Down

0 comments on commit d424d26

Please sign in to comment.