atom-languageclient
atom-languageclient copied to clipboard
Suggest ide-* packages based on file extensions
As the Atom language client is part of Atom IDE, maybe it should suggest its consumers to download the matching packages to give them the Atom IDE experience on every file they open, in case they don't have one installed at that moment. For example - when a user opens a C# file (and has the atom-languageclient package installed, of course), suggest him to download the ide-csharp package. For *.ts files - ide-typescript, etc. Such behavior exists in VSCode and I think should be a part of the Atom language client since whoever uses it expects an IDE experience anyway. In many cases a user might not know about the existence of such package, or just rather be notified of it automatically. I'd probably hit the Install button if there was one. :) Thoughts?
One "drawback" I can think of is having to maintain/manually handle a list of matching LSP clients for different language - be it remotely or as a part of the package...
We do have plans for that - indeed the packages already have extra metadata in the package.json called enhancedScopes that describes what grammars they work. Atom.io also supports searching on this too.
As soon as the packages are more stable we'll add the discovery component to Atom itself.
I'll leave this issue open as the public tracking side of the work.
It seems at least the outline view of atom-ide-ui already suggests packages.
Clicking on Install an IDE package first
sends the user to a package search with ide-<language>
,
Seems the search functionality is sort of a nice middle ground between helping the user find the package and not having to maintain a list of language servers.
Yeah, it is a nice functionality but I was thinking (maybe at least for the Atom maintained ide packages) that they could be automatically downloaded & installed if the user wanted. By the language (or the grammar scope) we can find a package and download it to the user to even simplify things.
For community maintained packages, I think displaying the user a list of packages that implement atom-languageclient
functionality by the scope would be great (and not querying ide-languageName packages). Just a better experience IMHO
You should also take into account that some languages will have several packages implementing this functionality, for example, for different language servers. It's up to user to decide which one they want.
@laughedelic I agree that's true for community packages. But maybe for packages that are maintained by the Atom team you'd want to offer the user to get the package instantly, or choose from a list. Some middle ground solution between offering and instantly downloading - suggesting them both when it comes to the Atom team's packages.. I'm not sure :)
EDIT - When I say community packages I mean community packages that don't have an alternative package maintained by the Atom team
I think a generic way to link a specific package while also linking to alternatives would be nice (e.g. an Atom maintained one is not necessarily guaranteed to be the one you want).
Something like Install ide-haskell-hie (or look for other IDE packages)
, and Find an IDE package for Haskell
would probably be satisfying to most IMO (wording not necessarily final ofc).
Then the specific package mentions would only be for Atom maintained (or very de facto ones), and fallback on searching. Thoughts?
As I mentioned in my original reply we have plans in place. Any package that is uploaded with an "enhancedScopes" section in the package.json that contains a list of the grammar scopes it can do things with will be part of a suggested list presented to the user when they are editing files of that grammar scope and they have no existing packages that can enhance it.
More details as the package ecosystem matures to the point where we want to be actively rolling out to otherwise passive eyes.
The plan is to present all packages that match the current scope with their enhancedScopes whether they are Atom maintained or not.
@damieng Seems like current backend api (as documented here) doesn't allow searching more "advanced" queries (packages that must have an enhancedScope of source.cs, and atom-languageclient as a dependency). This will make many results irrelevant as we only want to display packages that are best-suited to work with the atom-ide-ui and not packages that have their own implementation. Am I doing something wrong? or perhaps the docs need to be updated?
This is temporarily on hold while scope and language names are reworked for tree-sitter. Once they are stable we'll rework enhancedScopes to support the new naming and add some appropriate UI.
Looking at file extensions instead of only the grammar scope might be useful, as Atom doesn't provide grammars for every single language by default. Since grammar files contain the extensions they cover in fileTypes
, it would seem feasible to also suggest packages depending on file extensions directly if no grammar was found for a file.
Development of atom-languageclient has officially moved to https://github.com/atom-ide-community/atom-languageclient 🎉
If this is still an issue please consider opening an issue on that repo.