diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-14 19:59:18 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-14 19:59:33 +0100 |
| commit | 9b7bda28db0200b628e5f6eb7021a5a717db2e73 (patch) | |
| tree | 2f477b0fe308da3554fbd0ab807c4c4725715311 /lua | |
Initial grammar
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/tree-sitter-wmap.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/tree-sitter-wmap.lua b/lua/tree-sitter-wmap.lua new file mode 100644 index 0000000..7c4a53d --- /dev/null +++ b/lua/tree-sitter-wmap.lua @@ -0,0 +1,21 @@ +local M = {} + +function M.setup() + local config_file_path = debug.getinfo(1).source:sub(2) + local plugin_dir = vim.fn.fnamemodify(config_file_path, ':h:h') + local parser_config = require 'nvim-treesitter.parsers'.get_parser_configs() + parser_config.wmap = { + install_info = { + url = plugin_dir, + files = {'src/parser.c'}, + branch = 'main' + } + } + vim.filetype.add({ + extension = { + wmap = 'wmap', + } + }) +end + +return M |