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

Make it work on windows #2

Closed
joaotavora opened this issue May 17, 2018 · 4 comments
Closed

Make it work on windows #2

joaotavora opened this issue May 17, 2018 · 4 comments

Comments

@joaotavora
Copy link
Owner

In issue #1, the secondary "hang" problem is probably windows-specific. In version 0.3, commit 12691c2, I pushed some code to make it work on windows and did some testing, but I'm opening this issue to register any more problems.

@LeviHarman
Copy link

LeviHarman commented May 17, 2018

I'm using the version of eglot found on melpa freshly installed

I started emacs 26.1 with emacs& from a Cygwin shell
The php executable I'm using is the Cygwin version found in "/usr/bin/php"

I ran shell-command-on-region RET cat RET
Result was [flymake-proc php-language-server.php]: deleted file /cygdrive/c/home/.config/composer/vendor/felixfbecker/language-server/bin/php-language-server_flymake.php

I then disabled flymake-mode and ran shell-command-on-region RET cat RET again the result was
new ProtocolStreamReader($socket),

I'm using this to add php-server which is where I have php-language-server installed.

  (add-to-list 'eglot-server-programs 
	       '(php-mode . ("php" "~/.config/composer/vendor/felixfbecker/language-server/bin/php-language-server.php")))

I'm going to test using the "host:port" solution next, afterwards I'm going to copy eglot.el and try everything I tried but using eglot.el from github.

EGLOT server (~/php-mode) inferior output
Could not open input file: ~/.config/composer/vendor/felixfbecker/language-server/bin/php-language-server.php
This makes me think I need to build felixfbecker language-server with cygwins php since I had built it with a windows php previously. I'll try that and let you know.

EGLOT server (~/php-mode) events output

client-request (id:1):
(:jsonrpc "2.0" :id 1 :method :initialize :params
	  (:processId 5964 :capabilities
		      (:workspace
		       (:applyEdit t :workspaceEdit
				   (:documentChanges :json-false)
				   :didChangeWatchesFiles
				   (:dynamicRegistration t)
				   :symbol
				   (:dynamicRegistration :json-false))
		       :textDocument
		       (:synchronization
			(:dynamicRegistration :json-false :willSave t :willSaveWaitUntil t :didSave t)
			:completion
			(:dynamicRegistration :json-false)
			:hover
			(:dynamicRegistration :json-false)
			:signatureHelp
			(:dynamicRegistration :json-false)
			:references
			(:dynamicRegistration :json-false)
			:definition
			(:dynamicRegistration :json-false)
			:documentSymbol
			(:dynamicRegistration :json-false)
			:documentHighlight
			(:dynamicRegistration :json-false)
			:rename
			(:dynamicRegistration :json-false)
			:publishDiagnostics
			(:relatedInformation :json-false))
		       :experimental nil)
		      :rootUri "file:///cygdrive/c/home/testphplsp/" :initializationOptions
		      []))

:internal-message:
(:message "Process state changed" :change "exited abnormally with code 1\n")


----------b---y---e---b---y---e----------

@joaotavora
Copy link
Owner Author

I'm using the version of eglot found on melpa freshly installed

The version available on GNU ELPA (not "melpa" yet) is not the latest version, you must either wait until ELPA builds a new package tomorrow, or download "eglot.el" from git using whatever method you want (clone, direct copy from the web interface, etc).

Never mind about the shell-command-on-region forget about that completely. :)

With eglot.el from github, if you're lucky, you should be good to go with both the TCP solution and the direct stdin solution.

@LeviHarman
Copy link

Okay, I'll use eglot.el from github for now.

I believe starting the server with php vendor/felixfbecker/language-server/bin/php-language-server.php --tcp-server=localhost:9009 works with the version from melpa

And connect with localhost:9009 seems to establish a connection.

DEBUG     Checking PHPLS_ALLOW_XDEBUG
DEBUG     The xdebug extension is not loaded
DEBUG     Server listening on localhost:9009
NOTICE    PCNTL is not available. Only a single connection will be accepted
DEBUG     Connection accepted

I'm going to try the newest version from github now.

@joaotavora
Copy link
Owner Author

Assuming you for this working in the meantime. If I'm wrong, please tell me and I'll reopen.

dandavison added a commit to dandavison/eglot that referenced this issue Sep 24, 2021
# This is the 1st commit message:

Add tests of eglot--guess-contact

# The commit message joaotavora#2 will be skipped:

# Improve name of test utility and add docstring

# The commit message joaotavora#3 will be skipped:

# Redesign macro used in eglot--guess-contact test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants