diff --git a/modules/lang/solidity/config.el b/modules/lang/solidity/config.el index c8678ae10..653cdc6a0 100644 --- a/modules/lang/solidity/config.el +++ b/modules/lang/solidity/config.el @@ -4,25 +4,22 @@ ;; Plugins ;; -(def-package! solidity-mode - :mode "\\.sol$" - :init - (setq solidity-solc-path "~/.node_modules/lib/node_modules/solc/solcjs") - (setq solidity-solium-path "~/.node_modules/lib/node_modules/solium/bin/solium.js") +;; `solidity-mode' +(setq solidity-comment-style 'slash + solidity-flycheck-solc-checker-active t + solidity-flycheck-solium-checker-active t) - (setq solidity-flycheck-solc-checker-active t) - (setq solidity-flycheck-solium-checker-active t) - (setq flycheck-solidity-solc-addstd-contracts t) - :config - (setq solidity-comment-style 'slash)) +(def-package! solidity-flycheck ; included with solidity-mode + :when (featurep! :feature syntax-checker) + :after solidity-mode + :init (add-hook 'solidity-mode-hook #'flycheck-mode) + :config (setq flycheck-solidity-solc-addstd-contracts t) + (def-package! company-solidity :when (featurep! :completion company) :after solidity-mode :config - (add-hook 'solidity-mode-hook - (lambda () - (set (make-local-variable 'company-backends) - (append '((company-solidity company-capf company-dabbrev-code)) - company-backends))))) + (setq company-backends (delq 'company-solidity company-backends)) + (set! :company-backends 'solidity-mode 'company-solidity))