1
0

enhancements

This commit is contained in:
2025-02-13 21:24:39 +01:00
parent d063a5461c
commit ad41074de5
4 changed files with 35 additions and 0 deletions

View File

@@ -84,7 +84,29 @@ return {
formatters_by_ft = {
-- brew install stylua
lua = { "stylua" },
-- install rust
rust = { "rustfmt" },
-- brew install prettier
markdown = { "prettierd", "prettier" },
json = { "prettierd", "prettier" },
yaml = { "prettierd", "prettier" },
-- install terraform
terraform = { "terraform_fmt" },
-- brew install shfmt
bash = { "shfmt" },
-- brew install ruff
python = { "ruff" },
},
formatters = {
prettier = {
prepend_args = { "--prose-wrap", "always" },
},
shfmt = {
prepend_args = { "-i", "4" },
},
ruff = {
prepend_args = { "--extend-select", "I" },
},
},
format_on_save = {
lsp_fallback = true,
@@ -92,6 +114,7 @@ return {
timeout_ms = 500,
},
})
vim.keymap.set({ "n", "v" }, "<leader>mp", function()
conform.format({
lsp_fallback = true,

View File

@@ -5,8 +5,11 @@ return {
config = function()
local lint = require("lint")
lint.linters_by_ft = {
-- brew install luacheck
lua = { "luacheck" },
bash = { "bash" },
-- brew install tflint
terraform = { "tflint" },
}
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })