You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for OXC tools - oxfmt & oxlint - #5170
I've been using this, in nvim, on a typescript project for a little over a week and both oxfmt and oxlint are working will in ALE. The PR does include first pass at tests for oxfmt, but I was a bit unsure what a good model for LSP test would be here (e.g. deno's look very slim). If there is a good reference I'm very happy to add them.
I did try to run tests locally but ran into an issue in what looks like the docker build. I'm not sure I follow this, but it doesn't appear to be a test failure, but rather on the build.
...
find: /proc/tty/driver: Permission denied
The command '/bin/sh -c install_vim -tag v8.2.5172 -build -tag v9.2.0329 -build -tag neovim:v0.10.4 -build -tag neovim:v0.12.1 -build' returned a non-zero code: 1
Again, I realize tests could be further along and I'm more than willing to get them there with a bit of guidance. Thanks!
The eight commits are a little sparse in description and also don't follow atomic logical chunks. I had AI break them down into more focused commits.
Suggested commit structure
Commit 1: Add oxfmt fixer
Squash patches 1, 2, and the oxfmt portion of 4, plus the file header from 7.
The final state of oxfmt.vim and the registry entry are spread across three commits — the filetype list grows incrementally (javascript, typescript → adds CSS/JSON/etc → adds typescriptreact). None of those intermediate states are useful to preserve. The final filetype list and the complete implementation belong in one commit.
Squash patches 3, the oxlint portion of 4, 7 (oxlint headers), and 8.
Patches 3 and 4 together complete the executable setting that was simply missing from the initial commit. Patch 8 replaces the stub GetInitializationOptions body with the real one; the stub is never a useful checkpoint. The file headers in patch 7 are boilerplate that should have been in patch 3.
Patch 5 as-is. Documentation is a clean, independent unit.
Files: all doc/ale-*.txt changes
Issues to fix before committing
Test file (patch 6) is broken and should not be committed yet. It appears to be a copy-paste from a SQL fixer test that was never properly adapted:
g:ale_sql_oxfmt_executable and g:ale_sql_oxfmt_options should be g:ale_javascript_oxfmt_executable / g:ale_javascript_oxfmt_options
The second Execute block sets the executable to /path/to/sqlfmt but asserts /path/to/oxfmt
It asserts flags -w and -write which don't appear anywhere in the implementation; the actual command uses --stdin-filepath %s
Neither test asserts the cwd key, which the fixer always returns
The Before block saves variables for the wrong namespace, so Restore won't clean up the right state
Fix the test, then it can either be a 4th commit or folded into commit 1.
Minor doc tag mismatch: Every per-language oxfmt section uses *ale-typescript-oxfmt* as the help tag regardless of the actual language (e.g., ale-css.txt says *ale-typescript-oxfmt*). The tags should match their host file: *ale-css-oxfmt*, *ale-json-oxfmt*, etc.
Hope that helps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Adds support for tools provided by https://oxc.rs/
Refs #4997
I've been using this, in nvim, on a typescript project for a little over a week and both oxfmt and oxlint are working will in ALE. The PR does include first pass at tests for oxfmt, but I was a bit unsure what a good model for LSP test would be here (e.g. deno's look very slim). If there is a good reference I'm very happy to add them.
I did try to run tests locally but ran into an issue in what looks like the docker build. I'm not sure I follow this, but it doesn't appear to be a test failure, but rather on the build.
Again, I realize tests could be further along and I'm more than willing to get them there with a bit of guidance. Thanks!