Skip to content

Fix updating eglot-sever-programs when multiple java-related assocs e…#66

Open
heinzfridolin wants to merge 1 commit intoyveszoundi:mainfrom
heinzfridolin:fix/eglot-java-init-server
Open

Fix updating eglot-sever-programs when multiple java-related assocs e…#66
heinzfridolin wants to merge 1 commit intoyveszoundi:mainfrom
heinzfridolin:fix/eglot-java-init-server

Conversation

@heinzfridolin
Copy link
Copy Markdown

As it is the eglot-java--init function messes up eglot-server-programs when multiple java-related assocs exist.
For example when it contains two elements with a car of '(java-mode java-ts-mode) because the user previously used add-to-list, then the first one would become '(java-mode java-ts-mode java-mode java-ts-mode) and eventually even self reference and throw an error.

The problem is caused by mapcan which is destructive because of nconc.
Just altering the first match suffices anyways, so we can use cl-find-if instead.

In my case the error often had the effect of eglot-java seemingly initalizing but the eglot-java-eclipse-jdt server
not actually existing, so #56 might be fixed.

@Lucartas
Copy link
Copy Markdown

FWIW I tried to use this branch but the problem described in #56 persisted.

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

Successfully merging this pull request may close these issues.

2 participants