-
Notifications
You must be signed in to change notification settings - Fork 41
constant suggestion of "<?php" in mixed file #47
Comments
I've noticed this today as well. It never stops suggesting the |
I think the problem is that it makes this suggestion regardless of where the cursor is in the code. It would be great if it limited this suggestion only to the beginning of the file, as the code comments suggest it should. :) |
Hmm, that's worth a discussion. @felixfbecker Thoughts? |
Please see felixfbecker/php-language-server#372 (and upvote the linked LSP issue) |
While what you use is open-source, can't anyone fork it and add a configuration, leaving the actual behavior as default? |
It's not easy to change - it's part of the behavior of the underlying language server. If there is a way to switch it off in ide-php we'll definitely consider a configuration switch here with no need to fork. |
Sure, but I meant by "fork" forking it and making a PR. But what do we wait? This issue to be closed? microsoft/language-server-protocol#138 In that issue (felixfbecker/php-language-server#372), someone suggested to remove the following condition: $node instanceof Node\Statement\InlineHtml Maybe the switch you're talking about can be on that condition? |
Folks this is blocked by Microsoft VS Code / LSP. If you want to get a fix faster please express your need on the linked issue, I can't make it happen faster :) |
The fact is we know what we want on your module, but every time lose me more about VS Code, LSP or whatever is used. The only thing I can do is upvote the issue or eventually sign a petition 😄 Thanks for your patience anyway :) |
@felixfbecker Is there any way we can have a short term configuration option that just specifically disables The alternative I guess is I could just always filter this out client side? |
Personally, I think this would fit in Configuration Options(as described in the LSP), but these aren't implemented yet, afaik. Another simple operator is some kind of unmaintainable when it scales some day and it does not fit(Application Options shouldn't be passed via command line arguments). (but this is just my opinion) |
@jens1o There are plenty of examples of extensions that people have added for additional functionality like this. Basically just need to come up with a new message and response or add a custom block to the initialization message. |
open yup, that's as dirty a hack as dirty hacks get to be dirty, and you'll need to do this or some variation thereof on every update, but it beats not being able to code efficiently due to |
I agree something needs to change every time I type any html <p it wants to complete with <?php |
Fixed in https://github.com/felixfbecker/php-language-server/releases/tag/v5.0.1 |
Working on that right now - requires work in atom-languageclient and in autocomplete-plus. Will bump up once we're there. |
0.7.1 is out and i'm unable to repro :) |
I'm running version 0.7.3 with Atom 1.22.1 and I'm still having this issue. |
@vinkla could you show some LSP logs of the completion request? |
@felixfbecker do you mean this? Let me know if there is anything else I can do! |
I think between this and the other multitude of issues with the php integration we're going to have to cease development on this package. It requires more work than we have resources available. |
@damieng do you mean that this package will become deprecated or removed? |
Wait, what? There are issues so you are just going to abandoned the package? If that is the case then I will move away from atom as a whole. It is crazy to just shelve such an important feature. |
Lol, I'm not using Atom anymore but vscode(with the same php-language-server), but I'm still impressed. |
@bhhaskin It does not make sense to continue to try to support a package that is not providing a good experience for its users when we lack the resources to address the issues. The Atom team is very small and while the other IDE packages we support have enjoyed some success (Typescript, C#, Java) it would seem that the PHP one suffers from significantly more issues and problems than the others we support. |
to everyone looking for a fix: either open or use the fabulous Visual Studio Code instead |
I am very sorry to hear that! As far as I am aware I fixed the issue on the language server sde and the fix here would be simple and benefit all languages (provide the language server with the extra parameter) |
@felixfbecker Which parameter is missing? |
@damieng judging from the logs in this comment, the |
@felixfbecker the newer atom-languageclient sends the context however the language server then throws; |
Oh, I wasn't aware of that. That's a bug, should be fixed with felixfbecker/php-language-server#592. Will merge/release once CI passes |
Should be fixed in v5.3.5 |
I've submitted a pull request with the new changes: #101 |
I can't replicate this in version 0.7.5 and it seems to be fixed. Thanks @damieng and @felixfbecker! |
@vinkla @felixfbecker Is this really expected suggestion of |
@Kaspik what version of Atom and |
@vinkla 1.23.3, ide-php 0.7.5 |
@Kaspik hmm, did you restart Atom after updating the packages? |
Sure I did. :) It seems to be happening everywhere outside PHP code in .php files where is also HTML/CSS code. |
Please send a Gist which we could test to reproduce the autocompletion with. |
Created absolutely simple file - https://gist.github.com/Kaspik/253512be0f020b151201171a2484c72f |
I've tried switching between HTML och PHP and I can't reproduce this at all. Try removing the package, restart Atom, install the package and restart Atom again. Also check if the the language server reindex your project (in the bottom right corner). |
While editing php files that include html the plugin suggests "<?php" whenever i'm outside a php code block. This makes html editing really tedious.
The text was updated successfully, but these errors were encountered: