Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Include psc-package sources list in arguments too if being used #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions 11 psci.el
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ When FILENAME is nil or not a real file, returns nil."
(search-forward-regexp regexp)
(match-string 1))))

(defun psci/--get-psc-package-sources! ()
(when (file-exists-p "psc-package.json")
(split-string (shell-command-to-string "psc-package sources"))))

;; public functions

;;;###autoload
Expand All @@ -128,8 +132,11 @@ Relies on .psci file for determining the project's root folder."
;; create the comint process if there is no buffer.
(unless buffer
(setq default-directory (psci/--project-root!))
(apply 'make-comint-in-buffer psci/buffer-name buffer
psci-program nil psci/arguments)
(let ((full-arg-list (-if-let (psc-package-sources (psci/--get-psc-package-sources!))
(append psci/arguments psc-package-sources)
psci/arguments)))
(apply 'make-comint-in-buffer psci/buffer-name buffer
psci-program nil full-arg-list))
(psci-mode)))
(psci/log "No .psci file so we cannot determine the root project folder. Please, add one.")))

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.