aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaster4385 <venkatesh@tablaster.dev>2024-12-01 00:12:56 +0530
committerBlaster4385 <venkatesh@tablaster.dev>2024-12-02 15:18:32 +0530
commit61a4571c81acd012dba37a5b19247f799663bb79 (patch)
treee6b07e6296aeeb2b327bd55a9d0e8c9900d22fad
parentf47415a9cb968fc605afb423b9f0dff59557216a (diff)
feat: updated nvim conform configHEADi3-gruvbox
-rw-r--r--nvim/custom/configs/conform.lua52
1 files changed, 16 insertions, 36 deletions
diff --git a/nvim/custom/configs/conform.lua b/nvim/custom/configs/conform.lua
index 550b659..5edc9bf 100644
--- a/nvim/custom/configs/conform.lua
+++ b/nvim/custom/configs/conform.lua
@@ -1,36 +1,16 @@
---type conform.options
-local util = require("conform.util")
-
-local options = {
- lsp_fallback = true,
-
- formatters_by_ft = {
- lua = { "stylua" },
-
- javascript = { "prettier", "eslint" },
- javascriptreact = { "prettier", "eslint" },
- css = { "prettier" },
- html = { "prettier" },
-
- sh = { "shfmt" },
- },
-
- format_on_save = {
- -- These options will be passed to conform.format()
- timeout_ms = 1000,
- lsp_fallback = true,
- },
-
- formatters = {
- eslint = {
- command = util.from_node_modules("eslint"),
- args = { "$FILENAME", "--fix" },
- cwd = util.root_file({
- "package.json",
- ".eslintrc.cjs"
- }),
- }
- }
-}
-
-require("conform").setup(options)
+require("conform").setup({
+ formatters_by_ft = {
+ lua = { "stylua" },
+ python = { "isort", "black" },
+ javascript = { { "prettierd", "prettier" } },
+ typescript = { { "prettierd", "prettier" } },
+ javascriptreact = { { "prettierd", "prettier" } },
+ html = { "prettierd", "prettier" },
+ css = { "prettierd", "prettier" },
+ },
+ format_on_save = {
+ -- These options will be passed to conform.format()
+ timeout_ms = 500,
+ lsp_fallback = true,
+ },
+ }) \ No newline at end of file