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.
 
 
 
 

27 regels
1.1 KiB

  1. ;;-*-mode: emacs-lisp; coding: utf-8;-*-
  2. ;; flymake is old, lets use something better.
  3. (setq flycheck-indication-mode 'right-fringe)
  4. ;; Test out grizzl for completions.
  5. ;;(setq flycheck-select-checker 'grizzl)
  6. ;; Make flycheck able to parse CFLAGS from pkg-config
  7. (defun pkg-config-add-lib-cflags (pkg-config-lib)
  8. "This function will add necessary header file path of a
  9. specified by `pkg-config-lib' to `flycheck-clang-include-path', which make it
  10. completionable by auto-complete-clang"
  11. (interactive "spkg-config lib: ")
  12. (if (executable-find "pkg-config")
  13. (if (= (shell-command
  14. (format "pkg-config %s" pkg-config-lib))
  15. 0)
  16. (setq flycheck-clang-include-path
  17. (append flycheck-clang-include-path
  18. (split-string
  19. (shell-command-to-string
  20. (format "pkg-config --cflags-only-I %s"
  21. pkg-config-lib)))))
  22. (message "Error, pkg-config lib %s not found." pkg-config-lib))
  23. (message "Error: pkg-config tool not found.")))