aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/after/lsp/efm.lua
blob: c8952daa955ca94ce5ea69ed908e2395e3d3a9e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
local biome_conf = {
   rootMarkers = { 'biome.json' },
   formatCommand = 'node_modules/.bin/biome format --stdin-file-path "${INPUT}"',
   formatStdin = true,
}

return {
   cmd = { 'efm-langserver' },
   filetypes = {
      'json',
      'javascript', 'javascriptreact', 'javascript.jsx',
      'typescript', 'typescriptreact', 'typescript.jsx',
   },
   root_markers = { '.git' },
   init_options = { documentFormatting = true },
   settings = {
      languages = {
         json = {
            {
               formatCommand = 'reparojson -q',
               formatStdin = true,
            },
         },
         javascript = { biome_conf },
         javascriptreact = { biome_conf },
         ['javascript.jsx'] = { biome_conf },
         typescript = { biome_conf },
         typescriptreact = { biome_conf },
         ['typescript.jsx'] = { biome_conf },
      },
   },
}