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

[Typescript pack] support biome for linter and formatter #962

Open
dannd4 opened this issue May 14, 2024 · 6 comments · May be fixed by #1006
Open

[Typescript pack] support biome for linter and formatter #962

dannd4 opened this issue May 14, 2024 · 6 comments · May be fixed by #1006
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dannd4
Copy link

dannd4 commented May 14, 2024

Is your feature related to a problem?

No response

Describe the new feature

Enable biome lsp for lspconfig and null-ls when project has @biomejs/biome dependency or has biome.json

Additional context

No response

@dannd4 dannd4 added the enhancement New feature or request label May 14, 2024
@Uzaaft
Copy link
Member

Uzaaft commented May 14, 2024

Great idea! Feel free to open up a PR. :)

@mehalter mehalter added good first issue Good for newcomers help wanted Extra attention is needed labels May 14, 2024
@willparsons
Copy link

I'm running into this problem at the moment with biome and eslint+prettier bumping into each other. I'll try and sort out the config on my end and then contribute it back here.

@mehalter mehalter removed the help wanted Extra attention is needed label May 24, 2024
@willparsons
Copy link

This is a bit annoying as the 95% of use cases is that you're either in a project that uses biome OR eslint+prettier, which is fine to configure, but it's possible that some people may want something like eslint with biome for formatting or some other configuration.

There's even the argument about HOW we run the LSP. I'd say we expect it to be in the projects dependencies and invoke it via npx/yarn/pnpm biome lsp-proxy, but they COULD use mason...

Do you guys want to cover all use cases or just go for the most common one?

@ammuench
Copy link
Contributor

I'm in two projects currently where we're using biome as the formatter and eslint as the linter while migrating a bunch of stuff.

Could we check for the existence of a biome.json config and use that to make decisions? It might be short-sighted but in my head any project where biome has "formatter": { "enabled": true } turned on I think would be the true formatter even if prettier is still in node modules somewhere, since you have to manually opt-into Biome formatting by declaring it. Same thing in reverse for "linter": { "enabled": true } (thought I can't think of many scenarios where you'd use biome as a linter and prettier as a formatter)

@Uzaaft
Copy link
Member

Uzaaft commented May 25, 2024

This is a bit annoying as the 95% of use cases is that you're either in a project that uses biome OR eslint+prettier, which is fine to configure, but it's possible that some people may want something like eslint with biome for formatting or some other configuration.

There's even the argument about HOW we run the LSP. I'd say we expect it to be in the projects dependencies and invoke it via npx/yarn/pnpm biome lsp-proxy, but they COULD use mason...

Do you guys want to cover all use cases or just go for the most common one?

Go for the most common one, and install it trough mason for now.

@willparsons willparsons linked a pull request May 29, 2024 that will close this issue
2 tasks
@willparsons
Copy link

I've started work on this here: https://github.com/AstroNvim/astrocommunity/pull/1006/files

Having everything supported is pretty finicky :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants