Standardize module READMEs

This commit is contained in:
Henrik Lissner 2017-08-21 20:07:07 +02:00
parent b7d0f4dc3f
commit cbabf6849c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
16 changed files with 281 additions and 186 deletions

View file

@ -1,4 +1,4 @@
* :lang cc
#+TITLE: :lang cc
This module adds support for the C-family of languages: C, C++, and Objective-C.
@ -8,17 +8,23 @@ This module adds support for the C-family of languages: C, C++, and Objective-C.
+ 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]])
+ Several improvements to C++11 indentation and syntax highlighting.
#+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).
C contends with Haskell and Ruby for my favorite language. That said, it's more accurate to say I write C, but with two or three C++ features.
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
** Install
* Table of Contents :TOC:
- [[#install][Install]]
- [[#macos][MacOS]]
- [[#arch-linux][Arch Linux]]
* Install
This module requires ~irony-server~ for most of its features, which depends on ~cmake~ and ~libclang~.
*** MacOS
** MacOS
Due to linking issues, MacOS users must compile irony-server manually:
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
@ -43,9 +49,10 @@ popd
rm -rf irony-mode
#+END_SRC
*** Arch Linux
** 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.

View file

@ -1,4 +1,4 @@
* :lang go
#+TITLE: :lang go
This module adds [[https://golang.org][Go]] support.
@ -13,12 +13,18 @@ This module adds [[https://golang.org][Go]] support.
+ [[https://github.com/hlissner/emacs-snippets/tree/master/go-mode][Snippets]]
#+begin_quote
I have mixed feelings about Go. It's a decent compromise between C and higher-level languages. It's a pleasantly straight-forward language with elegant syntax, but it lacks /native/ support for certain luxuries I miss from other languages, like generics, optional arguments, and function overloading. You've got to learn to love ~interface{}~.
I have mixed feelings about Go. It's a decent compromise between C and higher-level languages, is pleasantly straight-forward and elegant, but lacks /native/ support for luxuries I miss from other languages, like generics, optional arguments, and function overloading. You've got to learn to love ~interface{}~.
Still, Go has been a remarkably useful (and fast!) companion for a variety of small-to-medium backend web and CLI projects.
#+end_quote
** Install
* Table of Contents :TOC:
- [[#install][Install]]
- [[#go][Go]]
- [[#dependencies][Dependencies]]
* Install
** Go
To get started with Go, you need the ~go~ tool:
*** MacOS

View file

@ -1,4 +1,4 @@
* :lang haskell
#+TITLE: :lang haskell
This module adds [[https://www.haskell.org/][Haskell]] support.
@ -11,52 +11,55 @@ This module adds [[https://www.haskell.org/][Haskell]] support.
+ [[https://github.com/hlissner/emacs-snippets/tree/master/haskell-mode][Snippets]]
#+begin_quote
Haskell contends with C and Ruby as my favorite language. I don't think my Haskell code will ever save the world, but I'll reach for it when working on smaller projects and programming exercises (like projecteuler.com or exercism.io).
Haskell contends with C and Ruby as my favorite language. I don't think my Haskell code will ever save the world, but I'll reach for it for small projects and programming exercises (like projecteuler.com or exercism.io).
I'd love to incorporate more of it into my machine learning work, but Python and Julia hold that crown. For now.
#+end_quote
** Install
To get started with Haskell, you need:
* Table of Contents :TOC:
- [[#install][Install]]
- [[#haskell][Haskell]]
- [[#dependencies][Dependencies]]
- [[#troubleshooting][Troubleshooting]]
- [[#resources][Resources]]
+ cabal (the haskell package builder)
+ ghc/ghci (the compiler, syntax checker & repl)
* Install
** Haskell
To get started with Haskell, you need *stack* installed.
*** MacOS
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
brew install cabal-install ghc
brew install haskell-stack
stack setup
#+END_SRC
*** Arch Linux
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
sudo pacman --needed --noconfirm -S cabal-install ghc
sudo pacman --needed --noconfirm -S stack
# Replace pacaur with your AUR package manager of choice
pacaur --needed --noconfirm -S ncurses5-compat-lib
stack setup
#+END_SRC
** Dependencies
This module requires the following ~cabal~ packages:
+ ~happy~ (required by ~haskell-src-exts~)
+ ~haskell-src-exts~ (required by ~ghc-mod~ & ~hoogle~)
+ ~ghc-mod~ (for auto-completion)
+ ~hoogle~ (for documentation lookup)
This module requires ~ghc-mod~ (as well as ~intero~, but those will be automatically installed).
#+BEGIN_SRC sh
cabal update
cabal install happy haskell-src-exts ghc-mod hoogle
stack install ghc-mod
#+END_SRC
Ensure that ~\~/.cabal/bin~ is in ~PATH~:
Also ensure that ~\~/.local/bin~ is in ~PATH~:
#+BEGIN_SRC sh
# place this in your profile file, like ~/.bash_profile or ~/.zshenv
export PATH="~/.cabal/bin:$PATH"
export PATH="~/.local/bin:$PATH"
#+END_SRC
** Troubleshooting
* Troubleshooting
+ Stack users: if a ~dist/setup-config~ file exists in your project, [[ https://github.com/DanielG/ghc-mod/wiki#known-issues-related-to-stack][ghc-mod may
refuse to work]].
** Resources
* Resources
Here are a few resources I've found indespensible in my Haskell adventures:
+ [[http://learnyouahaskell.com/][Learn you a haskell for great good]]

View file

@ -1,4 +1,4 @@
* :lang php
#+TITLE: :lang php
This module adds support for PHP 5.3+ (including PHP7).
@ -12,14 +12,18 @@ This module adds support for PHP 5.3+ (including PHP7).
+ [[https://github.com/hlissner/emacs-snippets/tree/master/php-mode][Snippets]]
#+begin_quote
PHP was the first programming language I got paid to code in, back in the Cretaceous period (2003). I'm so, so sorry. All those programmers who inherited my earliest PHP work. I know you're out there, writhing in your straitjackets.
I suppose it's hip for programmers to projectile vomit to any mention of PHP, but they have good reason to. Not because it's /necessarily/ a bad language, and not /just/ because of a couple inconsistently ordered parameters, but because it's too easy to make junk with. You've heard the war stories.
PHP was the first programming language I got paid to code in, back in the Cretaceous period (2003). My sincerest apologies go out to all the programmers who inherited my earliest PHP work. I know you're out there, writhing in your straitjackets.
Save a programmer today. Stop a friend from choosing PHP as their first language.
#+end_quote
** Install
* Table of Contents :TOC:
- [[#install][Install]]
- [[#php][PHP]]
- [[#dependencies][Dependencies]]
* Install
** PHP
To get started with PHP, you'll need ~php~ (5.3+) and ~composer~:
*** MacOS
@ -37,7 +41,7 @@ sudo pacman --needed --noconfirm -S php composer # or php53, php54, php55
#+END_SRC
** Dependencies
The features in this module optionally depends on the following php packages:
The features in this module optionally depend on the following php packages:
+ ~boris~ (REPL)
+ ~phpctags~ (better code completion)

View file

@ -1,4 +1,4 @@
* :lang rest
#+TITLE: :lang rest
This module adds [[https://en.wikipedia.org/wiki/Representational_state_transfer][REST]] support.
@ -10,10 +10,14 @@ This module adds [[https://en.wikipedia.org/wiki/Representational_state_transfer
~restclient-mode~ is tremendously useful for testing REST APIs. My workflow is to open an ~org-mode~ buffer, create a restclient source block and hack away. ~restclient-mode~ and ~company-restclient~ power this arcane wizardry.
#+end_quote
** Install
* Table of Contents :TOC:
- [[#install][Install]]
- [[#example][Example]]
* Install
No additional setup required.
** Example
* Example
#+BEGIN_SRC restclient
GET https://jsonplaceholder.typicode.com/posts/1
#+END_SRC