Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Skip completions in comments #87

Closed
ramya-rao-a opened this issue Nov 22, 2018 · 5 comments · Fixed by #91
Closed

Skip completions in comments #87

ramya-rao-a opened this issue Nov 22, 2018 · 5 comments · Fixed by #91

Comments

@ramya-rao-a
Copy link

It is simple enough for editors to avoid calling gocode when inside a line comment and simple strings, but it gets complicated when inside a block comment or a multi-line string.

It would be great to have gocode avoid giving completions when inside comments and strings.

@tohjustin
Copy link

Would like to take a stab at this task 😅

@ramya-rao-a
Copy link
Author

@stamblerre Can you provide some pointers for @tohjustin ?

@tohjustin
Copy link

@ramya-rao-a @stamblerre Here's my attempt in getting gocode to not provide autocomplete results when the cursor is inside a comment.

Do we want this as a default behavior for gocode or should I introduce this via a new flag instead?

@stamblerre
Copy link
Collaborator

Sorry I wasn't able to give advice, but the PR looks pretty good. I'll add some comments there. Thanks for the contribution, @tohjustin!

@tohjustin
Copy link

No worries, thanks for the quick response! 😄

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

Successfully merging a pull request may close this issue.

3 participants