Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ronandalton
Copy link

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 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:

  spacing = 2,

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 },

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 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:

  spacing = 2,

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 },
@ronandalton ronandalton force-pushed the fix-unnecessary-diagnostic-config branch from 253732e to eae3e03 Compare May 18, 2025 01:58
@guru245
Copy link
Contributor

guru245 commented Jun 19, 2025

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.

@ronandalton
Copy link
Author

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 spacing = 2 line can stay if that's what people want - I don't think that makes much difference either way.

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