RepublicWorried · 2022-12-20 09:33
I would like to have shown only error diagnosis in the minibuffer when point is over some squiggly line. Other than that, I dont want eglot/xref to show anything. Can someone tell me how to accomplish this?
orzechod · 2022-12-20 14:12
check out `eldoc-documentation-strategy`. its default value is `'eldoc-documentation-default`, which calls eldoc hook functions in order until one of them returns non-nil. I have it set to `'eldoc-documentation-compose` (which calls all hook functions and displays all non-nil results) since it's often useful to me to see both the error message and the docstrings belonging to the code causing the error.
(you can also [advise `eldoc-message` to prefer help-at-point](https://github.com/orzechowskid/duomacs/blob/main/duomacs-pkg-mgmt.el#L59) but that'd be a global solution and not one specific to eglot.)
RepublicWorried · 2022-12-20 16:55
thanks, I want only errors, nothing else there. Cant seem to find an option for that
orzechod · 2022-12-20 17:26
if you're looking for an option value like "show me only errors" then you're not going to find it because that's not how it works. eldoc doesn't know what you the human consider to be an error; all it does is call a list of functions when asked, and to display the return values of one or more of those functions in your echo area. if you only want certain things to appear there, you configure some combination of `eldoc-documentation-strategy` and `eldoc-documentation-functions` to meet your needs.
RepublicWorried · 2022-12-20 22:07
im an elisp noob. can you help me how?