Closed itsuki0927 closed 2 years ago
lsp-format.nvim does not format itself. It just a wrapper for language servers.
So you need a language server that can format with prettier
or stylua
.
I use EFM for this. There are other options as well, like https://github.com/jose-elias-alvarez/null-ls.nvim
For how to configure them, please look at their documentation.
I want to ask how to use
prettier
to format code, I see that efm lsp is used in the documentation, but I don't use this, I just installed simpletsserver
,vuels
,cssls
lsp, I don't see the specific usage in the documentation , can you provide a demo?lsp info:
tsserver setup:
on_attach:
this is my code, but it's not work, am i missing something? and if I also want to format the lua file using stylua, What should we do?