oxc icon indicating copy to clipboard operation
oxc copied to clipboard

Create coc-oxc for vim / nvim

Open Boshen opened this issue 1 year ago • 8 comments

Should be similar to https://github.com/fannheyward/coc-biome

Boshen avatar Nov 10 '23 16:11 Boshen

I'll try this.

fannheyward avatar Nov 14 '23 08:11 fannheyward

I'll try this.

Thank you!

Boshen avatar Nov 14 '23 09:11 Boshen

You don't need an extension for now, add the following to coc-settings.json to make oxc server to work:

  "languageserver": {
    "oxc": {
      "command": "oxc_vscode",
      "filetypes": [
        "typescript",
        "javascript"
      ],
      "rootPatterns": [
        ".git"
      ]
    }
  },
image

fannheyward avatar Nov 14 '23 09:11 fannheyward

For coc-oxc, maybe something more:

  1. restart server if needed
  2. fixAll like eslint

If oxc supports more off-LSP features, the extension is needed, for now, I think coc-settings.json is enough.

The main reason to create coc-biome is biome __run_server, make coc.nvim connect biome with socket, single biome process for multiple projects. You can also use biome without coc-biome:

  "languageserver": {
    "biome": {
      "command": "biome",
      "args": [
        "lsp-proxy"
      ],
      "filetypes": [
        "typescript",
        "javascript"
      ],
      "rootPatterns": [
        ".git"
      ]
    }
  },

fannheyward avatar Nov 14 '23 09:11 fannheyward

I see, thank you @fannheyward!

Boshen avatar Nov 14 '23 10:11 Boshen

I'll follow oxc and make coc-oxc in some time. oxc is an excited project, with the incoming prettier feature, all I missing is bundler as esbuild.

fannheyward avatar Nov 14 '23 10:11 fannheyward

Make https://github.com/oxc-project/oxc/tree/main/editors/vscode/server into a separate crate, something like oxc_ls, will be easy to use in editors.

fannheyward avatar Nov 15 '23 03:11 fannheyward

What is the state of this issue? I'm a vim/neovim user and I love a few good cocs in my editor, is there anything that I can help with? I have experience with both Vim script and Lua but it shouldn't be necessary for this task.

rzvxa avatar Mar 23 '24 00:03 rzvxa