Files
Anitrack/.nvim/queries/go/injections.scm
T
John O'Keefe c0885a4bd5 chore(nvim): track project-local Neovim config, drop .idea from ignore
Add .nvim.lua, an opt-in project-local Neovim configuration for
LazyVim users. It extends the runtime path with .nvim/ so the
treesitter injections ship with the repo, and wires conform to
format embedded GraphQL regions (via prettier's injected formatter)
alongside goimports/gofumpt on Go buffers.

Add .nvim/queries/go/injections.scm, which marks Go raw string
literals starting with query/mutation/subscription/fragment as
GraphQL injections, so treesitter highlighting and formatting apply
to the embedded AniList queries.

Remove .idea from .gitignore: the ignore list now deliberately
tracks project-local editor configs (.nvim.lua) instead of
editor-specific junk.
2026-09-24 13:50:24 -04:00

22 lines
699 B
Scheme

; extends
((raw_string_literal
(raw_string_literal_content) @injection.content)
(#lua-match? @injection.content "^%s*query%f[^%w]")
(#set! injection.language "graphql"))
((raw_string_literal
(raw_string_literal_content) @injection.content)
(#lua-match? @injection.content "^%s*mutation%f[^%w]")
(#set! injection.language "graphql"))
((raw_string_literal
(raw_string_literal_content) @injection.content)
(#lua-match? @injection.content "^%s*subscription%f[^%w]")
(#set! injection.language "graphql"))
((raw_string_literal
(raw_string_literal_content) @injection.content)
(#lua-match? @injection.content "^%s*fragment%f[^%w]")
(#set! injection.language "graphql"))