Code Monkey home page Code Monkey logo

Comments (3)

Xaero252 avatar Xaero252 commented on August 20, 2024 1

I too see the merit, and can actually identify other editors highlighting based on the situation as well. Hyperlinks and FIXME / TODO was an excellent usage cause for highlighting within comments, Currently all sorts of strange things get highlighted within comments, which looks tacky and unintentional. Again, it's purely cosmetic, and some people may actually desire such functionality.

from nanorc.

ThomasR avatar ThomasR commented on August 20, 2024

Not necessarily. Think about URLs, email addresses, FIXME/TODO, meta comments like vim editor settings etc.
That is stuff you’d potentially want to highlight within comments, so you should consider it individually, depending on the file type.

from nanorc.

agaskins avatar agaskins commented on August 20, 2024

I'm kind of with @Xaero252 on this; highlighting in the comments (as it stands) is distracting and, from my experience, most people think something is wrong with your editor when they see variables and such loudly highlighted inside an otherwise subtle comment block. That said, I do see the merit in this for certain situations like hyperlinking, as @ThomasR pointed out.

My proposed solution would be to indeed include the comment parsing at the end, as @Xaero252 initially suggested, but then go a step further add specific rules for highlighting things like links, TODO/FIXME notes, etc. even lower in the file, below the generic comment highlighting rules. This way it's the best of both worlds, and we can make sure the highlighting in comments, when they do get jazzed up, actually look intentional.

I'd be willing to work on this if anyone else thinks it has merit, and if there's no obvious side-effects to this method (that someone more experienced than I might be able to foresee).

from nanorc.

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.