tree-sitter-vim-map-side
Vim's map side (lhs and rhs)
grammar for tree-sitter.
Primaryly intended to be used within lua, but also supports vim mappings
with rhs that starts with : (not supported at the moment).
Supported rhs expressions
printf()variable-scope:g:,l:,v:
Parser requirements
lua: injection tolshandrhsof keymap functions of neovimprintf(optional): injection to first argument ofprintf()expression.vim(optional): injection torhswhen it starts with:and tocommandnodes of this grammar.
Usage in Editors
Neovim
- vim-map-side.nvim: plugin
that integrates this grammar to your
Neovimconfiguration.
Helix
WIP
Emacs
WIP
Injections
lua parser
For vim.keymap.set(), vim.api.nvim_set_keymap() and
vim.api.nvim_buf_set_keymap() functions of neovim:
; NOTE: for lhs and rhs
(function_call
name: (_) @_fn
arguments: [
; format-ignore
(arguments
. (_) ; -- mode --
.
(string
(string_content) @injection.content))
; format-ignore
(arguments
. (_) ; -- mode --
. (_) ; -- lhs --
(string
(string_content) @injection.content))
]
(#any-of? @_fn "vim.keymap.set" "vim.api.nvim_set_keymap")
(#match? @injection.content "<\S+>")
(#set! injection.language "vim_map_side"))
(function_call
name: (_) @_fn
arguments: [
; format-ignore
(arguments
. (_) ; -- buffer --
. (_) ; -- mode --
.
(string
(string_content) @injeciton.content))
; format-ignore
(arguments
. (_) ; -- buffer --
. (_) ; -- mode --
. (_) ; -- lhs --
.
(string
(string_content) @injeciton.content))
]
(#eq? @_fn "vim.api.nvim_buf_set_keymap")
(#match? @injeciton.content "<\S+>")
(#set! injection.language "vim_map_side"))
; NOTE: for expressions as rhs
(function_call
name: (_) @_fn
; format-ignore
arguments: (arguments
. (_) ; -- mode --
. (_) ; -- lhs --
.
(string
(string_content) @injection.content)
.
(table_constructor) @_options)
(#any-of? @_fn "vim.keymap.set" "vim.api.nvim_set_keymap")
; NOTE: to avoid double injection
(#not-match? @injection.content "<\S+>")
(#match? @_options "expr\s*=\s*true")
(#set! injection.language "vim_map_side"))
(function_call
name: (_) @_fn
; format-ignore
arguments: (arguments
. (_) ; -- buffer --
. (_) ; -- mode --
. (_) ; -- lhs --
.
(string
(string_content) @injection.content)
.
(table_constructor) @_options)
(#eq? @_fn "vim.api.nvim_buf_set_keymap")
; NOTE: to avoid double injection
(#not-match? @injection.content "<\S+>")
(#match? @_options "expr\s*=\s*true")
(#set! injection.language "vim_map_side"))
vim parser
(map_statement
rhs: (map_side) @injection.content
(#match? @injection.content "^:")
(#set! injection.include-children)
(#set! injection.language "vim_map_side"))
References
Metadata
Release files for tree-sitter-vim-map-side 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tree_sitter_vim_map_side-0.1.3.tar.gz | 17.4 kB | Details |
Built distributions (wheels)
Total release size: 163.7 kB
Release files / tree_sitter_vim_map_side-0.1.3.tar.gz
| Download URL | tree_sitter_vim_map_side-0.1.3.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eaf7bb91db78b2ff73950809c471f2bdc28762b3d6d6c1f73c0c8bfcbc58e828
|
|
BLAKE2b-256 checksum How to use checksums |
101345bda6f7fd6d4867f40f158cc7ba3b49f1b08411b452716a5913f0fea5bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-win_arm64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 14.1 kB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0dc94093ac06ffa42e9844a297ca382f245ce7e827f0b4b040c151bc6ccaeda2
|
|
BLAKE2b-256 checksum How to use checksums |
bc100e2cf7141540532c78afa16551523ecde48e9affa077faaf722954af66a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-win_amd64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 15.2 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1381a1b4b4630d5394ad83e8c2d48db83acd45e932ba7fbab2238837f2097f3c
|
|
BLAKE2b-256 checksum How to use checksums |
7b01d424895938c5c2789cd06125bacfe93a8e972d476f03b0e70f3b6852963a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 22.4 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b8445b089cbfd65289db20b8a2692b995c5b54d551911ac22f6e255c45e9940f
|
|
BLAKE2b-256 checksum How to use checksums |
d3c1e2b94900d356e751d0323f1e27e872dcac2d7250317c581cd67a0e9e4fbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 22.6 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d0ba70d10b3e65d2f52ec5766ab73530b789c1ff5455dc8250dab71d58fd6d14
|
|
BLAKE2b-256 checksum How to use checksums |
27fb76d8d3194694525c9f4da7d05c168a7dfdbb9e0dbf5677f49887075a161f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 23.4 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b07eeb17588adfb37be9ebbea736347b2ea7e3c9eebb82516b338c8ea14903e0
|
|
BLAKE2b-256 checksum How to use checksums |
c039d322f136031364aa51370f297bc703fd1d1235ce4a999a3e6bd8d5ddf4c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 22.6 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fcbc31eee809f8c23b75b79365d8f95d4b46f41fd01dda65369f7a9f84db9583
|
|
BLAKE2b-256 checksum How to use checksums |
975fdaf33b972ba5dcfb09e2d01f275b58876933f4d083be2f45075fa1517171
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 13.2 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1a320915a5f592814a68c70a8b38ae921ee931df4a7a9179a7288f0de9e405fb
|
|
BLAKE2b-256 checksum How to use checksums |
7becb54f4964da41bd677ac44e8b3212e8cb5d2ac5e467a5c8386f019dd9c5ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tree_sitter_vim_map_side-0.1.3-cp310-abi3-macosx_10_9_x86_64.whl
| Download URL | tree_sitter_vim_map_side-0.1.3-cp310-abi3-macosx_10_9_x86_64.whl |
|---|---|
| Size | 12.8 kB |
| Tags | CPython 3.10 abi3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f1d53150935d9b94b48f6c3785b216ef0d675b21dd3b864e5676769b26c38f0d
|
|
BLAKE2b-256 checksum How to use checksums |
879583926068c932d66b6e615cb4f6b0bf07875ddd12ecbc7122d27025b144a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|