Skip to content

oxlint/oxfmt LSPs do not initialize on startup for previously opened files #125

@hanneswidrig

Description

@hanneswidrig

I followed the default example but I'm facing issues with the oxlint and oxfmt LSPs actually running initially when I launch zed.

Reproduction Steps

  1. Open a basic typescript project with zed settings configuration globally or locally.
  2. Open a typescript file.
  3. Close the editor and relaunch.
  4. Observe that oxlint and oxfmt are not recognized in that typescript file.
Image
  1. Close and reopen a typescript file, now oxlint and oxfmt are running and active.
Image
// .zed/settings.json
{
  "lsp": {
    "oxlint": {
      "initialization_options": {
        "settings": {
          "configPath": null,
          "run": "onType",
          "disableNestedConfig": false,
          "fixKind": "safe_fix",
          "typeAware": true,
          "unusedDisableDirectives": "deny"
        }
      }
    },
    "oxfmt": {
      "initialization_options": {
        "settings": {
          "fmt.configPath": null,
          "run": "onSave"
        }
      }
    }
  },
  "languages": {
    "TypeScript": {
      "format_on_save": "on",
      "prettier": {
        "allowed": false
      },
      "formatter": [
        {
          "language_server": {
            "name": "oxfmt"
          }
        }
      ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions