pragmagic / vscode-nim

An extension for VS Code which provides support for the Nim language.
Other
237 stars 37 forks source link

Suggestions when writing comments #33

Closed dom96 closed 7 years ago

dom96 commented 7 years ago

Not sure if this is an issue with this plugin or VS code. But getting suggestions in comments is absolutely infuriating sometimes.

In fact, I had to just disable suggestions because seeing them pop up so often is simply too distracting.

RSDuck commented 7 years ago

As far I can tell the issue is related to nimsuggest. When requested it still suggests symbols although the cursor is located in a comment. It would be easy to fix it from plugin side(by searching the code before the cursor), but in my opinion it is a problem of nimsuggest. It shouldn't suggest something at all when the cursor is in a comment.

A similar issue is that nimsuggest suggests the usage of a nearby procedure call when the cursor actually located in the brackets of a tuple.

dom96 commented 7 years ago

I would say it's a bug in both. VS Code shouldn't request suggestions when the cursor is inside a comment.

RSDuck commented 7 years ago

In this case every editor has to implement the same feature. I think it would be smarter to keep the plugins as thin as possible and centralize the whole completion progress with nimsuggest.

RSDuck commented 7 years ago

Both Nimsuggest(https://github.com/nim-lang/Nim/commit/1887390b0f5e768e41aa220ea34f8059de5862b0) and VSCode(https://code.visualstudio.com/updates/v1_11#_intellisense-in-comments) now take care of it, so I think this issue can be closed.