A small plugin for neovim to highlight within or around a block. Based on tree-sitter and lua.
It provides a function that creates a visual selection inside or around objects.
With the cursor on a string, the string will be highlighted.
Otherwise the next surrounding brackets will be selected.
brackets: ["(" ")" "[" "]" "{" "}"]
Packer:
use 'ccbiozhaw/block-highlight.nvim'
for your keymaps.lua
vim.keymap.set("n", "<leader>vib", "<cmd>lua require('block-highlight').select('inside')<CR>", {silent = true})
vim.keymap.set("n", "<leader>vab", "<cmd>lua require('block-highlight').select('around')<CR>", {silent = true})