feat(neovim): drop prettierd in favor of deno fmt
This commit is contained in:
parent
753913e67d
commit
bc5635c1f5
|
@ -74,7 +74,6 @@ in
|
||||||
# Markdown
|
# Markdown
|
||||||
markdownlint-cli
|
markdownlint-cli
|
||||||
marksman
|
marksman
|
||||||
prettierd
|
|
||||||
|
|
||||||
# Nix
|
# Nix
|
||||||
nixd
|
nixd
|
||||||
|
@ -85,7 +84,8 @@ in
|
||||||
python312Packages.flake8
|
python312Packages.flake8
|
||||||
ruff
|
ruff
|
||||||
|
|
||||||
# TypeScript
|
# TypeScript/JavaScript
|
||||||
|
deno
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
|
|
||||||
# Rust
|
# Rust
|
||||||
|
|
|
@ -9,6 +9,35 @@ return {
|
||||||
opts = function(_, config)
|
opts = function(_, config)
|
||||||
-- config variable is the default configuration table for the setup function call
|
-- config variable is the default configuration table for the setup function call
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
local helpers = require("null-ls.helpers")
|
||||||
|
|
||||||
|
local deno_fmt = helpers.make_builtin({
|
||||||
|
name = "deno_fmt",
|
||||||
|
filetypes = {
|
||||||
|
"angular",
|
||||||
|
"astro",
|
||||||
|
"css",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
"less",
|
||||||
|
"markdown",
|
||||||
|
"sass",
|
||||||
|
"scss",
|
||||||
|
"svelte",
|
||||||
|
"typescript",
|
||||||
|
"vue",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
method = { null_ls.methods.FORMATTING },
|
||||||
|
generator_opts = {
|
||||||
|
command = "deno",
|
||||||
|
args = { "fmt", "--unstable-component", "-" },
|
||||||
|
to_stdin = true,
|
||||||
|
},
|
||||||
|
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
|
||||||
|
@ -20,8 +49,8 @@ return {
|
||||||
null_ls.builtins.formatting.clang_format,
|
null_ls.builtins.formatting.clang_format,
|
||||||
null_ls.builtins.formatting.csharpier,
|
null_ls.builtins.formatting.csharpier,
|
||||||
null_ls.builtins.formatting.nixfmt,
|
null_ls.builtins.formatting.nixfmt,
|
||||||
null_ls.builtins.formatting.prettier,
|
|
||||||
null_ls.builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
|
deno_fmt,
|
||||||
}
|
}
|
||||||
return config -- return final config table
|
return config -- return final config table
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue