Plugin that improves support for Vim's
map side (lhs and rhs) in Neovim.
Lua injection
Vim injection
- Syntax highlighting of
lhsandrhsthanks totree-sitter-vim-map-side. Compatible with ^beb2a51
Neovim >= 0.9.0nvim-treesitterluaparser: injection tolhsandrhsofvim.keymap.set()functionprintfparser (optional): forprintf()expressionvimparser (optional): forrhsthat starts with:andcommandnodes oftree-siter-vim-map-side
{
"nvim-treesitter/nvim-treesitter",
dependencies = { "Hdoc1509/vim-map-side.nvim" },
config = function()
-- NOTE: call this before calling `nvim-treesitter.configs.setup()`
require("vim-map-side.tree-sitter").setup()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"lua", -- required
"printf", -- optional
"vim", -- optional
"vim_map_side", -- required
}
})
end,
}use({
"nvim-treesitter/nvim-treesitter",
requires = { "Hdoc1509/vim-map-side.nvim" },
config = function()
-- NOTE: call this before calling `nvim-treesitter.configs.setup()`
require("vim-map-side.tree-sitter").setup()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"lua", -- required
"printf", -- optional
"vim", -- optional
"vim_map_side", -- required
}
})
end,
})Use the revision option of the vim-map-side.tree-sitter module:
require("vim-map-side.tree-sitter").setup({
revision = 'deploy-v0.1.0'
})Check the General Installation of
tree-sitter-vim-map-side for more information.
Note
Be sure to use any compatible version.
Important
Be sure to run :checkhealth vim.treesitter before checking the following
errors.
If you found the following error:
- ERROR Parser "vim_map_side" failed to load
(path: .../vim_map_side.so): ...: ABI version mismatch for
.../vim_map_side.so: supported between X and Y, found Z
Note
X and Y are the interval of ABI versions supported by neovim. Z is the
ABI version that was used to develop the parser.
-
Install the following tools:
-
Add the
from_grammaroption to thesetupfunction of thevim-map-side.tree-sittermodule:require("vim-map-side.tree-sitter").setup({ from_grammar = true })
-
Reload your neovim config.
-
Run
:TSInstall vim_map_sideto re-install the parser with the correct ABI version.
This plugin will follow changes of tree-sitter-vim-map-side:

