Remaps has been removed to simplify key bindings. With Lua, it's now
possible to remap using basic assignments.
For e.g.
```Lua
xplr.config.modes.builtin.default.key_bindings.on_key["v"] = xplr.config.modes.builtin.default.key_bindings.on_key.space
```
Help menu will auto detect remapped keys and display after removing the
redundant mappings.
Ref: https://github.com/sayanarijit/xplr/discussions/183#discussioncomment-774159
- Broken symlink should display without error.
- Display the symlink destination.
- Fix deleting symlinks pointing to a directory.
Fixes: https://github.com/sayanarijit/xplr/issues/185
Public structs enable automatec documentation.
xplr is not (yet) a library. Even it want to become one, making fields
private is probably not the right way.
This works:
```lua
xplr.fn.custom.ping = function(app)
print("What's your name?")
local name = io.read()
os.execute('read -p "Hello ' .. name .. ', you are in ' .. app.pwd .. '"')
return {
{ LogSuccess = "pong" },
}
end
```
Then it can be called via `CallLua: custom.ping`.
The initial idea was to enable other tools to control `xplr` via the
input pipe. However, so far I didn't feel the need to use this feature.
And even if there is any need, it's much better to implement ad-hoc
services instead of wasting cpu resources.
This PR aims to fully migrate `config.yml` to `init.lua`
Also, use `builtin.foo_func` instead of `xplr.fn.builtin.foo_func`.
Similarly, use `custom.foo_func` instead of `xplr.fn.custom.foo_func`.
Closes: https://github.com/sayanarijit/xplr/issues/160
This commit begins porting of `config.yml` to `init.lua`.
As of now, it's not be possible to do the complete migration
because of how lua and yaml handles `null`/`nil` value.
So, we will need to completely deprecate `config.yml` in order to do the
complete migration.
Use `remaps: {key: null}` to un-map a key.
Also,
- `gx` will now open only the file under focus.
- `:sx` will open the selected files.
And other minor improvements.
Discussion: https://github.com/sayanarijit/xplr/discussions/146