Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
*.elc
elc
flycheck*
*#*
/.envrc

/pyvenv.cfg
/lib/
/bin/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "tests/html-ts-mode"]
path = tests/html-ts-mode
url = https://github.com/mickeynp/html-ts-mode.git
[submodule "test/tuareg"]
path = tests/tuareg
url = https://github.com/ocaml/tuareg.git
[submodule "test/ocaml-ts-mode"]
path = tests/ocaml-ts-mode
url = https://github.com/terrateamio/ocaml-ts-mode.git
3 changes: 3 additions & 0 deletions .ts-setup.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.20.1" "src"))
(json . ("https://github.com/tree-sitter/tree-sitter-json" "v0.20.2"))
(go . ("https://github.com/tree-sitter/tree-sitter-go" "v0.20.0"))
(ocaml . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/ocaml/src"))
(ocaml_interface . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/interface/src"))
(ocaml_type . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/type/src"))
(python . ("https://github.com/tree-sitter/tree-sitter-python" "v0.20.4"))
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "tsx/src"))
Expand Down
11 changes: 11 additions & 0 deletions .ts-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@
(setq load-prefer-newer t)
(princ (format "Default directory is `%s'\n" default-directory))
(load-library "tests/html-ts-mode/html-ts-mode.el")
(load-library "tests/tuareg/tuareg-opam.el")
(load-library "tests/tuareg/tuareg-compat.el")
(load-library "tests/tuareg/tuareg.el")
;; (load-library "tests/ocaml-ts-mode/ocaml-ts-mode.el")
(load-library "tests/tuareg-treesit.el")


(setq auto-mode-alist
(append '(("\\.ml[ily]?\\'" . tuareg-mode)
("\\.topml\\'" . tuareg-mode))
auto-mode-alist))
28 changes: 5 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM ubuntu:24.04 as base
FROM ubuntu:24.04 AS base

ENV VERSION=29.1
# We assume the git repo's cloned outside and copied in, instead of
# cloning it in here. But that works, too.
WORKDIR /opt/emacs
LABEL MAINTAINER "Mickey Petersen at mastering emacs"
LABEL MAINTAINER="Mickey Petersen at mastering emacs"

ENV DEBIAN_FRONTEND=noninteractive

RUN sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list \
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources \
&& apt-get update \
&& apt-get build-dep -y emacs

Expand All @@ -26,25 +25,8 @@ RUN apt-get update \
git \
libtree-sitter-dev \
libtree-sitter0 \
tree-sitter-cli

# Download and extract Emacs
RUN wget https://ftp.gnu.org/gnu/emacs/emacs-$VERSION.tar.gz \
&& tar -xf emacs-$VERSION.tar.gz \
&& rm emacs-$VERSION.tar.gz

WORKDIR /opt/emacs/emacs-$VERSION/

# Configure and run
RUN ./autogen.sh \
&& ./configure \
--with-tree-sitter

ENV JOBS=4
RUN make -j ${JOBS} \
&& make install \
&& cd \
&& rm -rf /opt/emacs/emacs-$VERSION/
tree-sitter-cli \
emacs

WORKDIR /opt

Expand Down
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ Here is a list of the languages currently supported.
+--------------------+--------------------------------------------------------------+--------------------+
|Go |go-mode, go-ts-mode |v0.20.0 |
+--------------------+--------------------------------------------------------------+--------------------+
|OCaml [2] |caml-mode, tuareg-mode, neocaml-mode, neocaml-interface-mode |v0.24.2 |
+--------------------+--------------------------------------------------------------+--------------------+


*Don't see your language? If you want your favourite language added, then why not try it yourself? Have a look at ``combobulate-json.el`` for an example.*
Expand All @@ -127,6 +129,8 @@ Furthermore, Combobulate ships with a Magit-like transient UI that you can acces

[1] Either use the version built into *Emacs 30*, or you can download my ``html-ts-mode`` `here <https://github.com/mickeynp/html-ts-mode>`__, and read more about how to build your own tree-sitter major mode by reading `Let's Write a Tree-Sitter Major Mode <https://www.masteringemacs.org/article/lets-write-a-treesitter-major-mode>`__.

[2] OCaml support written by `Pixie Dust <https://github.com/PizieDust>`__, `Tim McGilchrist <https://github.com/tmcgilchrist>`__ & `Xavier Van de Woestyne <https://github.com/xvw>`__.

Recent Changes / What's New
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -225,7 +229,9 @@ Note that this example uses ``major-mode-remap-alist`` to turn your regular majo
(toml . ("https://github.com/tree-sitter/tree-sitter-toml" "v0.5.1"))
(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "tsx/src"))
(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "typescript/src"))
(yaml . ("https://github.com/ikatyang/tree-sitter-yaml" "v0.5.0"))))
(yaml . ("https://github.com/ikatyang/tree-sitter-yaml" "v0.5.0"))
(ocaml . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/ocaml/src"))
(ocaml_interface . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/interface/src"))))
(add-to-list 'treesit-language-source-alist grammar)
;; Only install `grammar' if we don't already have it
;; installed. However, if you want to *update* a grammar then
Expand Down
Loading