bash-language-server
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -27,2 +27,1 @@ #!/usr/bin/env node | ||
} | ||
@@ -7,2 +7,3 @@ "use strict"; | ||
const Path = require("path"); | ||
const pkg = require('../package'); | ||
const Analyser = require("./analyser"); | ||
@@ -20,16 +21,18 @@ function listen() { | ||
connection.onInitialize((params) => { | ||
connection.console.log(`Initialized for ${params.rootUri}, ${params.rootPath}`); | ||
glob("**/*.sh", { cwd: params.rootPath }, (err, paths) => { | ||
if (err != null) { | ||
connection.console.error(err); | ||
} | ||
else { | ||
paths.forEach(p => { | ||
const absolute = Path.join(params.rootPath, p); | ||
const uri = "file://" + absolute; | ||
connection.console.log("Analyzing " + uri); | ||
Analyser.analyze(uri, fs.readFileSync(absolute, "utf8")); | ||
}); | ||
} | ||
}); | ||
connection.console.log(`Initialized server v. ${pkg.version} for ${params.rootUri}`); | ||
if (params.rootPath) { | ||
glob("**/*.sh", { cwd: params.rootPath }, (err, paths) => { | ||
if (err != null) { | ||
connection.console.error(err); | ||
} | ||
else { | ||
paths.forEach(p => { | ||
const absolute = Path.join(params.rootPath, p); | ||
const uri = "file://" + absolute; | ||
connection.console.log("Analyzing " + uri); | ||
Analyser.analyze(uri, fs.readFileSync(absolute, "utf8")); | ||
}); | ||
} | ||
}); | ||
} | ||
return { | ||
@@ -36,0 +39,0 @@ capabilities: { |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"publisher": "mads-hartmann", | ||
@@ -9,0 +9,0 @@ "main": "out/server.js", |
@@ -24,2 +24,3 @@ "use strict"; | ||
const pkg = require('../package') | ||
import * as Analyser from "./analyser"; | ||
@@ -44,18 +45,21 @@ | ||
connection.onInitialize((params): InitializeResult => { | ||
connection.console.log( | ||
`Initialized for ${params.rootUri}, ${params.rootPath}` | ||
`Initialized server v. ${pkg.version} for ${params.rootUri}` | ||
); | ||
glob("**/*.sh", { cwd: params.rootPath }, (err, paths) => { | ||
if (err != null) { | ||
connection.console.error(err); | ||
} else { | ||
paths.forEach(p => { | ||
const absolute = Path.join(params.rootPath, p); | ||
const uri = "file://" + absolute; | ||
connection.console.log("Analyzing " + uri); | ||
Analyser.analyze(uri, fs.readFileSync(absolute, "utf8")); | ||
}); | ||
} | ||
}); | ||
if (params.rootPath) { | ||
glob("**/*.sh", { cwd: params.rootPath }, (err, paths) => { | ||
if (err != null) { | ||
connection.console.error(err); | ||
} else { | ||
paths.forEach(p => { | ||
const absolute = Path.join(params.rootPath, p); | ||
const uri = "file://" + absolute; | ||
connection.console.log("Analyzing " + uri); | ||
Analyser.analyze(uri, fs.readFileSync(absolute, "utf8")); | ||
}); | ||
} | ||
}); | ||
} | ||
@@ -62,0 +66,0 @@ return { |
Sorry, the diff of this file is not supported yet
31728
635