1
0

improve workflow with shell

This commit is contained in:
2025-03-29 22:03:15 +01:00
parent 38f64e9fab
commit 7d43d9abd3
7 changed files with 39 additions and 32 deletions

View File

@@ -19,6 +19,7 @@
- prettier-plugin-go-template
- rust-analyzer
- shfmt
- shellcheck
- bash-language-server
- terraform
- tflint

View File

@@ -0,0 +1,5 @@
return {
cmd = { "bash-language-server" },
filetypes = { "sh", "bash", "zsh" },
settings = {},
}

View File

@@ -9,12 +9,9 @@ vim.lsp.config("*", {
},
})
vim.lsp.config("rust", {
filetypes = { "rust" },
})
vim.lsp.enable("luals")
vim.lsp.enable("rust")
vim.lsp.enable("bashls")
-- [[FOLDING SETUP
-- Prefer LSP folding if client supports it

View File

@@ -10,6 +10,7 @@ return {
configs.setup({
ensure_installed = {
"bash",
--"zsh",
"c",
"cmake",
"dockerfile",
@@ -95,6 +96,8 @@ return {
terraform = { "terraform_fmt" },
-- brew install shfmt
bash = { "shfmt" },
zsh = { "shfmt" },
sh = { "shfmt" },
-- brew install ruff
python = { "ruff" },
},
@@ -103,7 +106,7 @@ return {
prepend_args = { "--prose-wrap", "always" },
},
shfmt = {
prepend_args = { "-i", "4" },
prepend_args = { "-i", "4", "-ci" },
},
ruff = {
prepend_args = { "--extend-select", "I" },

View File

@@ -7,7 +7,8 @@ return {
lint.linters_by_ft = {
-- brew install luacheck
lua = { "luacheck" },
bash = { "bash" },
bash = { "shellcheck" },
sh = { "shellcheck" },
-- brew install tflint
terraform = { "tflint" },
}

View File

@@ -23,7 +23,7 @@ case "$(uname -s)" in
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
} ;;
Darwin*) {
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source "$(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
} ;;
*) ;;
esac
@@ -31,8 +31,8 @@ esac
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
source $DOTFILES/zsh/completion.zsh
fpath=($DOTFILES/zsh/zsh-completions/src $fpath)
source "$DOTFILES/zsh/completion.zsh"
fpath=("$DOTFILES/zsh/zsh-completions/src" "$fpath")
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
@@ -44,6 +44,6 @@ fi
function set_win_title() {
echo -ne "\033]0; $(basename "$PWD") \007"
}
starship_precmd_user_func="set_win_title"
export starship_precmd_user_func="set_win_title"
eval "$(starship init zsh)"