You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 line
1.8 KiB

  1. ((nil . ((eval . (progn
  2. (defvar context-mode-map (make-sparse-keymap)
  3. "Keymap while context-mode is active.")
  4. (define-minor-mode context-mode
  5. "A temporary minor mode to be activated only specific to a buffer."
  6. nil
  7. :lighter " [f2]-Context"
  8. context-mode-map)
  9. (context-mode 1)
  10. (defun start-debugger ()
  11. (async-shell-command
  12. (concat
  13. "cdbg64.exe" " -t "
  14. (expand-windows-path (concat (projectile-project-root)
  15. "bin/slime.exe")))))
  16. (defhydra hydra-context (context-mode-map "<f2>")
  17. "Context Actions:"
  18. ("b" save-and-find-build-script-and-compile "build" :color blue)
  19. ("d" start-debugger "debug" :color blue)
  20. ("o" browse-file-directory "open" :color blue)
  21. ("q" nil "quit" :color blue))
  22. (define-key context-mode-map (kbd "<f2>") 'hydra-context/body)
  23. (font-lock-add-keywords
  24. 'c++-mode
  25. '(("\\<\\(if_debug\\|if_windows\\|if_linux\\|defer\\|proc\\|try\\|try_void\\|for_array_list\\|for_lisp_vector\\|in_caller_env\\|for_lisp_list\\|ignore_logging\\|dont_break_on_errors\\)\\>" .
  26. font-lock-keyword-face)))))))
  27. (c++-mode . ((eval . (company-clang-set-prefix "slime.h"))
  28. (eval . (flycheck-mode 0))
  29. (eval . (rainbow-mode 0))
  30. (eval . (setq c-backslash-max-column 99))
  31. )))