-
-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hi Aaron and contributors, congrats on the open source release! 🎉
I am proposing a new .fusion suffix/identifier (like in Blade) for Fusion template files that would do the following:
Component.vue -> Component.fusion.vue
This might have several benefits:
- Clear separation: It would make it much more obvious that you are not dealing with a standard Vue SFC (or JSX in the future), but with Fusion as a superset of it.
- LSP Support: A prefix might make it easier for future IDE Helpers/Plugins/LSPs to discover and efficiently provide syntax highlighting, and vice versa, for other Vue/JSX-only LSPs to exclude these.
- Consistency with Blade: For Laravel devs who are used to
.blade.phpand seeing a Fusion codebase with.fusion.vuefor the first time, this might make it easy to understand what Fusion is. - File Explorer Icons: This might be a detail, but it would make it possible for VSCode/PHPStorm to show a custom icon for template files using Fusion, just like Blade in PHPStorm.
From a quick Google search, I haven’t seen anything in the Vue/React ecosystem using such prefix yet, so this (hopefully) wouldn’t break any existing software. A small test in VSCode and PHPStorm didn’t break anything for me.
Maybe this could also be made configurable/optional via Vite plugin options (like in https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#options)?
Some of this is based on assumptions tho, as I’m not an extension developer (yet), but I'm encouraged by your “I’m not qualified to do this” quote from Laracon EU :)
I'd be happy to create a PR and hear your opinion on this!