dotfiles/home/.config/nvim/lua/lsp/autoformat.lua

6 lines
182 B
Lua
Raw Normal View History

2021-12-08 22:10:05 +00:00
local vim = require("vim")
local cmd = vim.cmd
-- Always automatically format on write for given filenames
cmd[[autocmd BufWritePre *.js lua vim.lsp.buf.formatting_sync(nil, 100)]]