LSP & Hoc mode

This commit is contained in:
2021-09-25 16:01:58 -04:00
parent dc4e0cee30
commit 2e0f092206
4 changed files with 69 additions and 25 deletions

22
hoc-mode.el Normal file
View File

@@ -0,0 +1,22 @@
;;; hoc-mode.el -- mode for editing NEURON hox files
(setq hoc-mode-keywords "proc\\|objref\\|create\\|public\\|begintemplate\\|endtemplate\\|access\\|if\\|for")
(setq hoc-mode-highlights
'(
( "//.*" . font-lock-comment-face)
( hoc-mode-keywords . font-lock-keyword-face)
( "[a-z0-9A-Z_]+?[ \n\t]*\\((\\)" . font-lock-function-name-face)
)
)
(define-derived-mode hoc-mode
prog-mode "hoc"
"Major mode for NEURON Hoc."
(setq comment-start "//")
(setq font-lock-defaults '(hoc-mode-highlights))
)
(provide 'hoc-mode)
;;; hoc-mode.el ends here