Warning message if clangd not found not displayed ?

Alexander Neundorf neundorf at kde.org
Wed Oct 5 22:50:25 BST 2022


On Sonntag, 2. Oktober 2022 17:01:24 CEST you wrote:
> On 2022-10-02 14:23, Alexander Neundorf wrote:
> > On Mittwoch, 28. September 2022 00:39:07 CEST Alexander Neundorf wrote:
> >> Hi,
> >> 
> >> I digged a bit into my clangd problems, and got a little bit further.
> >> If clangd is not installed (it doesn't crash anymore, I think it did
> >> in
> >> older versions, that's good :-) ),
> >> In LSPClientServerManagerImpl::_findServer() it ends up in the branch
> >> "we didn't find the server at all!", where a warning should be
> >> displayed
> >> using showMessage(), but I can't see the warning. "LSP Client" ->
> >> "More
> >> Options" -> "Show Messages" is checked.
> >> Where should the message appear ?
> > 
> > ok, I found it. The message that clangd could not be started is as a
> > warning
> > in the "Output" tab, which I usually never open.
> > I really looked closely at kate to find the message, and I found it
> > only after
> > digging into the sources. I would assume that many users will not see
> > it.
> > 
> > IMO this warning message is so important that the user needs to see it
> > (because it means that "Switch header" does not work, which at least to
> > me is
> > essential in navigating between files).
> > I could change it from Warning to Error, then the tab will by default
> > be
> > opened if the message is issued.
> > This may happen multiple times, e.g. also for each different language.
> > I could add a flag so that it is issued only once as error for every
> > language,
> > and then as warning afterwards ?
> 
> Hi,
> 
> I think we downgraded this to warning as it was super annoying to have
> always the
> output tab there.
> 
> On the other side, you now need to acknowledge the start the first time,
> too, perhaps a first time error would make sense, too.
> 
> But the acknowledge is persistent, over application runs, I think the
> same must be true for errors, if we want that.

how about the attached patch ?
The user will see the error once per kate instance, which makes sense to me.

If you think this is reasonable, I'll create a merge request etc.

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: show_as_error_omce.patch
Type: text/x-patch
Size: 2430 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20221005/8fb7f4b0/attachment.bin>


More information about the KWrite-Devel mailing list