-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to trigger formatting and select the correct formatter #39
Comments
Open the log channel to see if LSP client send format request to LSP server. |
Thank you I will try. |
hey guys, any updates on that?
|
@alex-popov-tech Open the diagnostic-languageserver output channel. The way it's related to the LSP client. |
@yngwi
it works for me. To test prettier. Just edit a rule in .prettierrc and format your document. Such as I toggle |
oh, thanks @annguyenwasd ! |
I am trying to get the log but I couldn't manage to access logs for the diagnostic-language server. A little help with what is output channel and how to access it will be appreciated. Thank you! |
Maybe try Source - |
Well, I tried that earlier but it's the same path to the lsp.log file which doesn't include anything about the diagnostic-language server. I am trying to use Eslint with an explicit path to an eslintrc.json file but the language server is not working otherwise it works fine. |
Describe the bug
I can't seem to get the formatting to work for TypeScript in the most recent Neovim, the linting seems to work fine.
I'm trying the configuration listed below. When I try to call
:lua vim.lsp.buf.formatting()
just nothing happens. I have disabled the typescript language server to make sure nothing interferes and when I inspect the attached clients, diagnostics-languageserver is there as expected. Do you have an idea how to use the formatter in Neovim? And assuming the formatting works, is there a way to make sure, nvim-lsp uses diagnostics-languageserver instead of tsserver for formatting?Thank you!
Daniel
The text was updated successfully, but these errors were encountered: