All Projects → purescript-emacs → Psc Ide Emacs

purescript-emacs / Psc Ide Emacs

Licence: gpl-3.0
Emacs integration for PureScript's psc-ide tool.

Programming Languages

purescript
368 projects

Projects that are alternatives of or similar to Psc Ide Emacs

Swift Mode
Emacs support for Apple's Swift programming language.
Stars: ✭ 308 (+136.92%)
Mutual labels:  emacs, emacs-mode
Nyan Mode
Nyan Cat for Emacs! Nyanyanyanyanyanyanyanyanyan!
Stars: ✭ 590 (+353.85%)
Mutual labels:  emacs, emacs-mode
Writegood Mode
Minor mode for Emacs to improve English writing
Stars: ✭ 369 (+183.85%)
Mutual labels:  emacs, emacs-mode
Zoom
Fixed and automatic balanced window layout for Emacs
Stars: ✭ 252 (+93.85%)
Mutual labels:  emacs, emacs-mode
Fingers.el
Modal editing minor mode for Emacs
Stars: ✭ 51 (-60.77%)
Mutual labels:  emacs, emacs-mode
Spiral
Emacs Clojure IDE based on UNREPL
Stars: ✭ 146 (+12.31%)
Mutual labels:  ide, emacs
Deft
Deft for Emacs
Stars: ✭ 521 (+300.77%)
Mutual labels:  emacs, emacs-mode
Portacle
A portable common lisp development environment
Stars: ✭ 494 (+280%)
Mutual labels:  ide, emacs
Acejump
🅰️ single character search, select, and jump
Stars: ✭ 786 (+504.62%)
Mutual labels:  ide, emacs
Clj Refactor.el
A collection of Clojure refactoring functions for Emacs
Stars: ✭ 694 (+433.85%)
Mutual labels:  emacs, emacs-mode
Live Py Plugin
Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
Stars: ✭ 222 (+70.77%)
Mutual labels:  emacs, emacs-mode
Jq Mode
Emacs major mode for editing jq queries.
Stars: ✭ 70 (-46.15%)
Mutual labels:  emacs, emacs-mode
Org Msg
OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
Stars: ✭ 153 (+17.69%)
Mutual labels:  emacs, emacs-mode
Lpy
Minimal Python IDE for GNU Emacs
Stars: ✭ 161 (+23.85%)
Mutual labels:  ide, emacs
Cmake Ide
Use Emacs as a C/C++ IDE
Stars: ✭ 661 (+408.46%)
Mutual labels:  ide, emacs
Webpaste.el
webpaste.el can paste whole buffers or parts of buffers to several pastebin-like services and supports failover if one service fails.
Stars: ✭ 67 (-48.46%)
Mutual labels:  emacs, emacs-mode
Emacs Solidity
The official solidity-mode for EMACS
Stars: ✭ 120 (-7.69%)
Mutual labels:  emacs, emacs-mode
Brackets Portable
Windows portable version of adobe brackets web development editor.
Stars: ✭ 124 (-4.62%)
Mutual labels:  ide
Monaco Ide Font
〽️ Patched Monaco font for use in popular IDEs and editors
Stars: ✭ 127 (-2.31%)
Mutual labels:  ide
Wgeecn
Writing GNU Emacs Extensions 翻译
Stars: ✭ 124 (-4.62%)
Mutual labels:  emacs

[[http://melpa.org/#/psc-ide][file:http://melpa.org/packages/psc-ide-badge.svg]]

  • psc-ide-emacs

    Emacs integration for [[https://github.com/purescript/purescript/tree/master/psc-ide][psc-ide]]

** Installation

The package is available on [[http://melpa.org/#/psc-ide][MELPA]]. Please read the MELPA's [[http://melpa.org/#/getting-started][Getting Started]] guide for more information. Once you have MELPA configured install psc-ide-emacs via =package.el=:

#+BEGIN_SRC elisp M-x package-install RET psc-ide RET #+END_SRC

** Configuration

Add the following to your =~/.emacs=:

#+BEGIN_SRC elisp

(require 'psc-ide)

(add-hook 'purescript-mode-hook (lambda () (psc-ide-mode) (company-mode) (flycheck-mode) (turn-on-purescript-indentation))) #+END_SRC

If you want to use the psc-ide server that is relative to your npm bin directory, e.g. ./node_modules/.bin/purs, add this line to your config:

#+BEGIN_SRC elisp (setq psc-ide-use-npm-bin t) #+END_SRC

If you would like to use a custom codegen target for your rebuild. (default is "js")

There is a psc-ide-codegen option that can be set globally in your user config:

#+BEGIN_SRC elisp (setq psc-ide-codegen '("corefn")) #+END_SRC

or in specific files by addind this to the top of file:

#+BEGIN_SRC elisp -- -- psc-ide-codegen: ("corefn") -- #+END_SRC

** Usage

*** Start the Server C-c C-s

*** Load all the modules C-c C-l This isn't usually necessary, as the start server command sends a load all command after starting the server. *** Get completions from the modules you imported while you type (through company-mode) [[http://i.imgur.com/8WnRh0s.gif]]

*** Get completions from all modules in your project with company-complete This was bound to C-SPC in earlier versions but was too intrusive for usual emacs users so you'll have to bind it to a key of choice.

eg. ~(global-set-key (kbd "C-SPC") 'company-complete)~

[[http://i.imgur.com/LR69MdN.gif]]

*** Show type for identifier under cursor C-c C-t [[http://i.imgur.com/A8cXe9t.gif]]

Prepending the universal argument expands type synonyms in the displayed
type.

For example:
~C-c C-t~ might return ~getName :: Person -> String~

If ~Person~ is a type synonym for a record you can use the universal
argument to inspect that record:

~C-u C-c C-t~ will then return ~getName :: { name :: String, age :: Int } ->
String~

*** Go to definition =M-.= You can use M-, to jump back to where you came from . If your sourcefiles are not captured by the default globs you can add a .dir-locals.el file to the root of your project, like so:

#+BEGIN_SRC elisp
  ((purescript-mode
    . ((psc-ide-source-globs
        . ("src/**/*.purs" "test/**/*.purs" "examples/**/*.purs")))))
#+END_SRC
Modify the globs accordingly and don't worry about dependency
globs for bower, psc-package or spago projects. The plugin picks
these up by default. Check the doc-string for
`psc-ide-source-globs` for some advanced options.

*** Add an import for the identifier under cursor C-c C-i

If the import is ambiguous you will get a selection of modules, from which
you can choose the identifier you want.

[[http://i.imgur.com/VBXDvPg.gif]]

*** Add an import on completion (turned on by default) Can be turned off with: #+BEGIN_SRC elisp (customize-set-variable 'psc-ide-add-import-on-completion nil) #+END_SRC

[[http://i.imgur.com/r6rl2lT.gif]]

*** Case Split the given type under cursor C-c C-c [[http://i.imgur.com/hTnHxhK.gif]] *** Add a clause for the function definition under cursor C-c C-a [[http://i.imgur.com/VNeC3z8.gif]]

*** Rebuild the current module and get quick error reporting C-c C-b If you set (customize-set-variable 'psc-ide-rebuild-on-save t) psc-ide will try to rebuild your module on every save.

[[http://i.imgur.com/c0L6C4B.gif]]

*** Flycheck Support **** Ignore certain errors or warnings This is determined by the variable psc-ide-flycheck-ignored-error-codes. It can be configured with customize-option or similar methods.

**** Insert suggestion from error C-c M-s When the cursor is placed over an error that includes suggestion information, use C-c M-s to apply the suggestion.

*** Keybindings

| Key | Function | |-------------+--------------------------------------| | C-c C-s | psc-ide-server-start | | C-c C-q | psc-ide-server-quit | | C-c C-t | psc-ide-show-type | | C-c C-i | psc-ide-add-import | | C-c C-a | psc-ide-add-clause | | C-c C-c | psc-ide-case-split | | C-c C-l | psc-ide-load-all | | C-c C-b | psc-ide-rebuild | | C-c C-S-l | psc-ide-load-module | | C-c M-s | psc-ide-flycheck-insert-suggestion |

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].