iamcco / diagnostic-languageserver

diagnostic language server integrate with linters
MIT License
418 stars 28 forks source link

vim.lsp.buf.formatting_sync() not working #41

Closed claidler closed 3 years ago

claidler commented 3 years ago

Hi, I can run the command:

:lua vim.lsp.buf.formatting() which works, but :lua vim.lsp.buf.formatting_sync(nil, 1000) or any variation of that function is not working for me. I'm using eslint/prettier with typescript. Can you please confirm this is still working or if it's something my end?

iamcco commented 3 years ago

I'm not familiar with the build-in LSP client. you can open the output channel to see if it send format request to the LSP.

claidler commented 3 years ago

Thanks @iamcco I'll look into it

carlitux commented 3 years ago

@cjjlaidler maybe the timeout I have to increase to 5000 and works fine

claidler commented 3 years ago

Thanks @carlitux I've changed my workflow to run my formatting manually since posting this, but will give that a go. I'll close this issue now @iamcco thank you