egolt start lsp with only specific module from a repo -- project.el question #1336
-
Eglot relies on project package which has vs-aware behavior and sets the project root to the repo, but this causes lsp server to hangs indefinitely for multimodule (100>) projects |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm having a hard time understanding your request, but it sounds familiar. You have two options:
As far as I know, you can do both things with For the second option, you have to use Elisp, adding a member function to (defun my/project-find-function (dir)
(when-let ((match
(and (bound-and-true-p eglot-lsp-context)
(locate-dominating-file dir "some-marker-file"))))
`(transient . ,match)))
(add-hook 'project-find-functions #'my/project-find-function) |
Beta Was this translation helpful? Give feedback.
I'm having a hard time understanding your request, but it sounds familiar. You have two options:
You tell your Emacs session as a whoel that the root of the project is not the root of the repo. -- for that particular project. That affects everything project related, not just Eglot.
You tell Eglot that the project it should consider as the root of the LSP project is not what
project.el
by defaults tells it.As far as I know, you can do both things with
project.el
's interfaces. Maybe there's an easy way to do the first. Ask the project.el manager @dgutov .For the second option, you have to use Elisp, adding a member function to
project-find-functions
, the documentation of which you …