I am looking for the idiomatic lua method to get a plugin’s install path, for example:
~/.config/nvim/<...>/myplugin/
- lua
- myplugin
- myplugin.lua
- plugin
From myplugin.lua
what is the best way to get the path ~/.config/nvim/<...>/myplugin/
?
In vimscript I could do something like expand("<sfile>:p:h")
but <sfile>
doesn’t seem to resolve to anything from lua.