Repository navigation
Serilog Syntax Highlighting v0.6.1
Installation
Download the attached VSIX file and double-click to install in Visual Studio 2022.
What's Changed
Fixed
- Multi-line Serilog template navigation position calculation (#11, #14)
- Navigation from template properties to arguments now works correctly when Serilog calls span multiple lines
- Fixed template detection for multi-line verbatim strings (
@"...") and raw string literals ("""...""") - Corrected argument position calculation by starting after comma delimiter instead of at comma
- Added fallback to ReconstructMultiLineTemplate() when cursor is on first line of multi-line template
- Enhanced FindArgumentInMultiLineCall() to properly handle template end position calculation
- LogError calls with exception parameters (#12, #13)
- Syntax highlighting now works correctly for
logger.LogError(exception, "template {Property}", arg)patterns - Fixed string literal parser to skip exception constructor parameter and find actual message template
- Added IsLogErrorWithExceptionParameter() method to detect LogError patterns with exception parameters
- Enhanced FindStringLiteral() with skipFirstString parameter to locate correct message template
- Handles both string literal and variable exception constructors
- Syntax highlighting now works correctly for
Requirements
- Visual Studio 2022 (17.0) or later
- .NET Framework 4.7.2 or later
Full Changelog: https://github.com/willibrandon/serilog-syntax/blob/main/CHANGELOG.md