haskell-ts-mode.el
changeset 1 27f2627e9f2f
parent 0 4d355b59e2a3
child 2 9272314a1c65
equal deleted inserted replaced
0:4d355b59e2a3 1:27f2627e9f2f
   335 		 (treesit-node-type (treesit-node-parent node))))
   335 		 (treesit-node-type (treesit-node-parent node))))
   336       (setq node (treesit-node-parent node)))
   336       (setq node (treesit-node-parent node)))
   337     (indent-region (treesit-node-start node) (treesit-node-end node))))
   337     (indent-region (treesit-node-start node) (treesit-node-end node))))
   338 
   338 
   339 (defvar haskell-ts-mode-map
   339 (defvar haskell-ts-mode-map
   340   (let ((km (make-sparse-keymap)))
   340   (define-keymap
   341     (define-key km (kbd "C-c C-c") 'haskell-ts-compile-region-and-go)
   341     "C-c C-c" 'haskell-ts-compile-region-and-go
   342     (define-key km (kbd "C-c C-r") 'haskell-ts-run-haskell)
   342     "C-c C-r" 'haskell-ts-run-haskell
   343     (define-key km (kbd "C-M-q") 'haskell-ts-indent-defun) ; For those who don't have emacs 30
   343     "C-M-q" 'haskell-ts-indent-defun)
   344     km)
       
   345   "Map for haskell-ts-mode.")
   344   "Map for haskell-ts-mode.")
   346 
   345 
   347 ;;;###autoload
   346 ;;;###autoload
   348 (define-derived-mode haskell-ts-mode prog-mode "haskell ts mode"
   347 (define-derived-mode haskell-ts-mode prog-mode "haskell ts mode"
   349   "Major mode for Haskell files using tree-sitter."
   348   "Major mode for Haskell files using tree-sitter."