diff --git a/README.org b/README.org index bb6e39e..38f4120 100644 --- a/README.org +++ b/README.org @@ -76,6 +76,13 @@ with solium >= =v0.2.0= You have to specifically set the path to both executables and activate the checker integration by setting the following: +To activate flycheck you need the =solidity-flycheck= package and to add this in your +emacs file: + +#+BEGIN_SRC emacs-lisp +(require 'solidity-flycheck) +#+END_SRC + To activate =solc= checker #+BEGIN_SRC emacs-lisp (setq solidity-flycheck-solc-checker-active t) @@ -121,7 +128,12 @@ of the solc checker after which solium will not run. If =t= is given solium will if anything over than a warning is found in solc solium will not run. ** [Optional] Autocompletion -[[https://github.com/ssmolkin1/company-solidity][company-solidity]], a simple [[http://company-mode.github.io/][company-mode]] back-end for Solidity, has now been fully integrated into solidity-mode. You no longer need to install company-solidity separately from solidity-mode, nor should you do so. To take advantage of the autocompletion features, you must have the [[http://company-mode.github.io/][company-mode]] package installed. The autocompletion features will be enabled automatically if you have company-mode installed. +To achieve solidity autcompletion you will need the =company-solidity= package, a simple [[http://company-mode.github.io/][company-mode]] back-end for Solidity. +To use it make sure that company-mode is installed and then: + +#+BEGIN_SRC emacs-lisp +(require 'company-solidity) +#+END_SRC *** What it does Give completion suggestions for Solidity keywords, global variables, and address methods. diff --git a/company-solidity.el b/company-solidity.el index 80695df..04e43f2 100644 --- a/company-solidity.el +++ b/company-solidity.el @@ -6,7 +6,7 @@ ;; URL: https://github.com/ethereum/emacs-solidity ;; Keywords: solidity, completion, company ;; Version: 2.0.0 -;; Package-Requires: ((company "0.9.0") (cl-lib "0.5.0")) +;; Package-Requires: ((company "0.9.0") (cl-lib "0.5.0") (solidity-mode "0.1.9")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by diff --git a/solidity-flycheck.el b/solidity-flycheck.el index c68ff39..811e13d 100644 --- a/solidity-flycheck.el +++ b/solidity-flycheck.el @@ -3,7 +3,9 @@ ;; Copyright (C) 2015-2018 Lefteris Karapetsas ;; Author: Lefteris Karapetsas -;; Keywords: languages +;; Keywords: languages, solidity, flycheck +;; Version: 0.1.0 +;; Package-Requires: ((flycheck "32-cvs") (solidity-mode "0.1.9")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by diff --git a/solidity-mode.el b/solidity-mode.el index d72dd26..1d14bda 100644 --- a/solidity-mode.el +++ b/solidity-mode.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2015-2018 Lefteris Karapetsas ;; Author: Lefteris Karapetsas -;; Keywords: languages +;; Keywords: languages, solidity ;; Version: 0.1.9 ;; This program is free software; you can redistribute it and/or modify @@ -529,13 +529,6 @@ Cursor must be at the function's name. Does not currently work for constructors ;; set hooks (run-hooks 'solidity-mode-hook)) -;;; --- interface with flycheck if existing --- -(when (require 'flycheck nil 'noerror) - (require 'solidity-flycheck)) - -;;; --- autcompletion back-end for company-mode, loads if company mode is installed --- -(when (require 'company nil 'noerror) - (require 'company-solidity)) (provide 'solidity-mode) ;;; solidity-mode.el ends here