Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4 from moodmosaic/topic/nix-shell
Browse files Browse the repository at this point in the history
Run ghcide under a nix-shell (or any other shell)
  • Loading branch information
moodmosaic authored Jun 9, 2020
2 parents 9f1af4a + eb8a3fe commit 5272cf0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ghcideLanguageClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class GhcideAutoLanguageClient
startServerProcess(projectPath) {
let proc =
(require("child_process")).spawn(
"ghcide", ["--lsp"], { "cwd" : projectPath });
atom.config.get("ide-haskell-ghcide.exec")
, atom.config.get("ide-haskell-ghcide.args").split(",").map(a => a.trim())
, { "cwd" : projectPath });

return proc;
}
Expand Down
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@
"dependencies": {
"atom-languageclient": "^0.9.9"
},
"configSchema": {
"exec": {
"title": "The actual command to run.",
"order": 1,
"type": "string",
"default": "ghcide",
"description": "<b>Hint</b>: If you use Nix you may want to enter <code>nix-shell</code> instead."
},
"args": {
"title": "Arguments as comma-separated values.",
"order": 2,
"type": "string",
"default": "--lsp",
"description": "<b>Hint</b>: If you use Nix you may want to enter <code>--run, ghcide --lsp</code> instead."
}
},
"consumedServices": {
"console": {
"versions": {
Expand Down

0 comments on commit 5272cf0

Please sign in to comment.