emacs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. (require 'package)
  2. (add-to-list 'package-archives
  3. '("melpa" . "https://melpa.org/packages/"))
  4. (when (< emacs-major-version 24)
  5. ;; For important compatibility libraries like cl-lib
  6. (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
  7. (package-initialize)
  8. (custom-set-variables
  9. ;; custom-set-variables was added by Custom.
  10. ;; If you edit it by hand, you could mess it up, so be careful.
  11. ;; Your init file should contain only one such instance.
  12. ;; If there is more than one, they won't work right.
  13. '(inhibit-startup-screen t)
  14. '(package-selected-packages (quote (flycheck use-package))))
  15. (custom-set-faces
  16. ;; custom-set-faces was added by Custom.
  17. ;; If you edit it by hand, you could mess it up, so be careful.
  18. ;; Your init file should contain only one such instance.
  19. ;; If there is more than one, they won't work right.
  20. )
  21. (use-package flycheck
  22. :ensure t
  23. :init (global-flycheck-mode))
  24. (flycheck-define-checker vhdl-tool
  25. "A VHDL syntax checker, type checker and linter using VHDL-Tool.
  26. See URL `http://vhdltool.com'."
  27. :command ("vhdl-tool" "client" "lint" "--compact" "--stdin" "-f" source
  28. )
  29. :standard-input t
  30. :error-patterns
  31. ((warning line-start (file-name) ":" line ":" column ":w:" (message) line-end)
  32. (error line-start (file-name) ":" line ":" column ":e:" (message) line-end))
  33. :modes (vhdl-mode))
  34. (add-to-list 'flycheck-checkers 'vhdl-tool)