Giter Site home page Giter Site logo

syndiesis's Introduction

Syndiesis

The most revolutionary syntax visualizer for C#

Motivation

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.

Download

Usage preview

The video was shot in version 1.0.0

Syndiesis.1.0.0.mp4

Stack

Features

  • 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

Desired features are listed in the issues.

Ruled-out features

  • Auto-complete on text

Usage documentation

Node type legend

  • N - SyntaxNode
  • T - SyntaxToken
  • D - Display value (.ValueText of SyntaxToken)
  • SL - [Separated]SyntaxList
  • TL - 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)

Keybinds

  • Main view
    • Ctrl+S - Open settings
    • Ctrl+R - Reset code
  • Code editor
    • Navigation
      • Up / Down / Left / Right - Move cursor by one character or line
      • Ctrl+Left / Ctrl+Right - Move to next word left or right
      • Home / End - Move to start or end of current line
      • Ctrl+Home / Ctrl+End - Move to start or end of document
      • PageUp / PageDown - Move to next or previous page of visible lines
      • Ctrl+PageUp / Ctrl+PageDown - Move to first or last visible line in the current position
    • Manipulation
      • Back - Delete one character left
      • Delete - Delete one character right
      • Ctrl+Back - Delete one word left
      • Ctrl+Delete - Delete one word right
      • Ctrl+C - Copy current selection
      • Ctrl+X - Cut current selection
      • Ctrl+V - Paste current content on clipboard
      • Ctrl+U - Select outer node on syntax tree view
      • Ctrl+W - Select currently hovered word
      • Ctrl+Shift+V - Paste current content on clipboard and replace entire snippet with pasted content
      • Ctrl+A - Select all
      • Tab - Insert up to N spaces to fill a N-character section within the line, or increase indentation on selected lines
      • Shift+Tab - Reduce indentation on current or selected lines

Design philosophy

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.

syndiesis's People

Contributors

rekkonnect avatar elvodqa avatar wieslawsoltes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.