Various lsp scripts

This commit is contained in:
Micke Nordin 2022-08-18 13:16:14 +02:00
parent b3fe5537ce
commit ec8ee39e0e
Signed by untrusted user who does not match committer: micke
GPG key ID: 0DA0A7A5708FE257
3 changed files with 27 additions and 0 deletions

16
dotfiles/.local/bin/puppet-fix Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
input=${1}
if [[ ${input} == "" ]]; then
input="-"
elif ! [[ -f ${input} ]]; then
echo "Usage: ${0} [puppet file]"
exit 1
fi
tempfile=$(mktemp)
cat "${input}" > "${tempfile}"
puppet-lint --fix "${tempfile}" > /dev/null 2>&1
#puppet-lint --log-format "%{filename}:%{line}:%{column}: %{kind}: %{message}. [%{check}]" ${tempfile} | grep -v warning:
cat "${tempfile}"
rm "${tempfile}"

View file

@ -0,0 +1,3 @@
#!/bin/bash
cd /home/micke/sources/puppet-editor-services/
ruby puppet-languageserver ${@}

8
dotfiles/.local/bin/pyls Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from pyls.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())