[Feature] Add Vue formatter (prettier) setup (#1016)

This commit is contained in:
Pasi Bergman 2021-07-18 21:36:08 +03:00 committed by GitHub
parent b797c2398f
commit d9936b0d84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 5 deletions

View file

@ -204,6 +204,17 @@ lv_utils.define_augroups {
_user_autocommands = O.user_autocommands,
}
function lv_utils.gsub_args(args)
if args == nil or type(args) ~= "table" then
return args
end
local buffer_filepath = vim.fn.fnameescape(vim.api.nvim_buf_get_name(0))
for i = 1, #args do
args[i], _ = string.gsub(args[i], "${FILEPATH}", buffer_filepath)
end
return args
end
vim.cmd [[
function! QuickFixToggle()
if empty(filter(getwininfo(), 'v:val.quickfix'))