Add flag to allow adding node_modules/.bin path to exec-path.
This is needed to get psc-ide working without installing purescript globally.
This commit is contained in:
parent
ea96c525e9
commit
9ceeec0aea
|
@ -1659,6 +1659,7 @@ Benner and Paweł Siudak):
|
||||||
**** Purescript
|
**** Purescript
|
||||||
- Enable =purescript-decl-scan-mode= when loading =purescript-mode= (thanks to
|
- Enable =purescript-decl-scan-mode= when loading =purescript-mode= (thanks to
|
||||||
Bjarke Vad Andersen)
|
Bjarke Vad Andersen)
|
||||||
|
- Allow adding node_modules/.bin path to exec-path (thanks to Anupam Jain)
|
||||||
**** Python
|
**** Python
|
||||||
- Various fixes in =pylookup.py= (thanks to ishestakov and Shitikanth Kashyap)
|
- Various fixes in =pylookup.py= (thanks to ishestakov and Shitikanth Kashyap)
|
||||||
- Hide =yapf-mode= modeline lighter (thanks to Robert ven der Helm)
|
- Hide =yapf-mode= modeline lighter (thanks to Robert ven der Helm)
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
- [[#install][Install]]
|
- [[#install][Install]]
|
||||||
- [[#configuration][Configuration]]
|
- [[#configuration][Configuration]]
|
||||||
- [[#add-import-on-completion][Add import on completion]]
|
- [[#add-import-on-completion][Add import on completion]]
|
||||||
|
- [[#node-modules][Node Modules]]
|
||||||
- [[#error-popup][Error popup]]
|
- [[#error-popup][Error popup]]
|
||||||
- [[#key-bindings][Key bindings]]
|
- [[#key-bindings][Key bindings]]
|
||||||
- [[#purescript][Purescript]]
|
- [[#purescript][Purescript]]
|
||||||
|
@ -39,6 +40,17 @@ can be found [[https://github.com/purescript/documentation/blob/master/guides/Ge
|
||||||
Set =purescript-add-import-on-completion= to nil to make =psc-ide= stop adding
|
Set =purescript-add-import-on-completion= to nil to make =psc-ide= stop adding
|
||||||
imports on completion. Default value is =t=.
|
imports on completion. Default value is =t=.
|
||||||
|
|
||||||
|
** Node Modules
|
||||||
|
If you would like =node_modules/.bin= to be automatically added to the buffer
|
||||||
|
local =exec_path=, e.g. to support project local purs/pulp installations, set the
|
||||||
|
=node-add-modules-path= variable in the =purescript= config section. Note that
|
||||||
|
doing this [[https://stackoverflow.com/questions/9679932#comment33532258_9683472][introduces a security risk]]:
|
||||||
|
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(setq-default dotspacemacs-configuration-layers
|
||||||
|
'((purescript :variables node-add-modules-path t)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Error popup
|
** Error popup
|
||||||
If you set =purescript-enable-rebuild-on-save= to non-nil, you will get a popup
|
If you set =purescript-enable-rebuild-on-save= to non-nil, you will get a popup
|
||||||
buffer showing you your current warnings/errors one at a time. This is primarily
|
buffer showing you your current warnings/errors one at a time. This is primarily
|
||||||
|
|
12
layers/+lang/purescript/layers.el
Normal file
12
layers/+lang/purescript/layers.el
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
;;; layers.el --- Purescript Layer layers File for Spacemacs
|
||||||
|
;;
|
||||||
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||||
|
;;
|
||||||
|
;; Author: Ryan L. Bell
|
||||||
|
;; URL: https://github.com/syl20bnr/spacemacs
|
||||||
|
;;
|
||||||
|
;; This file is not part of GNU Emacs.
|
||||||
|
;;
|
||||||
|
;;; License: GPLv3
|
||||||
|
|
||||||
|
(configuration-layer/declare-layers '(node))
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
(setq purescript-packages
|
(setq purescript-packages
|
||||||
'(
|
'(
|
||||||
|
add-node-modules-path
|
||||||
company
|
company
|
||||||
flycheck
|
flycheck
|
||||||
purescript-mode
|
purescript-mode
|
||||||
|
@ -19,6 +20,9 @@
|
||||||
popwin
|
popwin
|
||||||
))
|
))
|
||||||
|
|
||||||
|
(defun purescript/post-init-add-node-modules-path ()
|
||||||
|
(add-hook 'purescript-mode-hook 'add-node-modules-path))
|
||||||
|
|
||||||
(defun purescript/post-init-company ()
|
(defun purescript/post-init-company ()
|
||||||
(when (configuration-layer/package-used-p 'psc-ide)
|
(when (configuration-layer/package-used-p 'psc-ide)
|
||||||
(spacemacs|add-company-backends
|
(spacemacs|add-company-backends
|
||||||
|
|
Loading…
Reference in a new issue