Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

TypescriptGoToSourceDefinition failing #37

Closed
sQVe opened this issue Oct 24, 2022 · 5 comments 路 Fixed by #38
Closed

TypescriptGoToSourceDefinition failing #37

sQVe opened this issue Oct 24, 2022 · 5 comments 路 Fixed by #38

Comments

@sQVe
Copy link

sQVe commented Oct 24, 2022

Hello 馃憢馃徏,

For certain projects I'm seeing failures to use the source definition mapping. I'm seeing the following issue:

Error executing vim.schedule lua callback: vim/shared.lua:0: Expected table, got nil                                                                                          
stack traceback:                                                                                                                                                              
        [C]: in function 'assert'                                                                                                                                             
        vim/shared.lua: in function 'tbl_isempty'                                                                                                                             
        .../site/pack/packer/opt/typescript.nvim/lua/typescript.lua:2679: in function 'handler'                                                                               
        /usr/share/nvim/runtime/lua/vim/lsp.lua:1390: in function ''                                                                                                          
        vim/_editor.lua: in function <vim/_editor.lua:0>                                                                                                                      
Press ENTER or type command to continue     
@roginfarrer
Copy link

I just installed the plugin, and I'm seeing the same error

@jose-elias-alvarez
Copy link
Owner

jose-elias-alvarez commented Oct 24, 2022

Can you try #38?

Edit: also, if you're able to tell me which dependency is causing this error for you (assuming it's public) I could make sure that our behavior matches VS Code's, since I haven't seen this issue in my own usage.

@sQVe
Copy link
Author

sQVe commented Oct 24, 2022

@jose-elias-alvarez Going to soruce definiton on is here replicates it for me: https://github.com/sQVe/lika/blob/main/src/string.ts#L11

@sQVe
Copy link
Author

sQVe commented Oct 24, 2022

@jose-elias-alvarez #38 solves it and outputs: LSP[tsserver] Go to Source Definition failed. Requires TypeScript 4.7+. instead.

@jose-elias-alvarez
Copy link
Owner

Great, thanks for confirming. That's also how VS Code behaves, so I think this is the right behavior.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants