ethereum / emacs-solidity

The official solidity-mode for EMACS
GNU General Public License v3.0
206 stars 66 forks source link

Proper Integration with Irony Mode #23

Open ghost opened 6 years ago

ghost commented 6 years ago

I'm using irony-mode one of emacs plugin for C/C++ mode. Here are some lines from my emacs init file that hooks C/C++ mode with irony-mode.

(use-package irony                                                              
  :init                                                                         
  (add-hook 'c++-mode-hook 'irony-mode)                                         
  (add-hook 'c-mode-hook 'irony-mode) 
  ...)

When I open .sol file with emacs, I get these error messages.

Warning (irony): Major mode is unknown to Irony, see `irony-supported-major-mod\
es'.                                                                            
Warning (irony): Major mode is unknown to Irony, see `irony-supported-major-mod\
es'.   

How can I fix this without disabling the original hooks?

Thank you.

LefterisJP commented 6 years ago

Hey @pseohy

I am not using irony myself which is why I have not seen this. The warning appears to be harmless. You can even make it go away by adding this somewhere in your emacs file:

(push 'solidity-mode irony-supported-major-modes)

I am not sure what kind of integration we could have with irony so I will have to do some research when I find some time. Until then, I will leave this issue open.

tsuu32 commented 4 years ago

irony-mode (which uses libclang) doesn't support Solidity language obviously. The main issue was fixed by https://github.com/ethereum/emacs-solidity/pull/50.