A (basic) tree-sitter grammar for HL7 messages.
TODO: better installation & setup
- Clone the repository somewhere.
- Ensure the hl7 filetype is being loaded by NeoVim:
- Create / edit
~/.config/nvim/filetype.lua
and add the following:vim.filetype.add({ extension = { hl7 = 'hl7', }, })
- Create / edit
- Add the hl7 config to the
treesitter_parser_config
:treesitter_parser_config.hl7 = { install_info = { url = "<path to tree-sitter-hl7>", files = { "src/parser.c" }, generate_reqires_npm = false, requires_generate_from_grammar = false, }, filetype = "hl7", }
- Add the queries to NeoVim:
mkdir -p ~/.config/nvim/queries
ln -s <path to tree-sitter-hl7>/queries ~/.config/nvim/queries/hl7