-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
A-helix-termArea: Helix term improvementsArea: Helix term improvementsC-enhancementCategory: ImprovementsCategory: Improvements
Description
I'm using a custom .helix/languages.toml for a monorepo setup. I don't want to use a global prettier bin, but rather the one installed in the currently worked on package. This is my config:
[[language]]
name = "typescript"
scope = "source.ts"
file-types = ["ts", "mts", "cts"]
injection-regex = "(ts|typescript)"
roots = ["package.json"]
language-servers = [{ except-features = ["format"], name = "typescript-language-server" }]
formatter = { command = "pnpm", args = ["prettier", "--parser", "typescript"] }
auto-format = trueHowever, this doesn't work if I open Helix from the monorepo root, as there's no package.json there and pnpm prettier fails. Maybe I'm misunderstanding how the workspace roots work, but I don't think the formatter is using these either. I ran pwd and see it's just the folder I opened Helix from.
formatter = { command = "pwd" }Even if I installed a global prettier, it won't be using the correct .prettierignore and .prettierrc.yml. I would like the option of running the formatter from the working directory of the currently open file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-helix-termArea: Helix term improvementsArea: Helix term improvementsC-enhancementCategory: ImprovementsCategory: Improvements