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:
parent
1014bcc8e3
commit
8f49137c9b
5 changed files with 188 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ languages=(
|
|||
'cpp'
|
||||
'css'
|
||||
'c-sharp'
|
||||
'dockerfile'
|
||||
'go'
|
||||
'html'
|
||||
'javascript'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue