danymat / neogen

A better annotation generator. Supports multiple languages and annotation conventions.
GNU General Public License v3.0
1.23k stars 51 forks source link

Bug: Neogen not functioning in vue files. #169

Open TheMartonfi opened 2 months ago

TheMartonfi commented 2 months ago

I'm currently trying to configure neogen to generate jsdoc comments for a vue project, I've tested that neogen works fine in js, ts, jsx, tsx so the plugin does work fine for those file types.

When attempting to run ':Neogen' nothing happens in vue files. If there's any way to debug this further please let me know as I'm now at a lost as to why the plugin isn't working.

charnley commented 3 weeks ago

Similarly. I tried to enable jsdoc for Svelte (the same way as Vue), but nothing happened.

charnley commented 3 weeks ago

After debugging the neogen lua with some vim.print statements, it looks like the mixed language files has problems finding the right javascript node from the tree. I am not a treesitter expert though, but the locator returns nill when trying to find any of the types like function.

target_node = get_node(all_types_map[filetype]) -- return nill

I think vue might have the same issue because of the HTML-like file format, as svelte.