← Back to home

Noir LSP Doc Symbols

Implemented textDocument/documentSymbol for nargo/noir LSP in the main noir repo's LSP crate

Screenshots

Noir LSP Doc Symbols screenshot 1
Noir LSP Doc Symbols screenshot 2
Noir LSP Doc Symbols screenshot 3

Problem Statement

This project implements thetextDocument/documentSymbolrequest implementation. It provides all the symbols in provided source file. The project usesnoirc_frontend's parser to parse the source files and return document symbols. This is used in vscode to provide the outline part of the code.

Solution

It implements and serves a new request typetextDocument/documentSymbolsfor the noir LSP. It extracts source's document symbols by using the noirc_frontend's parser to parse and return symbols in a given document.This is used in vscode to provide the outline part of the code. It even allows to jump on the given symbols directly. But I am yet to return the ranges, it should be a simple byte offset to line/col conversion.

Hackathon

ETHOnline 2023

2023

Prizes

  • 🏆

    👩‍💻 Aztec — Best Dev Tool

Contributors