The most revolutionary syntax visualizer for C#
The project was inspired by the task for applying into a Roslyn internship position regarding C# syntax highlighting at JetBrains: (project / task)
The main design inspiration is SharpLab. The syntax view feature of SharpLab is the main design that the app built upon.
Despite not applying for the internship, I wanted to finish the project and release it into a usable state without entering the depths of feature creep.
The video was shot in version 1.0.0
Syndiesis.1.0.0.mp4
- Visual Studio 2022
- .NET 8.0
- C# 12.0
- Avalonia 11.0
- Code editor
- Text editing
- Text selection
- Scrolling
- Copy/paste text
- Navigation with keybinds
- Smart indentation
- Syntax visualizer
- Current cursor syntax node highlighting
- Tree view of nodes
- Display of property names of syntax objects
- Colorful display of different syntax list view nodes
The entirety of the app is built using basic components in Avalonia. Everything is built from scratch without external dependencies for UI.
Desired features are listed in the issues.
- Auto-complete on text
N
- SyntaxNodeT
- SyntaxTokenD
- Display value (.ValueText
of SyntaxToken)SL
- [Separated]SyntaxListTL
- SyntaxTokenList_
- Whitespace trivia\n
- End of line trivia/*
- Comment trivia#
- Preprocessor directive trivia~
- Disabled text (text that is not active due to conditional preprocessor directives)
- Main view
Ctrl+S
- Open settingsCtrl+R
- Reset code
- Code editor
- Navigation
Up
/Down
/Left
/Right
- Move cursor by one character or lineCtrl+Left
/Ctrl+Right
- Move to next word left or rightHome
/End
- Move to start or end of current lineCtrl+Home
/Ctrl+End
- Move to start or end of documentPageUp
/PageDown
- Move to next or previous page of visible linesCtrl+PageUp
/Ctrl+PageDown
- Move to first or last visible line in the current position
- Manipulation
Back
- Delete one character leftDelete
- Delete one character rightCtrl+Back
- Delete one word leftCtrl+Delete
- Delete one word rightCtrl+C
- Copy current selectionCtrl+X
- Cut current selectionCtrl+V
- Paste current content on clipboardCtrl+U
- Select outer node on syntax tree viewCtrl+W
- Select currently hovered wordCtrl+Shift+V
- Paste current content on clipboard and replace entire snippet with pasted contentCtrl+A
- Select allTab
- Insert up to N spaces to fill a N-character section within the line, or increase indentation on selected linesShift+Tab
- Reduce indentation on current or selected lines
- Navigation
The syntax visualizer should provide detailed information about how Roslyn parses the given C# code snippet, and in a pretty and user-friendly format. SharpLab lacks in readability of the tree, and it also doesn't paint the entire picture as intended.
The properties of the nodes are automatically extracted via reflection. Some are filtered out due to duplication in most cases, and in other cases they were not providing any helpful information.
Each different node type is differently treated to extract the most useful information out of it. If you encounter a node missing critical information, or displaying it weirdly, please file an issue.