Closed HendrikPetertje closed 1 year ago
I tried adding this:
vim.g.doge_filetype_aliases = {
javascript = { 'svelte' }
}
But then my entire file is parsed as a javascript file all of a sudden (which does not recognize HTML tags)
Without this rule:
With the above snippet enabled:
This indeed gives error in the current version. There is a tree-sitter svelt parser. I can implement this logic soon and make it a bit more dynamic so that I can also implement support for Vue files.
@HendrikPetertje I have implemented everything locally on a new branch including tests. Basically the root-level <script>
tag right now is being parsed and then the contents are passed to the typescript parser. I will dig in a bit deeper in other possible use cases this weekend in how people tend to work with Svelte, just to make sure I've handled all the use cases. I'll let you know once I'm finished, but I can definitely do a release with proper support for svelte.
This has been added v4.4.0.
THIS IS SO COOL, THANKS!
@HendrikPetertje Hope you enjoy. By the way, I've already did release v4.5.0 which also supports HTML and VueJS as well.
Heya,
When running doge#generate on a
.js
,.ts
or even.tsx
file I see no problems at all, but when I try to execute doge on a.svelte
file then I'm met with this error:I can't really switch filetype on my svelte files to
HTML
(which it essentially looks like) as LSP and completion are all helping me out with svelte-specific help.Can I do something to make doge play nicely or is a change required in this plugin to make jsdoc generation work on svelte files?