An Emacs major-mode for syntax highlighting wk's .wks
files.
If you are on Emacs 29 and newer, you can use
package-vc-install:
(package-vc-install
'(wks-mode . (:url "https://github.com/3L0C/wks-mode")))vc-use-package provides use-package integration, if that's your thing.
(use-package wks-mode
:vc (:fetcher github :repo 3L0C/wks-mode))Alternatively, if you're on Emacs 30,
a :vc keyword is built into use-package:
(use-package wks-mode
:vc (:url "https://github.com/3L0C/wks-mode" :rev :newest))Copy wks-mode.el into a directory within your load-path
and require it. For example, assuming that this file was
placed within the ~/.config/emacs/elisp directory:
(add-to-list 'load-path "~/.config/emacs/elisp/")
(require 'wks-mode)If you use use-package, you can express the above as
(use-package wks-mode
:load-path "~/.config/emacs/elisp/")If you use Spacemacs, add
the following in the dotspacemacs-additional-packages
section:
(wks-mode
:location
(recipe
:fetcher github
:repo "3L0C/wks-mode"))If you use Doom
Emacs,
add the followings in the packages.el and config.el,
respectively.
(package! wks-mode
:recipe (:host github
:repo "3L0C/wks-mode"))(use-package! wks-mode)wks-mode does not configure auto-pairing to avoid conflicts with user
preferences. To enable auto-pairing for <> (used in key options), add
one of the following to your configuration:
(add-hook 'wks-mode-hook
(lambda ()
(setq-local electric-pair-pairs
(append electric-pair-pairs '((?< . ?>))))))(sp-local-pair 'wks-mode "<" ">")My thanks to
- Xah Lee who showed me how to create a major mode package with his tutorial.
- The zig-mode devs for their very readable major mode.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.