-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More logical split of concerns into files. Initial work on #1, might
be removed if I don't get it working.
- Loading branch information
Showing
2 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
;; Package-Requires: ((emacs "25.1") (lsp-mode "8.0.0") (tree-sitter "0.12.0")) | ||
|
||
(define-derived-mode m68k-mode | ||
asm-mode "m68k-mode" | ||
"Mode for programming Motorola 68k processors with automatic lsp activation") | ||
|
||
|
||
;; tree sitter for better syntax highlight | ||
;; requires https://github.com/grahambates/tree-sitter-m68k | ||
;; TODO: setup method for tree-sitter-m68k? | ||
;; TODO: any way we can make this optional if grammar not installed? | ||
(add-to-list 'tree-sitter-major-mode-language-alist '(m68k-mode . m68k)) | ||
|
||
(defcustom m68k-tree-sitter-enabled nil | ||
"Turns on tree-sitter mode for better syntax highlighting. Requires you to set up tree-sitter-m68k and tree-sitter mode.") | ||
|
||
;; TODO: other utilities? | ||
|
||
(defun m68k-setup-tree-sitter () | ||
(when m68k-tree-sitter-enabled | ||
(require 'tree-sitter) | ||
(tree-sitter-hl-mode 1))) | ||
|
||
(add-to-list 'm68k-mode-hook #'m68k-setup-tree-sitter) | ||
|
||
|
||
(require 'lsp-m68k) | ||
;;(require 'dap-m68k) | ||
|
||
(provide 'm68k-mode) |