-
Notifications
You must be signed in to change notification settings - Fork 48
Support embedded scopes and scripts #11
Comments
Could it be that the getSuggestions logic continues , seeing as though the server is still awaiting... and hasn't had a chance to become null ? |
I've put logic into the 0.1.6 update that just went out to avoid the null error - are you using that version or the older one? For non-JS/TS files getSuggestions should never be called because of this https://github.com/atom/atom-languageclient/blob/master/lib/auto-languageclient.js#L199 so open to ideas on how it's getting there. 😕 |
Does the HTML file have |
It's possible. The activation grammar checking is based on the top scope of the file - I'm not sure what autoco 8000 mplete does but it's quite possible it's scope based. The fix that went out should stop the error but there is a larger open question of how LSP deals with scopes and blocks that I haven't seen any answers for. Is a javascript language server expected to be able to deal with html files? |
Yes it does, have script tag, however in the default scopes in main.js getGrammars, source.embedded.html.js is not there. That was a suggestion in a previous ticket I submitted. However that is currently not in place so it shouldn't be the case here. Hmm @damieng I wonder if the conditional should happen sooner than within getSuggestions ? |
Running JS IDE features in inline scripts is very useful for webcomponent developers |
The language server protocol is not clear on what to do about embedded scripts or scopes. Any pointers would be great! :) |
vscode has an html language server as well as ts/js. I'm curious as to how they might be implementing the implementing the inline intellisense. I'll try to look further if you guys want to collect your findings here as well. |
How to solve the HTML inline <script> tag does not support tips? I like atom. I need this function! |
see VSCode: extensions/html/client/src/htmlMain.ts#L52 and see VSCode: src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts#L389 Is this enough to put together an initial PR? @rwatts3 what do you think? |
@bennypowers That covers the activation which I think we could implement. The confusion is whether the typescript language server will be happy receiving HTML files. We could try it and see as the language server protocol has no mention of embedded scripts. |
I wonder if at that point if the lsp has already received the contents of the line ? Would it care about the file at that point. Or if there is anyway we can bypass the file part. |
This is an
html
file.http://nimb.ws/nSAGx4
The text was updated successfully, but these errors were encountered: