Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Latest commit

 

History

History
21 lines (16 loc) · 650 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 650 Bytes

tree-sitter-twig

Twig grammar for tree-sitter

Use with nvim-treesitter

To use this grammar with nvim-treesitter, add this to your nvim config after require('nvim-treesitter.configs').setup():

local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.twig = {
  install_info = {
    url = "eirabben/tree-sitter-twig",
    files = {"src/parser.c", "src/scanner.cc"},
    branch = "main",
  },
  filetype = "twig",
}

Then, to activate highlighting, copy queries/highlights.scm and queries/injections.scm into your [nvim-config]/after/queries/twig.