From c6a6028da3b5fe9373a4f5e27ca40f44d16e5d6b Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Wed, 25 Oct 2023 23:25:28 -0400 Subject: [PATCH] Exception hierarchy highlighting fixed. --- vim/after/syntax/cpp.vim | 34 +++++++++++++++++++++------------- vim/colors/adam.vim | 13 +++++++++---- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/vim/after/syntax/cpp.vim b/vim/after/syntax/cpp.vim index f6d03a2..b18e925 100644 --- a/vim/after/syntax/cpp.vim +++ b/vim/after/syntax/cpp.vim @@ -19,18 +19,22 @@ syn keyword cxxExportNamespace exports syn match cxxConstants "\<\(C::[A-Za-z_]\|k[A-Z]\)[A-Z_a-z0-9]*\>" -syn keyword cxxErrorNames Critical CriticalError +syn keyword cxxExceptionNames Exception Exception + +syn keyword cxxConditionNames Condition +syn keyword cxxNotificationNames Notification +syn keyword cxxErrorNames Error +syn keyword cxxCriticalNames Critical CriticalError +syn keyword cxxViolationNames Violation -syn keyword cxxExceptionNames Exception Exceptions Error syn match cxxExceptionNames "\<[A-Z][A-Za-z0-9_]*Exception\>" -syn match cxxExceptionNames "\<[A-Z][A-Za-z0-9_]*Error\>" -syn match cxxErrorNames "\" -syn keyword cxxNotificationNames Notification - -syn keyword cxxConditionNames Condition - -syn keyword cxxViolationNames Violation +syn match cxxConditionNames "\<[A-Z][A-Za-z0-9_]*Condition\>" +syn match cxxNotificationNames "\<[A-Z][A-Za-z0-9_]*Notification\>" +syn match cxxErrorNames "\<[A-Z][A-Za-z0-9_]*Error\>" +syn match cxxCriticalNames "\" +syn match cxxCriticalNames "\<[A-Z][A-Za-z0-9_]*CriticalError\>" +syn match cxxViolationNames "\<[A-Z][A-Za-z0-9_]*Violation\>" syn match cxxCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*\(<\)\@=" @@ -232,13 +236,17 @@ if version >= 508 || !exists("did_cxx_syntax_inits") HiLink cxxStatement Statement - HiLink cxxErrorNames Error - HiLink cxxExceptionNames Exception - HiLink cxxConditionNames Condition + " The exception breakdown: + HiLink cxxExceptionNames Throwable + + HiLink cxxConditionNames Condition HiLink cxxNotificationNames Notification - HiLink cxxViolationNames Violation + HiLink cxxErrorNames Exception + HiLink cxxCriticalNames Critical + HiLink cxxViolationNames Violation HiLink cxxStlExceptionNames Exception + HiLink cxxStlNothrow Nothrow HiLink cxxStlNothrowObject NothrowObject HiLink cxxDebug Debug diff --git a/vim/colors/adam.vim b/vim/colors/adam.vim index e6e4f6d..3cd472f 100644 --- a/vim/colors/adam.vim +++ b/vim/colors/adam.vim @@ -91,14 +91,19 @@ hi MetaFunction ctermfg=darkcyan start=[36m stop=[0m hi Comment ctermfg=darkgrey cterm=none term=NONE term=none start=[38;5;242m stop=[0m hi Identifier ctermfg=cyan cterm=none term=none start=[96m stop=[0m hi Object ctermfg=red term=none start=[91m stop=[0m -hi Exception ctermfg=brown term=none start=[38;5;130m stop=[0m + + +hi Throwable ctermfg=cyan term=underline + +hi Condition ctermfg=darkgreen cterm=italic hi Notification ctermfg=yellow cterm=italic -hi Condition ctermfg=darkgreen cterm=italic -hi Violation ctermfg=208 cterm=italic,underline +hi Exception ctermfg=brown cterm=italic +hi Critical ctermfg=202 cterm=italic,underline +hi Violation ctermbg=red ctermfg=white + hi Nothrow ctermfg=215 term=none start=[38;5;130m stop=[0m hi Nothrow ctermfg=58 term=none start=[38;5;130m stop=[0m hi Service ctermfg=green start=[32m stop=[0m -hi Error ctermbg=red ctermfg=white cterm=none term=none start=[101;97m stop=[0m hi Caller ctermfg=cyan term=NONE start=[96m stop=[0m hi Target ctermfg=green ctermbg=red hi Sync ctermfg=green ctermbg=red