怎样配置eglot 是其能够打开maven 依赖的源代码呢?

我现在的eglot jdtls 配置只能跳转到工程内的源代码,没法查看maven 依赖的源代码,也没法查看jdk的源代码。

谢谢! 只jarchive 不工作,是不是必须配合eglot-java 呢?

当然是看一眼源码,有没有require了。。。

1 个赞

确认了,是需要搭配的,虽然没有相应的require. 差不多看来了2小时关于这个的讨论!

eglot-java 里有对 jdt:// 文件协议的解析方法,jarchive 里有对 clojure jar包依赖的解析方法,另外如果你不想把打开的源代码当成新项目新开一个lsp server的话,把 eglot-extend-to-xref 设为 t

If you want eglot to manage the opened jar’d file in your project’s current lsp session, set

(setq eglot-extend-to-xref t)

This will allow xref to work across your project and the opened file. If you do not want that, the eglot will probably start a new server to manage the newly opened file. There are legitimate reasons to do this, because including it in the current LSP session will mean it is included when looking up references. Large files, like the clojure core library, could create a lot of noise in xref lookups. Another recommendation if you don’t want them managed by eglot is to set

2 个赞

hot code replace 支持吗?