sourcegraph / javascript-typescript-langserver

JavaScript and TypeScript code intelligence through the Language Server Protocol
https://sourcegraph.com
Apache License 2.0
793 stars 72 forks source link

info.project.getCurrentDirectory is not a function #458

Closed soywod closed 6 years ago

soywod commented 6 years ago

I try to make tslint working through typescript plugins, but I get this error (on Vim8, when I reach a .ts file). I have installed typescript, tslint and tslint-language-service, and put in my tsconfig :

"plugins": [
  {"name": "tslint-language-service"}
]

After some investigations, I've found that this method getCurrentDirectory is not implemented : https://github.com/sourcegraph/javascript-typescript-langserver/blob/9c10c68a3db0cf984eb5888265dbc1cc126e22c6/src/project-manager.ts#L386-L392

Maybe I'm wrong, what do you think ? Did someone get the same error ?

soywod commented 6 years ago

In fact, it comes from the tslint-language-service. During the creation process, it tries to get the current directory from the project key, instead of the languageServiceHost. I've sent a PR. Sorry for the disagreement.