{"action":"created","issue":{"url":"https://api.github.com/repos/joaotavora/eglot/issues/63","repository_url":"https://api.github.com/repos/joaotavora/eglot","labels_url":"https://api.github.com/repos/joaotavora/eglot/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/joaotavora/eglot/issues/63/comments","events_url":"https://api.github.com/repos/joaotavora/eglot/issues/63/events","html_url":"https://github.com/joaotavora/eglot/issues/63","id":347987887,"node_id":"MDU6SXNzdWUzNDc5ODc4ODc=","number":63,"title":"workspace path as lsp server command line option","user":{"login":"gavocanov","id":1512839,"node_id":"MDQ6VXNlcjE1MTI4Mzk=","avatar_url":"https://avatars1.githubusercontent.com/u/1512839?v=4","gravatar_id":"","url":"https://api.github.com/users/gavocanov","html_url":"https://github.com/gavocanov","followers_url":"https://api.github.com/users/gavocanov/followers","following_url":"https://api.github.com/users/gavocanov/following{/other_user}","gists_url":"https://api.github.com/users/gavocanov/gists{/gist_id}","starred_url":"https://api.github.com/users/gavocanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavocanov/subscriptions","organizations_url":"https://api.github.com/users/gavocanov/orgs","repos_url":"https://api.github.com/users/gavocanov/repos","events_url":"https://api.github.com/users/gavocanov/events{/privacy}","received_events_url":"https://api.github.com/users/gavocanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2018-08-06T16:10:05Z","updated_at":"2018-08-08T22:18:55Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm trying to use [java lsp](https://github.com/eclipse/eclipse.jdt.ls) and all is working great, but I need to pass a command line argument for the workspace path when starting the lsp server.\r\n\r\nI do not see a way to do it with the current options, is there anyway I can accomplish that ?\r\n\r\n```elisp\r\n(add-to-list 'eglot-server-programs '(java-mode . (\"java\"\r\n                                                      \"-Declipse.application=org.eclipse.jdt.ls.core.id1\"\r\n                                                      \"-Dosgi.bundles.defaultStartLevel=4\"\r\n                                                      \"-Declipse.product=org.eclipse.jdt.ls.core.product\"\r\n                                                      \"-Dlog.protocol=true\"\r\n                                                      \"-Dlog.level=ALL\"\r\n                                                      \"-noverify\"\r\n                                                      \"-Xmx1G\"\r\n                                                      \"-jar\" \"plugins/org.eclipse.equinox.launcher_1.5.100.v20180611-1436.jar\"\r\n                                                      \"-configuration\" \"config_mac\")))\r\n```\r\nI should ad \"-data\" as the last option with project root. If I add a hardcoded path all works fine but I need this to be dynamic, ideally using `(projectile-project-root)` or something similar.\r\n\r\nThnx in advance and keep up the good work, eglot is really great!"},"comment":{"url":"https://api.github.com/repos/joaotavora/eglot/issues/comments/411571400","html_url":"https://github.com/joaotavora/eglot/issues/63#issuecomment-411571400","issue_url":"https://api.github.com/repos/joaotavora/eglot/issues/63","id":411571400,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTU3MTQwMA==","user":{"login":"mkcms","id":10572727,"node_id":"MDQ6VXNlcjEwNTcyNzI3","avatar_url":"https://avatars2.githubusercontent.com/u/10572727?v=4","gravatar_id":"","url":"https://api.github.com/users/mkcms","html_url":"https://github.com/mkcms","followers_url":"https://api.github.com/users/mkcms/followers","following_url":"https://api.github.com/users/mkcms/following{/other_user}","gists_url":"https://api.github.com/users/mkcms/gists{/gist_id}","starred_url":"https://api.github.com/users/mkcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkcms/subscriptions","organizations_url":"https://api.github.com/users/mkcms/orgs","repos_url":"https://api.github.com/users/mkcms/repos","events_url":"https://api.github.com/users/mkcms/events{/privacy}","received_events_url":"https://api.github.com/users/mkcms/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T22:18:55Z","updated_at":"2018-08-08T22:18:55Z","author_association":"CONTRIBUTOR","body":"> What are you doing vis-à-vis the project-roots and workspaceFolders thing?\r\n\r\nCurrently nothing and it seems to work. This server is really undocumented so I don't even know what should go there. I assume that subdirs with `pom.xml` (or gradle files) should be included there?\r\n\r\n> I see that you are passing a dummy workspace dir as data. What is really happening there?\r\n\r\nI think it's just a cache directory for the server. I tried putting real eclipse workspaces there and the server works, but it gives the errors \"classpath is incomplete, only syntax errors will be reported\". Not providing this argument also gives the same errors.\r\n\r\n> BTW I think that it wouldn't be unreasonable to ask for this LSP server to come bundled with a script (or something like that) that does all this. It's kind of ridiculous that the LSP client has to. I can make a pull request there.\r\n\r\nThat would be great. It's even possible to build standalone executables of this server (I got mine in `./org.eclipse.jdt.ls.product/target/products/languageServer.product/linux/gtk/x86_64/eclipse`) although I don't even remember how I did it now (also it gave the same \"classpath is incomplete\" errors)."}}
{"actor":{"display_login":"mkcms"}}