Update READMEs & add new ones
This commit is contained in:
parent
9d1af37dee
commit
e1f60b2bfd
13 changed files with 529 additions and 92 deletions
|
@ -1,29 +1,51 @@
|
|||
* C/C++/Obj-C
|
||||
* :lang cc
|
||||
|
||||
I use C/C++ mostly for developing games. To that end, this module leverages the
|
||||
[[https://github.com/Sarcasm/irony-mode][irony plugin]] for auto-completion, eldoc documentation and syntax checking (with
|
||||
flycheck).
|
||||
This module adds support for the C-family of languages: C, C++, and Objective-C.
|
||||
|
||||
Though it provides Objective-C support, I don't use it except to inspect
|
||||
generated glue code for iOS mobile apps.
|
||||
+ Code completion (~company-irony~)
|
||||
+ eldoc support (~irony-eldoc~)
|
||||
+ Syntax-checking (~flycheck-irony~)
|
||||
+ Code navigation (~irony~)
|
||||
+ File Templates ([[../../feature/file-templates/templates/c-mode][c-mode]], [[../../feature/file-templates/templates/c++-mode][c++-mode]])
|
||||
+ Snippets ([[https://github.com/hlissner/emacs-snippets/tree/master/cc-mode][cc-mode]], [[https://github.com/hlissner/emacs-snippets/tree/master/c-mode][c-mode]], [[https://github.com/hlissner/emacs-snippets/tree/master/c++-mode][c++-mode]])
|
||||
|
||||
+ Snippets ([[https://github.com/hlissner/emacs-snippets/tree/master/c-mode][c-mode]], [[https://github.com/hlissner/emacs-snippets/tree/master/c++-mode][c++-mode]])
|
||||
+ File templates ([[../../feature/file-templates/templates/c-mode][c-mode]], [[../../feature/file-templates/templates/c++-mode][c++-mode]])
|
||||
#+begin_quote
|
||||
C contends with Haskell and Ruby for my favorite language. It's hard to beat this combination of simplicity and power. I've used C for my work since 2009, and it (along with C++) is a personal favorite for game development (with SDL, SFML or, more recently, cocos2d).
|
||||
|
||||
** Installation
|
||||
~irony-server~ is required to use irony-mode's features auto-completion (among
|
||||
other things).
|
||||
The module provides nominal support for Objective-C, which I really only use to inspect generated glue code for iOS mobile apps. Otherwise, I prefer Swift.
|
||||
#+end_quote
|
||||
|
||||
To install it, run ~M-x irony-install-server~, which requires ~cmake~ and
|
||||
~libclang~.
|
||||
** Install
|
||||
This module requires ~irony-server~ for most of its features, which depends on ~cmake~ and ~libclang~.
|
||||
|
||||
*** MacOS
|
||||
Due to linking issues, MacOS users must compile irony-server manually:
|
||||
|
||||
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
|
||||
brew install cmake
|
||||
brew install llvm # 1gb+ installer: may take a while!
|
||||
brew install llvm # 1gb+ installation! May take a while!
|
||||
|
||||
git clone https://github.com/Sarcasm/irony-mode irony-mode
|
||||
mkdir irony-mode/server/build
|
||||
pushd irony-mode/server/build
|
||||
|
||||
DEST="$HOME/.emacs.d/.local/$(hostname)/etc/irony-server/"
|
||||
cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="$DEST" ../
|
||||
cmake --build . --use-stderr --config Release --target install
|
||||
|
||||
install_name_tool -change @rpath/libclang.dylib \
|
||||
/usr/local/opt/llvm/lib/libclang.dylib \
|
||||
"$DEST/bin/irony-server"
|
||||
|
||||
# cleanup
|
||||
popd
|
||||
rm -rf irony-mode
|
||||
#+END_SRC
|
||||
|
||||
*** Arch Linux
|
||||
#+BEGIN_SRC sh :tangle (if (doom-system-os 'arch) "yes")
|
||||
sudo pacman --needed --noconfirm -S clang cmake
|
||||
#+END_SRC
|
||||
|
||||
Then run ~M-x irony-install-server~ in Emacs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue