aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/after/lsp
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/after/lsp')
-rw-r--r--.config/nvim/after/lsp/efm.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/.config/nvim/after/lsp/efm.lua b/.config/nvim/after/lsp/efm.lua
new file mode 100644
index 0000000..c8952da
--- /dev/null
+++ b/.config/nvim/after/lsp/efm.lua
@@ -0,0 +1,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 },
+ },
+ },
+}