Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(language_server): revalidate oxlint config after configPath is changed #7446

Closed
Sysix opened this issue Nov 23, 2024 Discussed in #5061 · 0 comments · Fixed by #7447
Closed

bug(language_server): revalidate oxlint config after configPath is changed #7446

Sysix opened this issue Nov 23, 2024 Discussed in #5061 · 0 comments · Fixed by #7447

Comments

@Sysix
Copy link
Contributor

Sysix commented Nov 23, 2024

We should call init_linter_config after the configPath is changed

Discussed in #5061

Originally posted by niksy August 22, 2024
I’m trying to enable language server inside Sublime Text.

I’ve managed to create basic configuration. Everything works if default settings are provided, but if I try to change configPath to some different config file (e.g. oxlintrc.json), language server doesn’t pick this up.

These are default options I’m using:

{
  "oxc_language_server.configPath": ".eslintrc",
  "oxc_language_server.enable": true,
  "oxc_language_server.run": "onType",
  "oxc_language_server.trace.server": "off"
}

And corresponding Sublime LSP configuration:

{
  "LSP-oxlint": {
    "enabled": true,
    "command": [
      "node", "/dev/node_modules/oxlint/bin/oxc_language_server"
    ],
    "settings": {
      "oxc_language_server.configPath": "oxlintrc.json",
      "oxc_language_server.enable": true,
      "oxc_language_server.run": "onType",
      "oxc_language_server.trace.server": "off"
    },
    "selector": "source.js"
  }
}

If I change some other option, everything is okay—for example, setting oxc_language_server.enable to false disables language server.

Am I doing something wrong? From what I can see inside language server codebase this should be picked up and applied inside current workspace.

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 a pull request may close this issue.

1 participant