Sublime Forum

Doubt about "Add repository" option

#1

I have created a plugin that for now is being installed through that repository, I added the repository from the Add repository option and then install from Package Control, however I notice that both the plugin folder and the configuration file that should go in Packages/User are not being created, could you tell me why this is happening?

In the console it sometimes shows me the following:

ignored packages updated to: ["liondocs-sublime", "Vintage"].

and this

error: The settings file "res://Packages/liondocs/LionDocs.sublime-settings" could not be opened

Is it something related to the way I am installing the plugin?

0 Likes

#2

If you don’t set

	// This helps solve naming issues where a repository it not named the
	// same as the package should be. This is primarily only useful for
	// GitHub and BitBucket repositories. This mapping will override the
	// mapping that is retrieved from the repository channels.
	"package_name_map": { "liondocs-sublime": "liondocs" },

in Package Control’s settings, then your plugin will be installed as Installed Packages/liondocs-sublime.sublime-package, which is unexpected.

1 Like

#3

Thanks for the prompt reply, I have applied that configuration and nothing different happens, Packages/liondocs has not been created. This is package control config:

{
	"bootstrapped": true,
	"in_process_packages":
	[
	],
	"installed_packages":
	[
		"AutoPEP8",
		"BracketHighlighter",
		"ChannelRepositoryTools",
		"Color Highlight",
		"ColorPicker",
		"EditorConfig",
		"FileIcons",
		"HTMLBeautify",
		"isort",
		"JsPrettier",
		"liondocs",
		"Materialize",
		"Package Control",
		"PackageDev",
		"Pretty JSON",
		"SublimeLinter",
		"SublimeLinter-flake8",
		"SublimeLinter-ruby",
		"TrailingSpaces",
	],
	"repositories":
	[
		"https://github.com/liondocs/liondocs-sublime.git",
	],
	"channels":
	[
		"https://packagecontrol.io/channel_v3.json",
	],
	"downloader_precedence":
	{
		"linux":
		[
			"urllib",
			"oscrypto",
			"curl",
			"wget"
		],
		"osx":
		[
			"urllib",
			"oscrypto",
			"curl"
		],
		"windows":
		[
			"wininet",
			"oscrypto"
		],
	},
	"package_name_map":
	{
		"liondocs-sublime": "liondocs",
	},
}
0 Likes

#4

Works fine here. Presuming you know you have to reinstall the package.

0 Likes

#5

Yes, reinstalled it, open and close editor, deleted and added repository…nothing…only liondocs.sublime-package created in Installed Packages.

0 Likes

#6

only liondocs.sublime-package created in Installed Packages .

That’s my expected result.

0 Likes

#7

Uh… I just notice that you DO name your plugin as liondocs-sublime. https://github.com/liondocs/liondocs-sublime/blob/56376ef61e50e73efb8d4456c4f36cb6abb604ef/Main.sublime-menu#L19 Not usually how people do it but whatever you want it to be. In that case, everything goes well in my opinion. My “fix” is not for you and there is nothing need to be fixed.

Except that you may want to open settings in side-by-side window: https://github.com/jfcherng-sublime/ST-AutoSetSyntax/blob/321ffc30b2b532b9e7799e5dbb600de99539c4c2/menus/Main.sublime-menu#L14-L21

0 Likes

#8

Ok, the problem here is that when I install the Plugin the configuration file (LionDocs.sublime-settings) is nowhere to be found. When I wanted to edit the sublime configuration it told me that the file could not be located, however, after replacing liondocs-sublime with just liondocs the problem was solved.

0 Likes

#10

When dealing with package renaming and reinstallation (sometimes even updates) it’s often the case that Sublime Text will complaint about missing files due to cached contents- E.g. when a package update renames a color scheme file, I get similar errors for all files of that type which are opened (from last session) when I launch ST, and the only way to make the error message go away is to close those files an reopen them (which associates a new and correct cache entry for them).

So, it’s normal to expect similar error when carrying out radical changes to your packages. Unless closing all associated files and/or restarting ST doesn’t make the error go away, then there’s nothing to worry about and you can most likely ignore them as cache-related complaints.

0 Likes