LSP & Hoc mode
This commit is contained in:
22
hoc-mode.el
Normal file
22
hoc-mode.el
Normal 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
|
||||
Reference in New Issue
Block a user