Skip to content

Commit 88b9065

Browse files
azdanovUzaaftCopilot
authored
feat(pack): add biome (#1511)
* feat(pack): add biome * docs: add complete list over supported langs , fully and partially supported ones Co-authored-by: Copilot <[email protected]> * refactor: move filetype table to the opts function that uses it * chore: remove unused option --------- Co-authored-by: Uzair Aftab <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent f14d0ff commit 88b9065

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Biome
2+
3+
[Biome](https://biomejs.dev) is a fast toolchain for web projects, providing formatting and linting via CLI and LSP.
4+
5+
## Features
6+
7+
- **Formatter**
8+
9+
- Supports JavaScript, TypeScript, JSX, TSX, JSON, JSONC, CSS, GraphQL, Astro, Svelte, and Vue
10+
- 97% compatibility with Prettier
11+
- Can format malformed code as you write
12+
13+
- **Linter**
14+
- Covers JavaScript, TypeScript, JSX, CSS, GraphQL, Astro, Svelte, Vue, and JSONC
15+
- Includes 293 rules from ESLint, TypeScript ESLint, and more
16+
- Outputs detailed, contextual diagnostics to help improve your code
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---@type LazySpec
2+
return {
3+
{
4+
"williamboman/mason-lspconfig.nvim",
5+
opts = function(_, opts)
6+
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "biome" })
7+
end,
8+
},
9+
{
10+
"WhoIsSethDaniel/mason-tool-installer.nvim",
11+
optional = true,
12+
opts = function(_, opts)
13+
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "biome" })
14+
end,
15+
},
16+
{
17+
"jay-babu/mason-null-ls.nvim",
18+
optional = true,
19+
opts = function(_, opts)
20+
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "biome" })
21+
end,
22+
},
23+
{
24+
"stevearc/conform.nvim",
25+
optional = true,
26+
opts = function(_, opts)
27+
if not opts.formatters_by_ft then opts.formatters_by_ft = {} end
28+
-- https://biomejs.dev/internals/language-support/
29+
local supported_ft = {
30+
"astro",
31+
"css",
32+
"graphql",
33+
-- "html",
34+
"javascript",
35+
"javascriptreact",
36+
"json",
37+
"jsonc",
38+
-- "markdown",
39+
"svelte",
40+
"typescript",
41+
"typescriptreact",
42+
"vue",
43+
-- "yaml",
44+
}
45+
for _, ft in ipairs(supported_ft) do
46+
opts.formatters_by_ft[ft] = { "biome" }
47+
end
48+
end,
49+
},
50+
}

0 commit comments

Comments
 (0)