Skip to content

[Proposal]: New .fusion suffix for template files #16

@ace-of-aces

Description

@ace-of-aces

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:

  1. 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.
  2. 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.
  3. Consistency with Blade: For Laravel devs who are used to .blade.php and seeing a Fusion codebase with .fusion.vue for the first time, this might make it easy to understand what Fusion is.
  4. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions