Skip to content
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

Ignore on inline comments #39

Closed
zchee opened this issue Feb 9, 2016 · 15 comments
Closed

Ignore on inline comments #39

zchee opened this issue Feb 9, 2016 · 15 comments
Labels

Comments

@zchee
Copy link
Member

zchee commented Feb 9, 2016

Currently, complements even during inline comments.
e.g.

fmt.Printf("|")
//          ^
//          | cursor

I don’t mind either way.
Please let us know what you think.

screenshot 2016-02-10 07 59 37

@zchee zchee added the question label Feb 9, 2016
@mmlb
Copy link
Contributor

mmlb commented Feb 9, 2016

Yeah I've noticed this and have found it slightly annoying, it would be nice to not have it.

@Shougo
Copy link
Collaborator

Shougo commented Feb 9, 2016

Hm...
I can add the feature though.

@zchee
Copy link
Member Author

zchee commented Feb 9, 2016

@Shougo Its meaning is add implements to deoplete?

@Shougo
Copy link
Collaborator

Shougo commented Feb 9, 2016

neocomplete implements near feature: neocomplete#helper#get_syn_name().

@zchee
Copy link
Member Author

zchee commented Feb 9, 2016

@Shougo Ok, I check it now.

@zchee
Copy link
Member Author

zchee commented Feb 9, 2016

@Shougo I understand.
Is it like this?

e.g. (sloppy...)

let neocomplete.within_comment = neocomplete#helper#get_syn_name(1) =~? '"'

@Shougo
Copy link
Collaborator

Shougo commented Feb 9, 2016

Yes, but it is slow.
It should be called if it is really needed.

@zchee
Copy link
Member Author

zchee commented Feb 9, 2016

@Shougo Oh...

Tentatively, realized in this. based by #19
In golang, Comments start is // or /*.
It does not supported /* and buggy,
https://gist.github.com/zchee/72e2007991c188030742#file-deoplete-go-py-L48-L49

Is this also slow?

@fatih
Copy link

fatih commented Feb 10, 2016

YCM has this option g:ycm_complete_in_comments: https://github.com/Valloric/YouCompleteMe/blob/master/doc/youcompleteme.txt#L1970-L1977

Which is a setting to enable/disable inside comments

And g:ycm_complete_in_strings: https://github.com/Valloric/YouCompleteMe/blob/master/doc/youcompleteme.txt#L1980-L1994

For enabling/disabling inside strings

Would be great if could have it inside deoplete or somehow inside deoplete-go. Not sure which is the correct place.

@Shougo
Copy link
Collaborator

Shougo commented Feb 11, 2016

Is this also slow?

It is not slow. But it is too hard to parse the comment correctly.
The Vim syntax feature is slow but it is more correctly.

@Shougo
Copy link
Collaborator

Shougo commented Feb 11, 2016

@fatih I think YCM already implements same feature with neocomplete.
But I think it is slow.

@Shougo
Copy link
Collaborator

Shougo commented Feb 11, 2016

I have added get_syn_name() in deoplete.util.

@zchee
Copy link
Member Author

zchee commented Feb 12, 2016

@Shougo Thanks!
I'll check later.

It is not slow. But it is too hard to parse the comment correctly.
The Vim syntax feature is slow but it is more correctly.

I understand. sure, it seems difficult...

@Shougo
Copy link
Collaborator

Shougo commented Feb 16, 2016

I have implemented "disabled_syntaxes" feature.

@zchee
Copy link
Member Author

zchee commented Feb 16, 2016

@Shougo Thanks!!
Fix of the code of deoplete-go is no longer required. You have saved me.

@fatih Your wishes also came true in deoplete.nvim core implementation.

Also, this issue thread has been resolved, Close.

@zchee zchee closed this as completed Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants