fix(neovim): use prettierd instead of deno's fmt

This commit is contained in:
Alexandre Cavalheiro 2025-01-21 03:47:05 -03:00
parent db2d6b9401
commit 23c4620908
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
2 changed files with 30 additions and 28 deletions

View file

@ -115,6 +115,7 @@ in
vscode-extensions.vadimcn.vscode-lldb vscode-extensions.vadimcn.vscode-lldb
# Vue # Vue
prettierd
vue-language-server vue-language-server
# Svelte # Svelte

View file

@ -11,33 +11,33 @@ return {
local null_ls = require("null-ls") local null_ls = require("null-ls")
local helpers = require("null-ls.helpers") local helpers = require("null-ls.helpers")
local deno_fmt = helpers.make_builtin({ -- local deno_fmt = helpers.make_builtin({
name = "deno_fmt", -- name = "deno_fmt",
filetypes = { -- filetypes = {
"angular", -- "angular",
"astro", -- "astro",
"css", -- "css",
"html", -- "html",
"javascript", -- "javascript",
"json", -- "json",
"jsonc", -- "jsonc",
"less", -- "less",
"markdown", -- "markdown",
"sass", -- "sass",
"scss", -- "scss",
"svelte", -- "svelte",
"typescript", -- "typescript",
"vue", -- "vue",
"yaml", -- "yaml",
}, -- },
method = { null_ls.methods.FORMATTING }, -- method = { null_ls.methods.FORMATTING },
generator_opts = { -- generator_opts = {
command = "deno", -- command = "deno",
args = { "fmt", "--unstable-component", "-" }, -- args = { "fmt", "--unstable-component", "-" },
to_stdin = true, -- to_stdin = true,
}, -- },
factory = helpers.formatter_factory, -- factory = helpers.formatter_factory,
}) -- })
-- Check supported formatters and linters -- Check supported formatters and linters
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
@ -52,7 +52,8 @@ return {
null_ls.builtins.formatting.csharpier, null_ls.builtins.formatting.csharpier,
null_ls.builtins.formatting.nixfmt, null_ls.builtins.formatting.nixfmt,
null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.stylua,
deno_fmt, --deno_fmt,
null_ls.builtins.formatting.prettierd,
} }
return config -- return final config table return config -- return final config table
end, end,