Skip to content

Instantly share code, notes, and snippets.

View ubolonton's full-sized avatar
🛠️

Tuấn-Anh Nguyễn ubolonton

🛠️
View GitHub Profile
@ubolonton
ubolonton / init.el
Last active October 14, 2020 10:38
Minimal ~/.emacs.d/init.el with tree-sitter setup through straight.el
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
@ubolonton
ubolonton / init.el
Created October 26, 2020 11:51
Minimal ~/.emacs.d/init.el with tree-sitter setup through MELPA
(require 'package)
(dolist (source '(("melpa" . "https://melpa.org/packages/")))
(add-to-list 'package-archives source t))
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(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))