-
Notifications
You must be signed in to change notification settings - Fork 76
TSImport error #88
Comments
Would you be able to provide a minimal project example? I just tried to reproduce this in a ionic/angular project and it seems to be working on my end. |
Hello, Thanks for your answer. Maybe something wrong in the project example I tried at first ? https://github.com/AngularShowcase/angular2-sample-app Then I tried with this one: |
Maybe this has to do with the Typescript version? I observed an error message very similar to this one when moving from 2.4.2 up to 2.6.1 in my project. Moving back to 2.4.2, the error was gone again. This would make sense because the Typescript team may have changed the TSServer interface for imports to support microsoft/TypeScript#19069. |
Im unable to replicate this even when switching between 2.4 and 2.6 of typescript. Going to close this. Please update your plugin install to get the latest version. |
Warning: I will close the issue without the minimal vimrc and the reproduce ways.
Problems summary
TSImport is not working.
I place cursor under a symbol I want to auto import, type :TSImport
This displays an error and nothing is imported.
error caught in async handler '/Users/fox/.vim/plugged/nvim-typescript/rplugin/python3/nvim-typescript:command:TSImport []' Traceback (most recent call last): File "/Users/fox/.vim/plugged/nvim-typescript/rplugin/python3/nvim-typescript/__init__.py", line 348, in tsimport currentlyImportedItems, lastImportLine = utils.getCurrentImports(self._client, self.relative_file()) File "/Users/fox/.vim/plugged/nvim-typescript/rplugin/python3/nvim-typescript/utils.py", line 86, in getCurrentImports imports = [x for x in client.getDocumentSymbols(inspectedFile)["childItems"] TypeError: list indices must be integers, not str
Expected
I should see an import declaration.
Environment Information
Mac OS X 10.13
Provide a minimal vim rc with less than 50 lines (Required!)
The reproduce ways from neovim starting
The text was updated successfully, but these errors were encountered: