suoto / hdl_checker

Repurposing existing HDL tools to help writing better code
GNU General Public License v3.0
192 stars 22 forks source link

Added to Emacs lsp-mode #62

Closed chrbirks closed 4 years ago

chrbirks commented 4 years ago

Just a FYI. I added support for HDL Checker to the Emacs package lsp-mode: https://github.com/emacs-lsp/lsp-mode/pull/1167 So it is now easy to just add the following to your Emacs config. Setting the server path is only required if the server binary is not in your PATH

(require 'use-package)
(setq lsp-vhdl-server-path "~/.local/bin/hdl_checker")
(custom-set-variables
 '(lsp-vhdl-server 'hdl-checker))
(use-package lsp-mode
         :config (add-hook 'vhdl-mode-hook 'lsp))
suoto commented 4 years ago

That's great, thanks! :)

Would be nice to add this to the editors support section on the readme, but I'm not familiar with emacs at all. Maybe adding this bit and referencing emacs-lsp/lsp-mode enough?

(require 'use-package)
(setq lsp-vhdl-server-path "~/.local/bin/hdl_checker")
(custom-set-variables
 '(lsp-vhdl-server 'hdl-checker))
(use-package lsp-mode
       :config (add-hook 'vhdl-mode-hook 'lsp))
chrbirks commented 4 years ago

Yes that should be enough. It requires that use-package is already installed but it's already pretty common.

chrbirks commented 4 years ago

Well the code was just reverted but it will be back again once I have fixed a problem :)

suoto commented 4 years ago

Ok, no worries. The readme has the section marked as "soon", will remove once the emacs-lsp is OK!

chrbirks commented 4 years ago

The problem has been fixed and merged into the lsp-mode package again.