Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP-Stylelint Blocking LSP-CSS autocompletions #11

Closed
dwhenson opened this issue Jan 20, 2021 · 3 comments · Fixed by sublimelsp/LSP#1582
Closed

LSP-Stylelint Blocking LSP-CSS autocompletions #11

dwhenson opened this issue Jan 20, 2021 · 3 comments · Fixed by sublimelsp/LSP#1582

Comments

@dwhenson
Copy link

Hi

I'm using LSP-CSS for autocompletions and LSP-Stylelint for linting. However, when I enable LSP it immediately blocks LSP-CSS from autocompleting. When I disable Stylelint it LSP-CSS works again. Can you advise how to make these two LSPs work well together?

Thanks in advance.

@dwhenson
Copy link
Author

Adding "priority_selector": "source.xxx" in LSP-stylelint settings seems to fix this but I'll leave the issue open for the moment as this is a hack, and I'm not sure how permanent this solution is.

@rchl
Copy link
Member

rchl commented Jan 20, 2021

I'm honestly not sure what a proper fix would be and where it should be made.

Since it's a problem with a conflict between two similar servers I'm not sure whether the choice of which one is more important should be made by the user or we should explicitly set empty priority_selector here and force this one to have a lower priority than any other server...

@predragnikolic
Copy link
Member

predragnikolic commented Jan 20, 2021

We should probably send the completion request to all servers who have the completionProvider capability, await the results, parse them and combine them to a Sublime.CompletionList. (keeping in mind that one sever might return a list and another server might return an object that has {isIncomplete: false, items[]}, and a third server returning {isIncomple: true, items:[]})

If for example there are more servers, as log as there is one server that returns isIncomplete true, sublime.DYNAMIC_COMPLETIONS flag should be set, which would lead that we send completion request to other servers unnecessarily, but that depends on the implementation... But I would do the most simple implementation(the one that would send request unnecessarily to other servers) and assume that the user wont have more than 3 language servers that have the completionProvider enabled. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants