emacs-ycmd icon indicating copy to clipboard operation
emacs-ycmd copied to clipboard

Figure out what a normal ycmd install looks like

Open abingham opened this issue 11 years ago • 5 comments

Update our defaults to use it.

abingham avatar Aug 30 '14 05:08 abingham

I've have built YCMD. I see that in the code you invoke ycmd runnable to start the server. Unfortunately, I have nothing like that after the build. There are only two native libraries: ycm_client_support.pyd and ycm_core.pyd. How to invoke YCMD properly? Is your resulting build structure different? Thanks.

Alexander-Shukaev avatar Nov 05 '14 14:11 Alexander-Shukaev

The way I do it is by running the ycmd package directly. If you cloned ycmd into, say, /projects, you'll end up with /projects/ycmd/ycmd, and in that directory is a __main__.py. What this means is that you can ask Python to execute that directory, and it will run __main__.py. So, what I do on my system is run ycmd like python /projects/ycmd/ycmd. This seems to work just fun. You can configure this in emacs lisp like this:

(set-variable 'ycmd-server-command '("python" "/projects/ycmd/ycmd"))

(By the way, sorry if this is all stuff you already know...I figured it was better to say too much rather than too little.)

In other words, the default value for ycmd-server-command is currently a lie. It will probably never work, hence this issue.

There is not, as far as I know, any support in ycmd for creating some sort of program for running the server. I don't know the reasons why they haven't done that...it may be that ycmd has complex deployment issues (which I think it does.) Maybe they just need prodding to do so. You might talk with the ycmd developers about this.

If you do find out a good answer to how ycmd should be run by default, let me know!

abingham avatar Nov 05 '14 15:11 abingham

Thanks a lot. Yes, indeed I'm aware of that, I just got confused by the default that your code offers. Probably adding a small comment or a documentation with similar contents would make it much clearer for users.

By the way, I'm the one who provides Vim YouCompleteMe for Windows. Since the release it became quite popular. If your project works out well, then I might open the same counterpart for Emacs what would surely boost your user base. Best of luck and keep up the good work!

Alexander-Shukaev avatar Nov 05 '14 15:11 Alexander-Shukaev

Sorry for the confusion. I've updated the default value in 622b0b81c0da66ab0b1682a4b24ae82d69903bd1.

Regarding windows, will you really need to do anything special for emacs? It seems like there may need to be some work to get ycmd to work, but I think this emacs client will work on windows with no real effort.

In any event, I think it would be great if you got ycmd working on windows!

abingham avatar Nov 05 '14 15:11 abingham

Yes, it does work in Vim and it does work in Emacs without any efforts... it's Python after all. ;)

Alexander-Shukaev avatar Nov 05 '14 15:11 Alexander-Shukaev