feat: use conform
This commit is contained in:
parent
a576bf237a
commit
455b831f34
2 changed files with 11 additions and 22 deletions
|
@ -1,15 +1,16 @@
|
|||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
bash = { "shfmt" },
|
||||
sh = { "shfmt" },
|
||||
md = { "mdformat" },
|
||||
yaml = { "yamlfmt" },
|
||||
},
|
||||
|
||||
-- format_on_save = {
|
||||
-- -- These options will be passed to conform.format()
|
||||
-- timeout_ms = 500,
|
||||
-- lsp_fallback = true,
|
||||
-- },
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
}
|
||||
|
||||
require("conform").setup(options)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
event = "BufWritePre", -- uncomment for format on save
|
||||
config = function()
|
||||
require "configs.conform"
|
||||
end,
|
||||
|
@ -20,27 +20,18 @@ return {
|
|||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- lua stuff
|
||||
"lua-language-server",
|
||||
"stylua",
|
||||
-- web dev stuff
|
||||
"css-lsp",
|
||||
"html-lsp",
|
||||
"typescript-language-server",
|
||||
"deno",
|
||||
"prettier",
|
||||
-- c/cpp stuff
|
||||
"clangd",
|
||||
"clang-format",
|
||||
-- shell
|
||||
"bash-language-server",
|
||||
"shfmt",
|
||||
"shellcheck",
|
||||
-- ansible
|
||||
"ansible-language-server",
|
||||
"yaml-language-server",
|
||||
-- docker
|
||||
"yamlfmt",
|
||||
"dockerfile-language-server",
|
||||
"mdformat",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -53,9 +44,6 @@ return {
|
|||
"html",
|
||||
"css",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"c",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue