Closed xulongwu4 closed 11 months ago
The --config-path
wasn't designed for the lsp-proxy
command, because this command works only as a proxy for the daemon. This was probably an oversight from our end about how we structured the CLI options.
Have you tried to use any other CLI option and see if they have an effect on the lsp-proxy
command?
I mean all the Global options applied to all commands
that you can see in the reference page: https://biomejs.dev/reference/cli/#biome-lsp-proxy
@ematipico, I tried the --max-diagnostics
flag and set it to 2
, but I didn't see it have any effects on the behavior of the LSP. The language server still reports that there are 5 errors in my file.
I found this old issue in the rome repo: https://github.com/rome/tools/issues/4505. It seems to imply that --config-path
is supposed to work for the rome lsp-proxy
command?
Then it's probably a regression that we caused when we switched to another command line parser.
I will investigate when I have time.
Resolved by #685. Thanks a lot @ematipico!
Hit the same issue today, built biome from main
.
The config file works for rules, but not for formatting, and everything is ok with biome format
.
@3rd would you mind opening a new issue? Maybe explain a bit what you're trying to do. Unfortunately it's very difficult to test/replicate these cases
Environment information
What happened?
I am using the commit 44ae99ff11 on the main branch of biome. I started the lsp server with the command
biome lsp-proxy --config-path ~/.config/biome
. The~/.config/biome/biome.json
has the following content:I then used the lsp to format a json file. However, the formatted json file used
tab
instead ofspace
, while mybiome.json
file asked to usespace
.If I do formatting with the
biome format --config-path ~/.config/biome
command, thenspace
is used instead oftab
. This seems to imply thatbiome format
loads the config file correctly, whilebiome lsp-proxy
does not.This is the file I tried to format:
This is the formatting result by the
biome lsp-proxy --config-path ~/.config/biome
command:This is the formatting result by the
biome format --config-path ~/.config/biome
command:Expected result
biome lsp-proxy --config-path ~/.config/biome
should use my config file~/.config/biome/biome.json
when formatting my json files.Code of Conduct