From 56b4cba96422453016303eceb70a717336efcfab Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 7 Jun 2018 18:03:58 +0200 Subject: [PATCH] Fix solium error preventing solidity-mode #659 Now conditionally activates flycheckers using the existence of their binaries at load time. --- modules/lang/solidity/config.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/lang/solidity/config.el b/modules/lang/solidity/config.el index ae60beb06..860997c7f 100644 --- a/modules/lang/solidity/config.el +++ b/modules/lang/solidity/config.el @@ -5,17 +5,20 @@ ;; ;; `solidity-mode' -(setq solidity-comment-style 'slash - solidity-flycheck-solc-checker-active t - solidity-flycheck-solium-checker-active t) +(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)) - + :config + (setq flycheck-solidity-solc-addstd-contracts t) + (when (funcall flycheck-executable-find solidity-solc-path) + (add-to-list 'flycheck-checkers 'solidity-checker nil #'eq)) + (when (funcall flycheck-executable-find solidity-solium-path) + (add-to-list 'flycheck-checkers 'solium-checker nil #'eq))) + (def-package! company-solidity :when (featurep! :completion company)