Giter Site home page Giter Site logo

vuvoth / ccls Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 1.0 401 KB

circom language server

Home Page: https://marketplace.visualstudio.com/items?itemName=vuvoth.circom-plus

License: MIT License

JavaScript 0.57% TypeScript 2.18% Rust 96.85% Circom 0.40%
circom lsp zero-knowledge zkp circom-languague-server

ccls's Introduction

Install

Install follow those commands:

git clone https://github.com/vuvoth/ccls
cd ccls 
cargo xtask install --server 
cargo xtask install --client

ccls's People

Contributors

vuvoth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

cwkang1998

ccls's Issues

circom-lsp client: couldn't create connection to server.

Hi @vuvoth, when i installed the extension and opened a circom file, it complained with the following error message, do you know what it means?

[Error - 下午3:46:29] circom-lsp client: couldn't create connection to server.
Error: spawn Unknown system error -8
    at ChildProcess.spawn (node:internal/child_process:413:11)
    at Object.spawn (node:child_process:806:9)
    at /Users/johnson/.vscode/extensions/vuvoth.circom-plus-0.0.6/out/main.js:39:57554
    at Gl.createConnection (/Users/johnson/.vscode/extensions/vuvoth.circom-plus-0.0.6/out/main.js:39:12709)
    at Gl.start (/Users/johnson/.vscode/extensions/vuvoth.circom-plus-0.0.6/out/main.js:39:2940)

Refactor project structure

We should follow this structure:

  • crate parser only process parser with abstract TokenKind stream. We don't care about concrete token.
  • syntax crate wrap parser with concrete token and create API for query to syntax tree use rowan lib.
  • lsp implement logic for language server. This have responsibility for implement communicate with syntax crate to query data.

Data base for syntax semantic in ccls

Motivation

Every time we query semantic tokens on abstract syntax tree we need travel on this tree. We can build the database which is store semantic of token relate with abstract syntax tree of those files. This easier/cheaper for us to make a queries.

Example, we design schema of db like below:

struct DbSemantic {
   templates: HashMap<Token, Template>,
   signals: HashMap<Token, HashMap<Template,  SignalDecl>> ,
   ...
}

We can make query to the Template when we know token(name of template). When we open/update new file we also update DbSemantic.

We don't need browse the ast tree for each query we make.

Error: Cannot read properties of undefined

Im getting the following error when trying to get to the definition of a component:

[Trace - 10:33:16 PM] Received response 'textDocument/definition - (51)' in 1ms. Request failed: Request textDocument/definition failed with message: Cannot read properties of undefined (reading 'type') (-32603).
[Error - 10:33:16 PM] Request textDocument/definition failed.
  Message: Request textDocument/definition failed with message: Cannot read properties of undefined (reading 'type')
  Code: -32603 

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.