Syntax highlighting and filetype injection for .bru files in Neovim using tree-sitter.
return {
"jesses-code-adventures/bruno.nvim",
opts = {},
keys = {
{ "<leader>r", function() require("bruno").query_current_file(); end, mode = "n", desc = "Test the current query with the results in a scratch buffer." },
},
lazy = false,
}To install using the original tree-sitter-bruno grammar, use the following:
return {
"jesses-code-adventures/bruno.nvim",
opts = {
_treesitter_repo = "https://github.com/Scalamando/tree-sitter-bruno",
},
lazy = false,
}- Clones a repo with a tree-sitter grammar for
.brufiles - Generates the tree-sitter parser using the tree-sitter cli
- Installs the custom parser using
nvim-treesitter - Adds highlight and injection queries to your
/after/queries/brunodirectory
This plugin only exists as .bru files are not currently supported by the official nvim-treesitter plugin.
By default, it uses a fork of Scalamando's tree-sitter-bruno for the tree-sitter grammar. My fork adds support for params:query and params:path - feel free to use the original if you don't need these, and thanks to Scalamando for the grammar.