lewis6991 / satellite.nvim

Decorate scrollbar for Neovim
MIT License
542 stars 20 forks source link

Improvements in diagnostic handler #42

Closed nenikitov closed 1 year ago

nenikitov commented 1 year ago

More customization in diagnostic handler

Exposed more configuration parameters (signs and min_severity). Both can be configured with setup:

require('satellite').setup {
    diagnostic = {
      signs = {'-', '=', '≡'},
      min_severity = vim.diagnostic.severity.HINT,
    },
}

Added min_severity option

This option specifies the least important diagnostic that should be shown on the scroll bar. By default it is set to HINT, which means all diagnostics are shown. But, if set to INFO, it will show everything including INFO, but not HINT. Example:

Better highlights

Before, the diagnostic sign was highlighted with the severity of the last diagnostic in that part of the file. Which means that, sometimes, the lines with multiple diagnostics wouldn't be highlighted properly: