mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
install: adding scripts for formatters and LSPs
This commit is contained in:
parent
0a1d26d1d9
commit
2a699e2cac
3 changed files with 46 additions and 0 deletions
31
install/nvim-formatters.sh
Executable file
31
install/nvim-formatters.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "usage: $0 <formatter>"
|
||||
exit 1
|
||||
fi
|
||||
SELECTED=$@
|
||||
|
||||
for sel in "${SELECTED[@]}"; do
|
||||
case $sel in
|
||||
"shfmt")
|
||||
go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
||||
;;
|
||||
"prettier")
|
||||
sudo npm install -g prettier
|
||||
;;
|
||||
"stylua")
|
||||
curl -sL https://github.com/JohnnyMorganz/StyLua/releases/download/v0.20.0/stylua-linux-x86_64.zip |
|
||||
funzip |
|
||||
sudo tee /usr/local/bin/stylua >/dev/null |
|
||||
sudo chmod 755 /usr/local/bin/stylua
|
||||
;;
|
||||
"blade")
|
||||
sudo npm install -g blade-formatter
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $sel"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue