TypeScript: Add missing .tsx extension
Exactly how it is done for JavaScript nowadays:
➜ ctags --list-maps | grep JavaScript
JavaScript *.js *.jsx *.mjs
Seems that this is the file that needs to be changed (but unfortunately I don't dare to change C/C++ code 😓 ) https://github.com/universal-ctags/ctags/blob/6928d2b39f82ef80a947ae6a355bd91a803619e2/parsers/typescript.c#L2053
NOTE: For those having this issue, you can mitigate by creating a file called (for instance) tsx.ctags inside your $HOME/.ctags.d folder, with the following content:
--langmap=TypeScript:.ts.tsx
Thank you!
Actually there is much more to do to support tsx. I will take a look how to implement this in near future unless someone else wants to do it.
I have created a ctags file for typescript based on https://github.com/romainl/ctags-patterns-for-javascript for anyone requiring tsx ctags. Very rudimentary but works well.
https://gist.github.com/romgrk/4bc536080ce9934fb63f243245819051
@ksamborski can you please look into this. it's been open for 3 years.
@ksamborski can you please look into this. it's been open for 3 years.
probably not soon but I'll try to find some time to do it
TY!
On Wed, Jan 10, 2024 at 3:05 PM Karol Samborski @.***> wrote:
@ksamborski https://github.com/ksamborski can you please look into this. it's been open for 3 years.
probably not soon but I'll try to find some time to do it
— Reply to this email directly, view it on GitHub https://github.com/universal-ctags/ctags/issues/2667#issuecomment-1884912768, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABPWPXAUMNQVVC2GAQ3JR3YN2N4HAVCNFSM4SRVZQD2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBYGQ4TCMRXGY4A . You are receiving this because you commented.Message ID: @.***>
@romgrk Have you ever thought about adding test cases to your work? Your knowledge and product about e-ctags+JavaScript combination are quite valuable. With the test cases, I, an u-ctags developer, can study much things.