Skip to content

Oxlint with --lsp doesn't work with this #25

@Dioarya

Description

@Dioarya

Description

Oxlint's oxlint --lsp lsp does not work with this plugin

Steps to reproduce

  1. Install oxlint either in package.json or mason
  2. For windows support
vim.lsp.config("oxlint", {
  cmd = function(dispatchers, config)
    local cmd = "oxlint"
    if (config or {}).root_dir then
      local ext = (vim.fn.has "win32" == 1) and ".cmd" or ""
      local local_cmd = vim.fs.joinpath(config.root_dir, "node_modules/.bin", cmd .. ext)
      if vim.fn.executable(local_cmd) == 1 then
        cmd = local_cmd
      end
    end
    return vim.lsp.rpc.start({ cmd, "--lsp" }, dispatchers)
  end,
})
vim.api.nvim_create_autocmd("LspAttach", {
  group = vim.api.nvim_create_augroup("lspconfig-lsp-attach", { clear = true }),
  callback = function(event)
  -- My mappings and other on_attach things
  -- ...

  local client = vim.lsp.get_client_by_id(event.data.client_id)
  -- Enable workspace diagnostics without needing to open every file within a project. Enabled by "artemave/workspace-diagnostics.nvim"
  require("workspace-diagnostics").populate_workspace_diagnostics(client, event.buf)
end,
})
  1. Open a project with oxlint errors when doing pnpm oxlint src/
  2. Open a file that would trigger oxlint to attach to the buffer

Expected behavior

Every oxlint error in the project be shown after warming up oxlint

Environment

  • Neovim version:
    NVIM v0.12.1
    Build type: Release
    LuaJIT 2.1.1771261233
  • workspace-diagnostics version: 0dcd7d0
  • Plugin clash: Trouble

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions