teastylua.nvim is wrapper for StyLua.
- Neovim nightly (v0.5)
- StyLua
For init.vim
nmap <Space>f <Plug>teastyluaFormat
"optional
let g:teastylua_options = '--search-parent-directories --config-path="path/to/config"'
For init.lua
vim.api.nvim_set_keymap("n", "<Space>f", "<Plug>teastyluaFormat")
-- optional
vim.g.teastylua_options = "--search-parent-directories --config-path="path/to/config""
Formats the current buffer when executed.