-
Notifications
You must be signed in to change notification settings - Fork 93
feat: Stylua LSP server #970
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
Conversation
11e7d84 to
2af292d
Compare
|
Thanks for this, the implementation seems pretty reasonable to me! I still need to give this a bit of a think though about whether I want to "bloat" stylua with this (tbh, i don't think it is much bloat). But it does seem like a nice feature to have, and would allow pretty easy set up with any IDE |
JohnnyMorganz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this implementation, going to move ahead with this
I restructured it slightly and added support for range formatting. I've also set up some integration tests.
Ideally we use output_diff to compute smaller text edits, but I'll leave that for later
|
Lovely, I have been using this daily for the last 5 months without any issues so I'm happy to see it land 🚀 ❤️ |
- LSP:
- Use `after/lsp/` directory to configure LSP behavior
(https://neovim.io/doc/user/lsp.html#lsp-faq) instead of manually
call `vim.lsp.enable()` on each LSP configuration
- Remap `grr` to not include declaration
- Add format on save autocmd if the LSP server supports it
- Remove the usage of the deprecated `vim.lsp.protocol.Methods`
(neovim/neovim#35998) in favor of using their string literal
counterparts
- Use `stylua` via LSP mode (since v2.2.0) instead of via none-ls as
the formatter
- JohnnyMorganz/StyLua#970
- neovim/nvim-lspconfig#4073
- mason-org/mason-registry#11613
- Add `fidget.nvim` plugin to visually see LSP progress messages
- Add `buf-ls` LSP server to support Protocol Buffers development
- Add `winborder` option
closes #936
For now I did not get around to porting the VsCode extension to LSP, so the easiest way to try this out is to use nvim: