Skip to content

Commit

Permalink
Merge pull request #2522 from Chillee/2482
Browse files Browse the repository at this point in the history
Fixes #2482: Neovim not spawned in appropriate directory
  • Loading branch information
Chillee authored Apr 13, 2018
2 parents 4bad6db + a7d240e commit db241e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/neovim/neovim.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { spawn, ChildProcess } from 'child_process';
import { dirname } from 'path';
import { attach, Nvim } from 'promised-neovim-client';
import * as vscode from 'vscode';

Expand All @@ -14,8 +15,9 @@ export class Neovim implements vscode.Disposable {
private nvim: Nvim;

async initialize() {
const dir = dirname(vscode.window.activeTextEditor!.document.uri.fsPath);
this.process = spawn(configuration.neovimPath, ['-u', 'NONE', '-N', '--embed'], {
cwd: __dirname,
cwd: dir,
});
this.process.on('error', err => {
console.log(err);
Expand Down

0 comments on commit db241e7

Please sign in to comment.