Various lsp scripts
This commit is contained in:
parent
b3fe5537ce
commit
ec8ee39e0e
3 changed files with 27 additions and 0 deletions
16
dotfiles/.local/bin/puppet-fix
Executable file
16
dotfiles/.local/bin/puppet-fix
Executable 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}"
|
3
dotfiles/.local/bin/puppet-languageserver
Executable file
3
dotfiles/.local/bin/puppet-languageserver
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
cd /home/micke/sources/puppet-editor-services/
|
||||
ruby puppet-languageserver ${@}
|
8
dotfiles/.local/bin/pyls
Executable file
8
dotfiles/.local/bin/pyls
Executable 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())
|
Loading…
Add table
Reference in a new issue