Skip to content

nickshatilo/tree-sitter-tlb

Repository files navigation

tree-sitter-tlb

A Tree-sitter grammar for the TL-B language.

Includes nvim bindings.

Installation

Lazy.nvim:

    {
        'nickshatilo/tree-sitter-tlb',
        lazy = false,
        opts = {},
    }

Grammar references

Func comments injections

I also like to have TL-B schemes highlighted right inside func files, so if you want you could add the following to your ~/.config/nvim/queries/func/injections.scm file:

(
  (comment) @injection.content
  (#match? @injection.content "\\{-TLB(.*)-\\}")
  (#offset! @injection.content 0 5 0 -2)
  (#set! injection.language "tlb")
)

So inside func files you could have highlighting inside the comments:

{-TLB
    addr_none$00 = MsgAddressExt;
-}

TODO: