Simon Hänisch
                                            Simon Hänisch
                                        
                                    Hey, yeah it's probably doable but I haven't worked with Svelte yet and even though I'd love to, I currently don't have the time. PRs are welcome 🙏
Hey @danielquintero I just released a new version where you can enable an option `organizeImportsSkipDestructiveCodeActions` so that no imports would get removed. Maybe you can try that again in combination...
Looked into it a bit more and it does look like `organizeImports` is implemented by `svelte-language-server`... I'm just not sure yet how to actually make use of it, i'll try...
So I've tried ~patching the `preprocess` hook of~ [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) (edit: patching it wasn't actually necessary, just needed to have the plugin installed), and it did somewhat work, giving me "svelte"...
Came up with a PR ☝️ however I'm not very confident about it yet... if anyone would be able to test this out on their project, that would be really...
See comments on the PR (now closed)... there must be a way to use a piece of svelte language tools programmatically to do import organizing correctly from this plugin, I...
@johnsoncodehk thanks a lot for this! I just tried it after installing the latest versions (1.0.3), however I have a couple of problems... here's the branch diff: [volar-svelte-support](https://github.com/simonhaenisch/prettier-plugin-organize-imports/compare/volar-svelte-support) First problem...
@johnsoncodehk not sure why but it's broken, doesn't contain the `out/index.js`... (see here: https://unpkg.com/browse/@volar-examples/[email protected]/). Maybe forgot to build before publishing?
@johnsoncodehk I just tried with latest (v1.0.8) and the "could not find source file" error is gone, thanks 🙏 But it's still the same problem that `languageService.organizeImports(...)` just returns `undefined`....
Basically same as https://github.com/simonhaenisch/md-to-pdf/issues/41#issuecomment-520246228: it's possible to do this via a marked extension (see https://marked.js.org/using_pro). If you happen to figure out how to do this, please let us know here...