Skip to content

Commit

Permalink
Split into 3 melpa packages
Browse files Browse the repository at this point in the history
  • Loading branch information
LefterisJP committed Nov 17, 2018
1 parent 62c8495 commit 6379ad9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
14 changes: 13 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion company-solidity.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion solidity-flycheck.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
;; Copyright (C) 2015-2018 Lefteris Karapetsas

;; Author: Lefteris Karapetsas <[email protected]>
;; 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
Expand Down
9 changes: 1 addition & 8 deletions solidity-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Copyright (C) 2015-2018 Lefteris Karapetsas

;; Author: Lefteris Karapetsas <[email protected]>
;; Keywords: languages
;; Keywords: languages, solidity
;; Version: 0.1.9

;; This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -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

0 comments on commit 6379ad9

Please sign in to comment.