fix(lsp): set auto format on save autocmd to buffer
This commit is contained in:
parent
988ab6b580
commit
f87b823625
1 changed files with 2 additions and 1 deletions
|
@ -2,10 +2,11 @@ local user_config = require('cosmic.core.user')
|
|||
local M = {}
|
||||
|
||||
-- format current buffer w/user settings
|
||||
function M.format()
|
||||
function M.format(bufnr)
|
||||
vim.lsp.buf.format({
|
||||
timeout_ms = user_config.lsp.format_timeout,
|
||||
filter = user_config.lsp.can_client_format,
|
||||
bufnr = bufnr or 0,
|
||||
})
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue