Skip to content

oxfmt formatter conflicts with vtsls (Zed's built-in TypeScript LSP) #212

Description

@alx-xo

Zed ships with vtsls as the built-in TypeScript/JavaScript language server, which also provides formatting. When the oxfmt extension is active, both LSPs compete to format on save and the result is unpredictable. In my case, vtsls was winning, meaning .oxfmtrc.json was being silently ignored.

Expected behavior:
Extension advertises itself as teh preferred formatter to take priority over vtsls, or expose a require_config_file option (like the Biome Zed extension does). Which only activates formatting when a .oxfmtrc.json is found, making behavior explicit and predictable

Would be nice to have this working without a custom setting in every repo I'm in with oxfmt. A frustrating silent failure, the formatter runs, the file changes, but the project's oxfmt config is never applied

Current workaround: In a local repo .zed/settings.json:

{
  "languages": {
    "TypeScript": {
      "formatter": { "language_server": { "name": "oxfmt" } },
    },
    "TSX": {
      "formatter": { "language_server": { "name": "oxfmt" } },
    },
    "JavaScript": {
      "formatter": { "language_server": { "name": "oxfmt" } },
    },
    "JSX": {
      "formatter": { "language_server": { "name": "oxfmt" } },
    },
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions