feat(keys): you can now create buffer-local filetype keymaps by specifying ft=. Fixes #1076

This commit is contained in:
Folke Lemaitre 2023-10-05 14:00:08 +02:00
parent 19d1b3aa72
commit c42e63c198
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 52 additions and 21 deletions

View file

@ -147,6 +147,7 @@ can be a `LazyKeys` table with the following key-value pairs:
- **[1]**: (`string`) lhs **_(required)_**
- **[2]**: (`string|fun()`) rhs **_(optional)_**
- **mode**: (`string|string[]`) mode **_(optional, defaults to `"n"`)_**
- **ft**: (`string|string[]`) `filetype` for buffer-local keymaps **_(optional)_**
- any other option valid for `vim.keymap.set`
Key mappings will load the plugin the first time they get executed.