lsp-init.el 1.2 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. (add-to-list 'load-path "~/.emacs.d/lsp-mode")
  25. (with-eval-after-load 'lsp-mode
  26. (require 'lsp-flycheck))
  27. (require 'lsp-mode)
  28. (add-hook 'vhdl-mode-hook #'lsp-mode)
  29. (lsp-define-stdio-client 'vhdl-mode "VHDL" 'stdio (lsp-make-traverser "vhdltool-config.yaml")
  30. "VHDL Language Server"
  31. '("vhdl-tool" "lsp"))
  32. (provide 'lsp-vhdl)