error-lens.nvim icon indicating copy to clipboard operation
error-lens.nvim copied to clipboard

Any options to toggle diagnostic message?

Open JustinDuDuDuDu29 opened this issue 2 years ago • 5 comments

I'm currently using this plugin and find it very useful. But I use my own diagnostic message setup, so I need to turn of the diagnostic message from this plugin. I wonder if there is any option or config I can do to toggle the message ?

The way I am doing now is modifying the code in highlight.lua manually image

JustinDuDuDuDu29 avatar May 27 '23 15:05 JustinDuDuDuDu29

@JustinDuDuDuDu29 Sorry for the late response, I've been super busy in the last time.

So you don't want the text? you just want the line highlight?

chikko80 avatar May 31 '23 14:05 chikko80

@chikko80 Yes, that's what I meant. Sometime the error would be too long and getting out of screen. It would be convenient if one can toggle it in configuration

JustinDuDuDuDu29 avatar Jun 05 '23 13:06 JustinDuDuDuDu29

@JustinDuDuDuDu29 i don't use nvim anymore cause unfortunately it lacks a lot of important features i need for my work at the moment. I'll be super busy until fall this year, so if you want to have it changed a PR would be really welcome, otherwise i can take a look at it around october. But as you already figured out, its just this line:

		virt_text = {
			{ string.rep(" ", 5) .. diagnostic.message, fg },
		},

Its probably just setting a bool in the config.lua and do a condition on that line. Would you be down for a PR?

chikko80 avatar Jun 23 '23 08:06 chikko80

@chikko80 Sure, I'll try my best on that. A great chance to improve my skill ! Thanks a lot.

JustinDuDuDuDu29 avatar Jun 23 '23 09:06 JustinDuDuDuDu29

@JustinDuDuDuDu29 I think you got this! I've coded this plugin with 0 lua experience 5 days after i started using nvim. Docs and GPT will be your friend! :)

chikko80 avatar Jun 23 '23 09:06 chikko80