enhancements
This commit is contained in:
6
.editorconfig
Normal file
6
.editorconfig
Normal file
@@ -0,0 +1,6 @@
|
||||
root = true
|
||||
|
||||
[*.md]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
max_line_length = 80
|
||||
@@ -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,
|
||||
|
||||
@@ -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 })
|
||||
|
||||
|
||||
@@ -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 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)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user