You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It frequently happens that one misspelled a file extension e.g. .mcfuntion instead of .mcfunction.
Misode hat the Idea if Spyglass could detect that. Which gave me the following concept:
I'm thinking of a popup notification in the bottom right. Which says something like, "The file you just created has an unknown extension for the function folder. Expected '.mcfunction'."
And then there are two buttons. One that just closes it. And one to automagically rename it. (Ik, the close button is redundant, as you can close a popup on the :95_x:. But I feel like it's better UX to have it next to the button that does stuff)
That same concept can be applied to all folders. For example:
function (functions) expects .mcfunction
tags/block (tags/blocks) expects .json
...
Same for resource pack:
blockstates expects .json
I don't exactly know the shader stuff, but I do know there's some special extensions...
textures expects .png
...
A sort of config option would be cool; obviously. Maybe even overrides.
Simply turning that on/off.
By overrides, I mean a whitelist-ish thing, where you specify file extensions that Spyglass won't complain about. Example:
When the user creates a file in data/*/function/ named not_a_function.foo, Spyglass doesn't show the renaming popup.
When the user creates a file in data/*/tags/function named hello_world_barfoo, Spyglass doesn't show the renaming popup. (because the created file ends in one of the given strings "barfoo".)
If the created file does not exist in the whitelist and the user decides to let Spyglass rename it, Spyglass cuts everything from (including) the last dot ., if any. And then the expected extension is added at the end. Example:
Renaming data/*/function/tick.mcfun:
Cut: tick.mcfun
Add: tick.mcfunction
Renaming data/*/tags/item/potato
Cut: potato (unchanged, as there's no .)
Add: potato.json
...
Maybe also an option to set the expected extensions? Like this:
Thanks for the write up. Popups are rather un-LSP-ly, but I think a warning on the first line of the file with a quick fix for renaming it would work? We could even add another quick fix for automatically changing the config file to allow the current file name/extension, but that might be too much magic.
It frequently happens that one misspelled a file extension e.g.
.mcfuntion
instead of.mcfunction
.Misode hat the Idea if Spyglass could detect that. Which gave me the following concept:
I'm thinking of a popup notification in the bottom right. Which says something like, "The file you just created has an unknown extension for the
function
folder. Expected '.mcfunction
'."And then there are two buttons. One that just closes it. And one to automagically rename it. (Ik, the close button is redundant, as you can close a popup on the :95_x:. But I feel like it's better UX to have it next to the button that does stuff)
That same concept can be applied to all folders. For example:
function
(functions
) expects.mcfunction
tags/block
(tags/blocks
) expects.json
Same for resource pack:
blockstates
expects.json
textures
expects.png
A sort of config option would be cool; obviously. Maybe even overrides.
Simply turning that on/off.
By overrides, I mean a whitelist-ish thing, where you specify file extensions that Spyglass won't complain about. Example:
Would result in a behaviour like:
data/*/function/
namednot_a_function.foo
, Spyglass doesn't show the renaming popup.data/*/tags/function
namedhello_world_barfoo
, Spyglass doesn't show the renaming popup. (because the created file ends in one of the given strings"barfoo"
.)If the created file does not exist in the whitelist and the user decides to let Spyglass rename it, Spyglass cuts everything from (including) the last dot
.
, if any. And then the expected extension is added at the end. Example:data/*/function/tick.mcfun
:tick
.mcfun
tick.mcfunction
data/*/tags/item/potato
potato
(unchanged, as there's no.
)potato.json
Maybe also an option to set the expected extensions? Like this:
The text was updated successfully, but these errors were encountered: