Last active
December 1, 2021 16:19
-
-
Save ubolonton/07426a107aca7bb6e31b18d3669679bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'tree-sitter) | |
(require 'tree-sitter-hl) | |
(defvar ppl--base-dir | |
(file-name-directory load-file-name) | |
"Directory containing this file.") | |
(define-derived-mode ppl-mode prog-mode "PPL" | |
"Major mode for editing PPL files." | |
(setq tree-sitter-language (tree-sitter-require 'ppl)) | |
(setq tree-sitter-hl-default-patterns | |
(with-temp-buffer | |
(insert-file-contents (concat ppl--base-dir "queries/highlights.scm")) | |
(buffer-string)))) | |
;;;###autoload | |
(progn | |
(add-to-list 'auto-mode-alist '("\\.ppl\\'" . ppl-mode))) | |
(provide 'ppl-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment