Skip to content

Conversation

@FLchs
Copy link

@FLchs FLchs commented Dec 16, 2025

Hello,

The goal of this PR is to replace oxc_language_server with the two “new” language servers provided by oxlint and oxfmt, 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_server directly.

Change in architecture:
oxc_language_server should accept different tools
oxlint --lsp and oxfmt --lsp uses oxc_language_server with only the required tool
IDE is calling oxlint --lsp and oxfmt --lsp
oxc_language_server should be generic to support other tools too (vitest, ...)

In addition to the language server changes, this PR:

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_server made it feel more logical to handle both at once. However, I am happy to split this into two separate PRs if that is preferred.

@FLchs FLchs force-pushed the update-oxlint-config branch from e0b3937 to a5cb7ae Compare December 16, 2025 13:28
@FLchs FLchs marked this pull request as ready for review December 16, 2025 13:35
FLchs and others added 2 commits December 18, 2025 15:57
Co-authored-by: Tim Shilov <[email protected]>
Co-authored-by: Tim Shilov <[email protected]>
@FLchs FLchs marked this pull request as draft December 18, 2025 15:03
mikavilpas added a commit to mikavilpas/dotfiles that referenced this pull request Jan 1, 2026
This is an upcoming change, worked on here
neovim/nvim-lspconfig#4242

Opting in early to try it out.
@FLchs
Copy link
Author

FLchs commented Jan 5, 2026

Thanks to recent updates, specifying a workspaceUri in the init_options is not mandatory anymore.

Customizing the LS settings can now simply be done.
For example, to enable all fixes applied with LspOxlintFixAll'

vim.lsp.config("oxlint", {
	init_options = {
		settings = {
			["fixKind"] = "all",
		},
	},
})

@FLchs FLchs marked this pull request as ready for review January 5, 2026 10:15
'less',
'graphql',
'markdown',
'mdx',
Copy link
Contributor

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.

Copy link
Author

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.

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.

6 participants