-
Notifications
You must be signed in to change notification settings - Fork 35.9k
fix: remove unnecessary diagnostic config lines #1550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: remove unnecessary diagnostic config lines #1550
Conversation
253732e
to
eae3e03
Compare
I agree with the first one. But IMHO the second and the third one are a matter of preference and so we don't really need to change. |
I somewhat agree, but if it's a matter of preference then I think it shouldn't be in kickstart to begin with. There should be a good usability/QoL reason to deviate from the default nvim behavior and increase the config size, and I'm not seeing it. The underline config makes the experience worse than the default because now you can't tell which part of the line has the issue. The |
For posterity's sake, the current default value for |
@ronandalton Oh I didn't know the underline config is pointing to the exact part that has the issue. Good to know. Thanks. The remaining part is spacing. I can see the spacing is 4 by default. But it was already set to 2 for inexplicable reason and many people are already using it and have gotten used to it I think. So I was wondering if it was worth changing it. I'm just saying my humble opinion. 😊 |
That seems fair, since it has already been changed and returning the spacing to 4 would show less text on the screen in comparison to now, which could be seen as a regression. I will update my patch to omit the removal of the |
The following lines do nothing and can be removed: format = function(diagnostic) local diagnostic_message = { [vim.diagnostic.severity.ERROR] = diagnostic.message, [vim.diagnostic.severity.WARN] = diagnostic.message, [vim.diagnostic.severity.INFO] = diagnostic.message, [vim.diagnostic.severity.HINT] = diagnostic.message, } return diagnostic_message[diagnostic.severity] end, The following line causes diagnostics which aren't of severity level error to not have the specific text area underlined. This is less useful than the default of showing underlines for all diagnostic levels, so remove this line as well: underline = { severity = vim.diagnostic.severity.ERROR },
eae3e03
to
7c31d2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The following lines do nothing and can be removed:
The following line also serves little purpose, seemingly only reducing the spacing between the end of lines and diagnostic virtual text by two characters, so it can also be removed (EDIT: this change was omitted in the final patch):
The following line causes diagnostics which aren't of severity level error to not have the specific text area underlined. This is less useful than the default of showing underlines for all diagnostic levels, so remove this line as well: