add: config format timeout_ms

This commit is contained in:
asep.komarudin 2024-06-07 07:15:53 +07:00
parent 520ae101c6
commit c8798367cc
2 changed files with 2 additions and 1 deletions

View file

@ -41,6 +41,7 @@ vim.g.pcode_show_mode = 3
-- 1 ( format jalan) 0 (fromat off) -- 1 ( format jalan) 0 (fromat off)
vim.g.pcode_format_on_save = 1 vim.g.pcode_format_on_save = 1
vim.g.pcode_format_timeout_ms = 5000
-- ini hanya untuk lsp yg tidak support masson -- ini hanya untuk lsp yg tidak support masson
-- untuk referesi support language kunjungi link dibawah -- untuk referesi support language kunjungi link dibawah

View file

@ -32,7 +32,7 @@ if run == 1 then
augroup _lsp augroup _lsp
autocmd! autocmd!
" autocmd BufWritePre * lua vim.lsp.buf.format{timeout_ms =200, filter=format_filter} " autocmd BufWritePre * lua vim.lsp.buf.format{timeout_ms =200, filter=format_filter}
autocmd BufWritePre * lua vim.lsp.buf.format{timeout_ms=5000 ,filter=FORMAT_FILTER} autocmd BufWritePre * lua vim.lsp.buf.format{timeout_ms=vim.g.pcode_format_timeout_ms or 5000 ,filter=FORMAT_FILTER}
augroup end augroup end
]] ]]
end end