Skip to content

feat(logcat): link severity highlights to Diagnostic groups#4

Open
gvanderclay wants to merge 1 commit intoiamironz:mainfrom
gvanderclay:loglevel-highlight-links
Open

feat(logcat): link severity highlights to Diagnostic groups#4
gvanderclay wants to merge 1 commit intoiamironz:mainfrom
gvanderclay:loglevel-highlight-links

Conversation

@gvanderclay
Copy link
Copy Markdown

Summary

Logcat already has the same basic severity shape as diagnostics: error, warn, info, debug. The plugin was coloring those with hardcoded named colors (Red, Yellow, Blue, Green), which can look off depending on the user's colorscheme.

This PR links the default logcat severity groups to Neovim's diagnostic groups:

  • AndroidLogcatError -> DiagnosticError
  • AndroidLogcatWarn -> DiagnosticWarn
  • AndroidLogcatInfo -> DiagnosticInfo
  • AndroidLogcatDebug -> DiagnosticHint

These are default links, so user-defined AndroidLogcat* highlights are left alone.

What changed

Logcat severity colors now come from the active colorscheme's diagnostic palette instead of fixed named colors. Users who want their own logcat colors can still set the AndroidLogcat* groups directly.

Testing

  • ./scripts/run-tests.sh tests.android.logcat.highlight_test
  • ./scripts/run-tests.sh
  • Tested manually in Now in Android with :AndroidLogcat and adb-emitted E/W/I/D log lines

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.

1 participant