Code completion.

4 views
Skip to first unread message

Phil Norman

unread,
Sep 15, 2018, 4:59:49 AM9/15/18
to evergre...@googlegroups.com
Hi.

Code completion is hard(er than I can be bothered with). There's a project called 'you complete me' (https://github.com/Valloric/ycmd) which is supposed to be very good. The logic is in an HTTP server, and it exposes a JSON API. As such, it would probably not be very hard to integrate it with Evergreen.

Has anyone tried this before?

Cheers,
Phil

Elliott Hughes

unread,
Sep 15, 2018, 12:30:35 PM9/15/18
to evergre...@googlegroups.com
this is what i was talking about when i mentioned "clangd"/"LSP" support. https://clang.llvm.org/extra/clangd.html is clang's implementation of the https://github.com/Microsoft/language-server-protocol (there are other back-ends for other languages).

it would let us kill importPath and lintChecker too, give us instant(ish) error/warning feedback, and, well, far too many things to list: https://clang.llvm.org/extra/clangd.html#current-status

to be clear: i think ycmd is bad, but the similar LSP is a good way to get to where we want to be --- an Evergreen that has more functionality than today, but all outsourced to tools like clang rather than us having to have our own C++ parsers and the like. (even Visual Studio Code and IntelliJ are moving in this direction, though the former still defaults to the traditional MS Visual C++ compiler frontend.)

--
You received this message because you are subscribed to the Google Groups "evergreen-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evergreen-use...@googlegroups.com.
To post to this group, send email to evergre...@googlegroups.com.
Visit this group at https://groups.google.com/group/evergreen-users.
For more options, visit https://groups.google.com/d/optout.


--

Phil Norman

unread,
Sep 16, 2018, 10:15:23 AM9/16/18
to evergre...@googlegroups.com
On 15 September 2018 at 18:30, Elliott Hughes <elliott....@gmail.com> wrote:
this is what i was talking about when i mentioned "clangd"/"LSP" support. https://clang.llvm.org/extra/clangd.html is clang's implementation of the https://github.com/Microsoft/language-server-protocol (there are other back-ends for other languages).

OK, I have no problem with going with that, if it's a properly-defined open standard, as it seems to be.
 

it would let us kill importPath and lintChecker too, give us instant(ish) error/warning feedback, and, well, far too many things to list: https://clang.llvm.org/extra/clangd.html#current-status

to be clear: i think ycmd is bad, but the similar LSP is a good way to get to where we want to be --- an Evergreen that has more functionality than today, but all outsourced to tools like clang rather than us having to have our own C++ parsers and the like. (even Visual Studio Code and IntelliJ are moving in this direction, though the former still defaults to the traditional MS Visual C++ compiler frontend.)

Out of interest, why do you consider ycmd bad? Is it because all it does (I assume, from the discover that LSP exists) is wrap a bunch of other people's work, and slap on its own API? Or is it the quality of the code (or language) it's written in?



On Sat, Sep 15, 2018 at 1:59 AM Phil Norman <phil...@gmail.com> wrote:
Hi.

Code completion is hard(er than I can be bothered with). There's a project called 'you complete me' (https://github.com/Valloric/ycmd) which is supposed to be very good. The logic is in an HTTP server, and it exposes a JSON API. As such, it would probably not be very hard to integrate it with Evergreen.

Has anyone tried this before?

Cheers,
Phil

--
You received this message because you are subscribed to the Google Groups "evergreen-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evergreen-users+unsubscribe@googlegroups.com.
To post to this group, send email to evergreen-users@googlegroups.com.


--

--
You received this message because you are subscribed to the Google Groups "evergreen-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evergreen-users+unsubscribe@googlegroups.com.
To post to this group, send email to evergreen-users@googlegroups.com.

Elliott Hughes

unread,
Sep 16, 2018, 11:47:45 AM9/16/18
to evergre...@googlegroups.com
On Sun, Sep 16, 2018 at 7:15 AM Phil Norman <phil...@gmail.com> wrote:


On 15 September 2018 at 18:30, Elliott Hughes <elliott....@gmail.com> wrote:
this is what i was talking about when i mentioned "clangd"/"LSP" support. https://clang.llvm.org/extra/clangd.html is clang's implementation of the https://github.com/Microsoft/language-server-protocol (there are other back-ends for other languages).

OK, I have no problem with going with that, if it's a properly-defined open standard, as it seems to be.
 

it would let us kill importPath and lintChecker too, give us instant(ish) error/warning feedback, and, well, far too many things to list: https://clang.llvm.org/extra/clangd.html#current-status

to be clear: i think ycmd is bad, but the similar LSP is a good way to get to where we want to be --- an Evergreen that has more functionality than today, but all outsourced to tools like clang rather than us having to have our own C++ parsers and the like. (even Visual Studio Code and IntelliJ are moving in this direction, though the former still defaults to the traditional MS Visual C++ compiler frontend.)

Out of interest, why do you consider ycmd bad? Is it because all it does (I assume, from the discover that LSP exists) is wrap a bunch of other people's work, and slap on its own API? Or is it the quality of the code (or language) it's written in?

"bad" only in that i think it's a dead-end and a distraction from LSP, which seems to be where the ball is going. (see the tables on https://langserver.org/ for both languages and editors.)

tbh, i was pretty underwhelmed when i tried ycm with vim at work to answer the "should the NDK do more to support this kind of thing", but i'm not sure how much that was vim's fault vs ycm. (the "compile-commands.json" work seems worthwhile anyway --- even though the modern build systems don't even have a default location for it, the bastards.)

one thing LSP/VSC don't currently support is showing doxygen/javadoc for an arbitrary symbol. but showing the argument names and showing warnings/errors before you compile make up for it, at least when you mostly know what you're doing anyway.

-*-

seems like Java never got out-of-the-box JSON support? there was a JSR years ago, but nothing happened?
 



On Sat, Sep 15, 2018 at 1:59 AM Phil Norman <phil...@gmail.com> wrote:
Hi.

Code completion is hard(er than I can be bothered with). There's a project called 'you complete me' (https://github.com/Valloric/ycmd) which is supposed to be very good. The logic is in an HTTP server, and it exposes a JSON API. As such, it would probably not be very hard to integrate it with Evergreen.

Has anyone tried this before?

Cheers,
Phil

--
You received this message because you are subscribed to the Google Groups "evergreen-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evergreen-use...@googlegroups.com.
To post to this group, send email to evergre...@googlegroups.com.


--

--
You received this message because you are subscribed to the Google Groups "evergreen-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evergreen-use...@googlegroups.com.
To post to this group, send email to evergre...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "evergreen-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evergreen-use...@googlegroups.com.
To post to this group, send email to evergre...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages