Skip to content

nvim oxlint#23

Merged
Vilos92 merged 3 commits into
mainfrom
nvim-oxlint
Jun 22, 2026
Merged

nvim oxlint#23
Vilos92 merged 3 commits into
mainfrom
nvim-oxlint

Conversation

@Vilos92

@Vilos92 Vilos92 commented Jun 22, 2026

Copy link
Copy Markdown
Owner
  • claude plugin
  • oxlint support for nvim

Summary by CodeRabbit

  • New Features
    • Added Oxlint integration with linting/fix workflow and a shortcut to apply fixes.
    • Improved project-aware JavaScript/TypeScript formatting for Vite Plus projects.
  • Bug Fixes
    • Prevented ESLint diagnostics setup errors in repositories without ESLint configuration.
  • Chores
    • Updated formatting/tooling installation scripts and pinned development tooling versions.
    • Enabled an additional plugin in Claude settings and refreshed the Neovim LSP configuration revision.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new greg/vite_plus.lua detection module, then reworks conform.lua to route JS/TS formatting through vp fmt for vite-plus projects and prefer a local project prettier otherwise. none-ls.lua now conditionally enables eslint_d diagnostics only when an ESLint config file is present. A new oxc.lua plugin enables oxlint and oxfmt. Supporting changes pin eslint_d to v15, bump nvim-lspconfig, update global JS tooling installation across multiple platforms, and enable a Claude Lua LSP plugin.

Changes

Neovim JS/TS Tooling Overhaul

Layer / File(s) Summary
vite-plus project detection module
nvim/.config/nvim/lua/greg/vite_plus.lua
New module exports M.is_project(bufnr) which locates the project root via vim.fs.root, parses package.json for dependency/override signals, and falls back to scanning vite.config.ts and vite.config.mts for the vite-plus pattern.
Conform formatter routing for vite-plus and local prettier
nvim/.config/nvim/after/plugin/conform.lua
Defines a vp_fmt custom formatter (shells out to vp fmt). Helper functions select between vp_fmt for vite-plus buffers, local node_modules prettier, or prettierd/prettier fallback. format_on_save returns nil for vite-plus JS/TS buffers; format_after_save schedules vp formatting for them asynchronously.
Conditional eslint_d based on config presence
nvim/.config/nvim/after/plugin/none-ls.lua
Defines eslint_config_files list and only inserts eslint_d diagnostics when a known ESLint config file is found at the project root, avoiding setup-time decode errors in projects without ESLint.
Oxc plugin integration for oxlint and oxfmt
nvim/.config/nvim/after/plugin/oxc.lua
New plugin configures oxlint with on-type LSP execution and safe fixes, enables oxfmt, and adds <leader>xl keymap to trigger LspOxlintFixAll.
Global JS tooling pins and infrastructure updates
scripts/brews.sh, scripts/pacs.sh, nvim/.config/nvim/lua/greg/pack.lua, nvim/.config/nvim/nvim-pack-lock.json, claude/.claude/settings.json
Installation scripts switch prettierd to npm @fsouza/prettierd and pin eslint_d to v15 across Homebrew and Pacman. fnm is configured to use LTS Node versions. nvim-lspconfig bumped in pack spec and lockfile. Claude settings enable lua-lsp@claude-plugins-official.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 Hopping through configs, the rabbit takes note,
Vite-plus detected, a fresh vp to quote!
ESLint now guards only where configs reside,
Oxlint swoops in as the linter with pride.
With prettier local and eslint_d pinned,
The dotfiles are tidy — a rabbit has grinned! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'nvim oxlint' is partially related to the changeset. While oxlint support is a significant part of the PR, the changes also include Claude plugin configuration, Vite-plus support, formatter updates, and JavaScript package installations—making the title incomplete and not fully representative of the main changes. Consider a more comprehensive title like 'Add oxlint support and Claude plugin configuration' to better reflect all primary changes in the PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nvim-oxlint

Comment @coderabbitai help to get the list of available commands and usage tips.

@Vilos92 Vilos92 marked this pull request as ready for review June 22, 2026 01:47
@Vilos92

Vilos92 commented Jun 22, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@nvim/.config/nvim/after/plugin/none-ls.lua`:
- Around line 7-16: The eslint_config_files table is missing common ESLint
configuration filename variants, which prevents eslint_d from loading in
projects using those config formats. Add the missing common ESLint configuration
filename variants to the eslint_config_files table, including YAML format
variants such as .eslintrc.yaml and .eslintrc.yml to ensure the conditional
registration check at line 31 can properly detect all standard ESLint
configuration file formats.

In `@nvim/.config/nvim/lua/greg/vite_plus.lua`:
- Around line 33-40: The vite_config file detection logic only checks for
`vite.config.ts` but misses projects using `vite.config.mts`. Update the code
block starting with the vite_config variable assignment to also check for
`vite.config.mts` in addition to `vite.config.ts`. Add logic to scan both file
extensions for the "vite-plus" content, ensuring that projects using either
configuration file format are correctly identified as Vite+ projects.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2bdf5ecd-edea-4e82-bb3b-dfe05c662c8f

📥 Commits

Reviewing files that changed from the base of the PR and between 0692894 and def75b0.

📒 Files selected for processing (8)
  • claude/.claude/settings.json
  • nvim/.config/nvim/after/plugin/conform.lua
  • nvim/.config/nvim/after/plugin/none-ls.lua
  • nvim/.config/nvim/after/plugin/oxc.lua
  • nvim/.config/nvim/lua/greg/pack.lua
  • nvim/.config/nvim/lua/greg/vite_plus.lua
  • nvim/.config/nvim/nvim-pack-lock.json
  • scripts/brews.sh

Comment thread nvim/.config/nvim/after/plugin/none-ls.lua
Comment thread nvim/.config/nvim/lua/greg/vite_plus.lua Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/brews.sh`:
- Line 193: The `fnm default lts-latest` command in the JavaScript packages
installation block within the `prompt_and_install_shell` function call is
invalid because `fnm default` requires an explicit version number, not
`lts-latest`. After running `fnm install --lts`, extract the installed version
using `fnm list` and pass the result explicitly to `fnm default`. You can use
command substitution to get the installed version (for example, by filtering the
list output and selecting the first matching version) and pass it to `fnm
default` instead of the literal `lts-latest` string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b9236ba-fa24-4120-a845-a6d5861198b5

📥 Commits

Reviewing files that changed from the base of the PR and between def75b0 and 2ca2acd.

📒 Files selected for processing (5)
  • nvim/.config/nvim/after/plugin/conform.lua
  • nvim/.config/nvim/after/plugin/none-ls.lua
  • nvim/.config/nvim/lua/greg/vite_plus.lua
  • scripts/brews.sh
  • scripts/pacs.sh
🚧 Files skipped from review as they are similar to previous changes (3)
  • nvim/.config/nvim/lua/greg/vite_plus.lua
  • nvim/.config/nvim/after/plugin/none-ls.lua
  • nvim/.config/nvim/after/plugin/conform.lua

Comment thread scripts/brews.sh
# JavaScript/Node.js developement.
install_javascript_packages() {
prompt_and_install_shell "JavaScript packages" 'brew install fnm oven-sh/bun/bun pnpm fsouza/prettierd/prettierd && fnm install 22 && npm install -g eslint_d typescript-language-server typescript'
prompt_and_install_shell "JavaScript packages" 'brew install fnm oven-sh/bun/bun pnpm && fnm install --lts && fnm default lts-latest && eval "$(fnm env)" && npm install -g @fsouza/prettierd eslint_d@15 typescript-language-server typescript'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

In current fnm releases, is fnm default lts-latesta supported way to set the default Node.js version to latest LTS? If not, what is the recommended command sequence afterfnm install --lts?

💡 Result:

No, fnm default lts-latest is not a supported command for setting the default Node.js version [1]. The fnm default command expects a specific version number (e.g., 20 or 22.13.1) to set as the global default [2][3][4]. To set the default Node.js version to the latest LTS after installing it, you should follow this sequence: 1. Install the latest LTS version: fnm install --lts 2. Identify the specific version that was just installed: fnm list 3. Set that specific version as the default: fnm default <VERSION_NUMBER> (Replace <VERSION_NUMBER> with the version identified in step 2, such as 22.13.1.) The fnm default command functions as a shorthand for creating an alias named default [5][2]. Because lts-latest is not a resolvable version string within the fnm default command's logic, attempting to use it will result in an error [1].

Citations:


Fix fnm default lts-latest on line 193 — this command is unsupported and will fail.

The fnm default command requires an explicit version number (e.g., 20 or 22.13.1), not lts-latest. After fnm install --lts, you must identify the installed version and set it explicitly. Replace:

fnm install --lts && fnm default lts-latest && eval "$(fnm env)"

with:

fnm install --lts && fnm default "$(fnm list | grep -v default | head -1)" && eval "$(fnm env)"

Or better, assign to a variable first to ensure clarity and robustness.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/brews.sh` at line 193, The `fnm default lts-latest` command in the
JavaScript packages installation block within the `prompt_and_install_shell`
function call is invalid because `fnm default` requires an explicit version
number, not `lts-latest`. After running `fnm install --lts`, extract the
installed version using `fnm list` and pass the result explicitly to `fnm
default`. You can use command substitution to get the installed version (for
example, by filtering the list output and selecting the first matching version)
and pass it to `fnm default` instead of the literal `lts-latest` string.

@Vilos92 Vilos92 merged commit ea1ec69 into main Jun 22, 2026
4 checks passed
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.

1 participant