nvim: Fix prettier formatting timeout

Add a longer timeout to give prettier time to read and format
each file, especially useful for longer files.
This commit is contained in:
Marty Oehme 2023-06-20 14:08:36 +02:00
parent eb9fa8a156
commit a689d7cc3d
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -110,7 +110,7 @@ local function on_attach(client, bufnr)
if vim.g.format_on_save then if vim.g.format_on_save then
require("lsp-setup.utils").format_on_save(client) require("lsp-setup.utils").format_on_save(client)
end end
end end
lsp.setup({ lsp.setup({
@ -153,6 +153,7 @@ require("mason-null-ls").setup({
prettier = function(_, _) prettier = function(_, _)
null_ls.register(null_ls.builtins.formatting.prettier.with({ null_ls.register(null_ls.builtins.formatting.prettier.with({
extra_filetypes = { "astro" }, extra_filetypes = { "astro" },
timeout = 7000,
})) }))
end, end,
eslint = function(_, _) eslint = function(_, _)