Sublime Forum

ignored_packages also ignores folder in Packages/User

#1

I have Packages/User/haskell with some snippets in.
If I disable Haskell plugin in order to use SublimeHaskell for haskell syntax, SublimeText won’t load snippets from Packages/User/haskell anymore.
Is it desired behaviour?

1 Like

#2

it’s generally not recommended to have subfolders in your User package folder AFAIK.

0 Likes

#3

I’ve never heard of this recommendation.

Disabling a package will disable the loading of anything inside the User directory of the same name. For example, disabling a package named PHP means Sublime Text will ignore anything inside User/PHP/* (case-insensitive).

On one hand, it kind of makes sense. It’s reasonable to expect that User/PHP/* contains PHP package overrides or additions e.g. snippets, so when PHP is disabled it seems only correct to exclude User/PHP/* too.

I faced a similar issue where I disable the PHP package in favour of an alternate PHP package under a different name (php-grammar). My custom snippets were disabled. To workaround it, I moved all my User snippets to User/snippets/*.sublime-snippet. However, if you have lots of snippets, then moving all snippets to one directory might not be a good option. You could use some sort of naming convention e.g. prefix all User snippet folders with underscore e.g. User/_PHP/*.sublime-snippets or User/snippets/_PHP/*.sublime-snippets.

One way to avoid this is use a convention of prefixing folders in the User with underscores.

0 Likes

#4

Well I got the impression from:


specifically:

but I guess it only applies to folders containing Python scripts though and isn’t as general a rule as I thought :slightly_smiling:

0 Likes

#5

That’s far from a recommendation not to use folders in the User directory. If it was, then the suggestion would be nearer to: ignore or disallow all folders inside the User directory.

There is room for improvements on the package handling front, but I think the suggested structure and other suggestions in that post is way over-complicating things.

0 Likes