Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

PolyMeilex
Copy link

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:

cargo install --git https://github.com/PolyMeilex/StyLua.git --branch lsp
vim.lsp.config["stylua-lsp"] = {
  cmd = { "stylua", "--lsp" },
  filetypes = { "lua" },
}
vim.lsp.enable("stylua-lsp")

@JohnnyMorganz
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Make available as LSP
2 participants