Are identifiers scoped to the kind being identified?

I’m getting close to publishing an extension I’ve been working on for 2 weeks full time, but before I do it would be great to have confirmation about the scoping of identifiers.

Are identifiers scoped to the kind of thing being identified, or do they have to be globally unique across every class of thing that can be identified in an extension?

Also, do identifiers occupy the same store as config?

For example, is it safe to use the identifier myextensionnamespace.foo for all of these things (and more) at the same time:

It would be really great if everywhere in the API reference there is a name or identifier, it’s clearly documented how it should be namespaced. Does it need no namespace, your extensions’s namespace, or your extensions namespace + a deeper namespace to group identifiers of that category (e.g. .tasks.).

I’ve seen some extensions just have super long ultra-namespace identifiers for everything, but it really makes the code messy and can bloat configuration files that users might version control and read. Also, I’ve seen identifiers not really namespaced at all which could lead to collisions between extensions, or even within the same extension? Having clarity sooner rather than later would really help the Nova extension ecosystem grows healthily as some config names and things are a risky mess to try to change in updates, and bad patterns get copied by people learning extension dev by example.

For the most part, any identifier used for “registering” something should be done in a global sense. This includes configuration items, assistants / language clients, notifications, and commands. It doesn’t necessarily have to be full reverse-DNS naming, but should likely include a namespace prefix of some sort just to be safe.

I’ll make a note to update our documentation to be more clear on this topic.

If we think of this with a database tables metaphor, is there one database table for anything that can be identified, or are there separate notification, command, etc. tables where identifiers only have to be unique within each table?

So, at least config and command identifiers are stored in different “database tables”, because the Deno language server has both a config deno.cache and a command deno.cache: