Adding lockbindings option for disallowing lua to modify bindings at all

This commit is contained in:
Neko Box Coder
2025-09-06 20:28:16 +01:00
parent 7a250b7df4
commit 4f1d2bb543
4 changed files with 13 additions and 0 deletions

View File

@@ -231,6 +231,12 @@ Here are the available options:
default value: `false`
* `lockbindings`: prevent plugins and lua scripts from binding any keys.
Any custom actions must be binded manually either via commands like `bind`
or by modifying the `bindings.json` file.
default value: `false`
* `matchbrace`: show matching braces for '()', '{}', '[]' when the cursor
is on a brace character or (if `matchbraceleft` is enabled) next to it.

View File

@@ -178,6 +178,8 @@ The packages and their contents are listed below (in Go type signatures):
bind the key `k` to the string `v`. If `overwrite` is true, this will
overwrite any existing binding to key `k`.
Returns true if the binding was made, and a possible error.
This operation can be rejected by `lockbindings` to prevent undesired
actions by the user.
- `Reload()`: reload configuration files.