Giter Site home page Giter Site logo

Comments (4)

brendanzab avatar brendanzab commented on June 20, 2024

Yeah, this has been requested before (See #285)! Perhaps this is something we should have a look at.

For this specific instance, I'm wondering if using the notes section would help. Eg.

error: unknown start of token: \u{37e}
  ┌─ main.rs:2:30
  |
2 |    println!("Hello, world!");
  |                             ^
  = Unicode character ';' (Greek Question Mark) looks like ';' (Semicolon), but it is not

But I realise there are other instances where this is not as helpful, say with lifetime diagnostics, where you have to step through a sequence of related locations.

It would also be good to think about how this maps onto the language server protocol, but we might not want to limit ourselves by it. Eg. I tend to find lifetime errors easier to understand in the terminal, rather than using rust-analyzer.

from codespan.

RDambrosio016 avatar RDambrosio016 commented on June 20, 2024

As with most pretty error stuff, the logic will be lost in the LSP, which is not necessarily bad, i agree with you in saying cli is way better for some errors, i dont think LSP should limit codespan when it comes to features. The example was the first i could think of, it is obviously very simplistic.

from codespan.

Johann150 avatar Johann150 commented on June 20, 2024

I have not looked at the commits that were made, but maybe #176 could be interesting in this context?

from codespan.

RDambrosio016 avatar RDambrosio016 commented on June 20, 2024

Allowing users to write their own render logic and plug into codespan's renderer would be infinitely helpful when it comes to more specific diagnostics

from codespan.

Related Issues (20)

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.