chore(mappings): POC for help and :help on_attach keymaps

This commit is contained in:
Alexander Courtis
2022-08-01 15:32:50 +10:00
parent 2df271038c
commit de53d6499a
3 changed files with 68 additions and 3 deletions

View File

@@ -31,3 +31,10 @@ sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_MAPPINGS.lua
}; /${end}/p; d }" doc/nvim-tree-lua.txt
sed -i -e "/^DEFAULT MAPPINGS/,/^>$/{ /^DEFAULT MAPPINGS/{p; r /tmp/DEFAULT_MAPPINGS.help
}; /^>$/p; d }" doc/nvim-tree-lua.txt
# generate various DEFAULT_KEYMAPS
begin="BEGIN_DEFAULT_KEYMAPS"
end="END_DEFAULT_KEYMAPS"
sed -n -e "/${begin}/,/${end}/{ /${begin}/d; /${end}/d; s/callback = \(.*\),/callback = '\1',/g; p; }" lua/nvim-tree/keymap.lua > /tmp/DEFAULT_KEYMAPS.M.lua
cat /tmp/DEFAULT_KEYMAPS.M.lua scripts/generate_default_keymaps.lua | lua