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

6
.editorconfig Normal file
View File

@@ -0,0 +1,6 @@
root = true
[*.md]
indent_style = space
indent_size = 4
max_line_length = 80

View File

@@ -84,7 +84,29 @@ return {
formatters_by_ft = { formatters_by_ft = {
-- brew install stylua -- brew install stylua
lua = { "stylua" }, lua = { "stylua" },
-- install rust
rust = { "rustfmt" }, 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 = { format_on_save = {
lsp_fallback = true, lsp_fallback = true,
@@ -92,6 +114,7 @@ return {
timeout_ms = 500, timeout_ms = 500,
}, },
}) })
vim.keymap.set({ "n", "v" }, "<leader>mp", function() vim.keymap.set({ "n", "v" }, "<leader>mp", function()
conform.format({ conform.format({
lsp_fallback = true, lsp_fallback = true,

View File

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

View File

@@ -12,6 +12,9 @@ setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file. setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
setopt SHARE_HISTORY # Share history between all sessions. setopt SHARE_HISTORY # Share history between all sessions.
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
# make less more friendly for non-text input files, see lesspipe(1) # make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"