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

Run ghcide under a nix-shell (or any other shell) #4

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
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
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