Update formatters and fix slow load bug with rustfmt

This commit is contained in:
Alex Selimov 2026-03-26 13:50:55 -04:00
parent 03f906b663
commit b2d372c538
6 changed files with 25 additions and 14 deletions

View file

@ -1,3 +0,0 @@
set colorcolumn=100
nmap ;x [hv]h]hk$;sc
set tw=1000

View file

@ -6,9 +6,9 @@
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"git-blame.nvim": { "branch": "master", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
"git-blame.nvim": { "branch": "main", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
"iron.nvim": { "branch": "master", "commit": "93b3b97cf4313613fba5e91055deaf091cd78483" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lush.nvim": { "branch": "main", "commit": "45a79ec4acb5af783a6a29673a999ce37f00497e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" },
@ -21,7 +21,7 @@
"nvim-jdtls": { "branch": "master", "commit": "c23f200fee469a415c77265ca55b496feb646992" },
"nvim-lspconfig": { "branch": "master", "commit": "d3ad666b7895f958d088cceb6f6c199672c404fe" },
"nvim-markdown": { "branch": "master", "commit": "cfe80a1054ccc168ae9ef28062472e78f710f9f4" },
"nvim-treesitter": { "branch": "master", "commit": "205faba1768a6e4c854f156bc6a21a41b242599c" },
"nvim-treesitter": { "branch": "main", "commit": "205faba1768a6e4c854f156bc6a21a41b242599c" },
"nvim-web-devicons": { "branch": "master", "commit": "57dfa947cc88cdf1baa2c7e13ed31edddd8fb1d1" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"rainbow_csv": { "branch": "master", "commit": "3dbbfd7d17536aebfb80f571255548495574c32b" },

View file

@ -1,8 +1,5 @@
-- Formatting configuration
-- Set rustfmt command
vim.g["rustfmt_command"] = "rustfmt +nightly"
-- Commands to disable/enable formatting
require("conform").setup({
format_on_save = function(bufnr)
@ -31,4 +28,5 @@ vim.api.nvim_create_user_command("FormatEnable", function()
vim.g.disable_autoformat = false
end, {
desc = "Re-enable autoformat-on-save",
})
})

View file

@ -16,4 +16,5 @@ vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower win
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
-- LSP keymaps
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" })
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" })

View file

@ -9,13 +9,22 @@ return {
command = "black",
prepend_args = { "--line-length", "100" },
},
"prettier",
formatters = {
golines = {
args = {
"--max-len=100",
"--base-formatter=gofmt",
},
},
},
},
},
opts = {
notify_on_error = false,
format_on_save = {
timeout_ms = 500,
lsp_fallback = false,
timeout_ms = 2500,
lsp_fallback = true,
},
formatters_by_ft = {
lua = { "stylua" },
@ -25,7 +34,12 @@ return {
sh = { "beautysh" },
tex = { "latexindent" },
java = { "java" },
javascript = { "prettier" },
typescript = { "prettier" },
typescriptreact = { "prettier" },
json = { "prettier" },
go = { "golines" },
},
},
},
}
}

View file

@ -181,6 +181,7 @@ return {
"jdtls",
"stylua",
"black",
"golines",
"clang-format",
"beautysh",
"latexindent",