Open davidsu opened 3 years ago
Don't know, you need ask typescript team.
Or maybe create plugin of tsserver could help
I should have started by saying that I love your work.
I really do.
What im doing is to map gd to a custom function that tries to jumpimplementation and fallsback to regex search if typescript don't have implementation location.
I endedup using feedkeys(<c-o>....
if i endup in a d.ts
file and then fallingback to regex, works well enough for me.
Thanks
This is already supported with project references and declarationMap: true
. I've used this in yarn workspace monorepos as well as lerna/npm monorepos to jump between subprojects.
@JamesApple looks like create-react-app doesn't play well with project references. There are clever solutions to the problems of CRA, it's a bit of an overkill for me at this time. I'm happy enough with my hacks for now. It was fun to learn about it, thank u for that.
I have a custom handler to fallback to regex search function implementation when I can't find one with ts-server. It happens quite often on the monorepos I work that I can easily find the function declared on another subproject but using
CocAction('jumpImplementtion')
jumps to.d.ts
files. Is there some way to tell ts-server to filter out.d.ts
files from possible jumpLocations forjumpImplemention
?