ctags icon indicating copy to clipboard operation
ctags copied to clipboard

TypeScript: Add missing .tsx extension

Open yuriteixeira opened this issue 5 years ago • 6 comments

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!

yuriteixeira avatar Oct 15 '20 08:10 yuriteixeira

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.

ksamborski avatar Oct 15 '20 09:10 ksamborski

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

romgrk avatar Jan 24 '23 07:01 romgrk

@ksamborski can you please look into this. it's been open for 3 years.

cheater avatar Jan 10 '24 13:01 cheater

@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

ksamborski avatar Jan 10 '24 14:01 ksamborski

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: @.***>

cheater avatar Jan 10 '24 16:01 cheater

@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.

masatake avatar Jan 10 '24 20:01 masatake