-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(oxlint/oxfmt): adopt and fully integrate the recommended language servers #4242
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
base: master
Are you sure you want to change the base?
Conversation
e0b3937 to
a5cb7ae
Compare
Co-authored-by: Tim Shilov <[email protected]>
Co-authored-by: Tim Shilov <[email protected]>
This is an upcoming change, worked on here neovim/nvim-lspconfig#4242 Opting in early to try it out.
|
Thanks to recent updates, specifying a workspaceUri in the init_options is not mandatory anymore. Customizing the LS settings can now simply be done. vim.lsp.config("oxlint", {
init_options = {
settings = {
["fixKind"] = "all",
},
},
}) |
| 'less', | ||
| 'graphql', | ||
| 'markdown', | ||
| 'mdx', |
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.
Isn't this markdown.mdx? At least, my local Neovim v0.12.0-dev-1977+gdd6ed20272 shows it in the status bar.
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.
Mhh pretty sure it depends on configuration, with v0.11.5 vanilla I don't get any filetype on mdx files. Not sure about how to manage this case.
Hello,
The goal of this PR is to replace
oxc_language_serverwith the two “new” language servers provided byoxlintandoxfmt, as recommended in:oxc-project/oxc#15119
The motivation is to align with the upstream architecture and rely on the officially recommended entry points instead of using
oxc_language_serverdirectly.In addition to the language server changes, this PR:
vim.lsp.buf.formatin oxfmt:LspOxlintFixAllcommand to apply automatic fixes, following the official documentation:https://oxc.rs/docs/guide/usage/linter/automatic-fixes.html
-- Adds default configuration (commented) for Oxlint LS
I am currently using this configuration in my own projects, and it has been working very well so far.
This PR updates the oxlint configuration and adds oxfmt support in a single change. I grouped them together because the split of
oxc_language_servermade it feel more logical to handle both at once. However, I am happy to split this into two separate PRs if that is preferred.