1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Add dockerfile-ts-mode (Bug#59894)

* admin/notes/tree-sitter/build-module/batch.sh: Add dockerfile support.
* admin/notes/tree-sitter/build-module/build.sh: Support different
namespaces and add dockerfile support.
* etc/NEWS: Mention it.
* lisp/progmodes/dockerfile-ts-mode.el: New major mode with
tree-sitter support.
* lisp/progmodes/eglot.el (eglot-server-programs): Add it.
This commit is contained in:
Randy Taylor 2022-12-07 20:53:35 -05:00 committed by Yuan Fu
parent 1014bcc8e3
commit 8f49137c9b
No known key found for this signature in database
GPG key ID: 56E19BC57664A442
5 changed files with 188 additions and 2 deletions

View file

@ -5,6 +5,7 @@ languages=(
'cpp'
'css'
'c-sharp'
'dockerfile'
'go'
'html'
'javascript'

View file

@ -14,11 +14,15 @@ echo "Building ${lang}"
### Retrieve sources
namespace="tree-sitter"
repo="tree-sitter-${lang}"
sourcedir="tree-sitter-${lang}/src"
grammardir="tree-sitter-${lang}"
case "${lang}" in
"dockerfile")
namespace="camdencheek"
;;
"typescript")
sourcedir="tree-sitter-typescript/typescript/src"
grammardir="tree-sitter-typescript/typescript"
@ -30,7 +34,7 @@ case "${lang}" in
;;
esac
git clone "https://github.com/tree-sitter/${repo}.git" \
git clone "https://github.com/${namespace}/${repo}.git" \
--depth 1 --quiet
cp "${grammardir}"/grammar.js "${sourcedir}"
# We have to go into the source directory to compile, because some