Formatter not working #13014
Replies: 2 comments
-
|
anything I can do to help? I've tried changing the source code to log the before text ( |
Beta Was this translation helpful? Give feedback.
-
|
I've spent hours to figure out what's wrong with this configuration. And turns out it works if you open helix from the directory containing the file you're about to format. But if you open helix from any other directory that does not contain your file, and then open your file (e.g. using file picker), ESLint won't be able to discover configuration file ( The main issue is that So to fix that, I ended up with the following shell script that I named eslint_d --fix-to-stdout --stdin --stdin-filename "$(pwd)"/"$(basename "$1")"It makes sure that the path to a file is absolute. Now ESLint is able to resolve the config file.
[[language]]
name = "typescript"
auto-format = true
language-servers = [{except-features = ["format"], name = "typescript-language-server"}, "vscode-eslint-language-server"]
[language.formatter]
args = ["%{buffer_name}"]
command = "/path/to/bin/eslint-fix" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Nothing happens when I run the formatter.
Reproduction Steps
I tried this:
languages.tomllike this::formatin my fileI expected this to happen:
it should be formatted
Instead, this happened:
Nothing, no error.
The log even says:
BUT!! If I select the whole file (
%) and then pipe it (|) through the command:/Users/meris/.local/share/mise/installs/node/20.11.1/bin/eslint_d --stdin --fix-to-stdout --stdin-filename packages/checkout-sdk/src/actionMethods.ts, the file gets correctly formatted.any idea what this might be?
Helix log
~/.cache/helix/helix.log
Platform
macOs
Terminal Emulator
kitty/zellij
Installation Method
source
Helix Version
25.01.1-177-g0efa8207
Beta Was this translation helpful? Give feedback.
All reactions