Folder specific LSP settings #13579
-
Hey, I'm trying to switch from eslint/prettier to biome in a monorepo project. Unfortunately biome does not support svelte yet. Therefore all packages using biome except one web app that still uses eslint/prettier. I now try to use different LSP settings for the svelte web app. What I tried:
I was going through some issues and PRs. It seems a per folder overwrite was possible at some time, but it was removed due to lsp workspace-root implementation, if I understood correctly.
Default: [[language]]
name = "typescript"
language-servers = [
{ name = "typescript-language-server", except-features = ["format"] },
"biome",
] Web app specific: [[language]]
name = "typescript"
language-servers = [
"typescript-language-server",
"vscode-eslint-language-server",
]
file-types = [{ glob = "apps/web/**/*.{ts,mts,cts}" }]
This seems to only use the last entry. The whole "Default" settings seem to be overwritten entirely. So far I'd say it's not possible to override lsp settings per subfolder other than openening another Helix instance in the nested |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok, I found the answer: Add both LSP: [[language]]
name = "typescript"
language-servers = [
{ name = "typescript-language-server", except-features = ["format"] },
"vscode-eslint-language-server",
"biome",
] And then add root configs for both // biome.jsonc
{
"$schema": "https://biomejs.dev/schemas/2.1.1/schema.json",
"root": true,
"files": {
"includes": ["**", "!apps/my-eslint-app/**/*"]
}
} // eslint.config.js
import { globalIgnores } from "eslint/config"
/** @type {import('eslint').Linter.Config[]} */
export default [
globalIgnores(["apps/my-biome-app/**/*", "packages/my-biome-package/**/*"])
] |
Beta Was this translation helpful? Give feedback.
Ok, I found the answer:
Add both LSP:
And then add root configs for both
biome
andeslint
. Cross ignore the projects that don't use biome/eslint: