-
Notifications
You must be signed in to change notification settings - Fork 185
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
IntelliSense always suggests "<?php" when in HTML #372
IntelliSense always suggests "<?php" when in HTML #372
Comments
This is because we need to set the |
Just found the responsable code line: https://github.com/felixfbecker/php-language-server/blob/master/src/CompletionProvider.php#L281 I would prefer to have the first condition removed:
My question is: Am I the only one who is annoyed by this? (Or am I the only one editing HTML in PHP files ?) |
I don't understand how removing that condition would help |
Sorry, I didn't make myself clear. Currently, the conditions are like this:
If I understand this correctly, the I propose to remove the first condition, so that line would only trigger on the second condition:
Before opening a pull request I would like to understand why this line is how it is and whether my propsal is actually wanted. |
The line is how it is to propose a new opening tag inside HTML. That is as designed. The issue is just that the autocomplete pop up all the time because we need to set |
Yes, so before we go around in further circles: Do you think my request to remove this autocomplete is reasonable and that I should try my hands on a pull request to remove it? |
I don't think so, that is as designed - Microsoft needs to fix the trigger characters |
Hello.... I am having this issue as well and it is annoying to be honest. Is there a workaround or something? |
Express your need for this on microsoft/language-server-protocol#138 :) |
Okay. I hope they do whatever is needed soon. Thanks. |
Thanks for directing me here @felixfbecker - hopefully MS gets this fixed soon! |
@felixfbecker sir, same thing is happening to me too. But i don't think this is microsoft language issue because when i turn off the intellisense then there is no <?php suggestion. And after turn this on, this is keep starts showing. |
Keep throwing the pressure on that issue: microsoft/language-server-protocol#138 - if there is enough annoyance maybe the Microsoft can prioritize fixing that. |
Ya, for example sometimes in php file we also include html, so the trigger for auto completion or IntelliSense should only work inside php tag ( |
this also happen in vscode. the suggestion for |
https://github.com/Microsoft/vscode/issues/14166 |
Just came here to voice my displeasure. IMHO this suggestion needs to be removed until it can be fixed. It suggests This is a somewhat useless suggestion, anyway. Nobody is saving an appreciable amount of time by Edit: Commenting out lines 159:164 in src/CompletionProvider.php will stop this from happening. php-language-server/src/CompletionProvider.php Lines 159 to 164 in 1edbe35
It's better to remove/comment this and have to type <?php manually the few times I need to than to constantly have to deal with a very frustrating "feature" whether or not it's your fault or not that it happens. |
Since we have no alternatives i would like to vote to remove It is annoying so much everyone. |
I will keep updating this thread with the new snippet to remove/comment until it's fixed: Remove/comment these lines as of 12/20 php-language-server/src/CompletionProvider.php Lines 176 to 181 in 9eea26d
|
Is it supposed to be fixed? Because it sure aren't for me... |
Same for me, the problem of the suggest persists. |
Still not sure why you don't just remove the lines I outlined? Nobody is saving time by having php-language-server/src/CompletionProvider.php Lines 176 to 181 in 9eea26d
|
Sorry but I don't understand your argument. You expect autosuggestions for HTML tags, right? So wouldn't you expect a suggestion for |
I'm going to do this now, so I don't get my notifications spammed with this (overstated) issue in the future. Can we notify the vscode developers about the |
The vscode developers introduced the CompletionContext themselves, but you can always express to them that there is a desire to have it implemented |
@felixfbecker @jens1o Sorry to bother you, I'm new to VS Code. So we have to wait for the fix, to consider this issue really solved? 🙂 |
From a language server standpoint, assuming a spec compliant client, there is no issue in the language server. |
@felixfbecker I'd basically never expect the |
by the LS client fixes felixfbecker#372
That tinny <?php thing is of minor importance when there is a gazillion of others to take care of. On the contrary, when it pops up at the most inappropriate moments it can cause mistakes. Please remove it permanently. Of course @felixfbecker a big thank you from me too. Even with this, it still ranks as the best php intellisense out there! |
As the person who opened this issue I would like everybody to please relax. Pull requests are on their way. You can upvote on the issue itself if you're bothered by the current behaviour. @felixfbecker Thanks for you work and patience. |
@felixfbecker I am using Atom. This should illustrate why the |
@bcorcoran what version of ide-php do you use? |
Latest, I literally just updated a few minutes ago. |
Could you please still tell me the version number? |
0.7.5 |
Is that an automatic suggestion or did you invoke it with Cmd+Space? Could you post LSP logs? |
It's automatic. How do I get LSP logs? |
I don't know, I don't use Atom |
Anyway, the solution is to delete/comment out the lines I have been posting. In the rare case that a |
There should be no more autotriggered suggestions on the |
It triggers with any < and doesn't go away if you type other characters. That was what I was trying to illustrate with the screenshot.
I think the <?php suggestion should go away if you don't type <?php |
I see that you also get a suggestion for |
Every time I close an HTML tag in a PHP file, IntelliSense suggests
<?php
as next string.This is distracting when writing HTML: When I want to enter a linebreak, I first have to remove the suggestion before hitting
Enter
.Is there a possibility to remove this particular suggestion?
(Using PHP IntelliSense V1.2.1 in Visual Studio Code 1.11.2 on Windows 10,
php.suggest.basic
is set tofalse
)The text was updated successfully, but these errors were encountered: