Comments (3)
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.
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.
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)
- Feature Request [python.nanorc]: add f-string support HOT 1
- Error in .nano/nanorc.nanorc on line 26: Color 'normal' takes no prefix HOT 4
- Revert back
- Feature Request: Resource file for Visual Basic HOT 1
- Syntax Highlighting does not appear when I sudo [Arch] HOT 1
- Support whitespacedisplay HOT 2
- Readme reqeuest: Note where arch installs the nanorc files to
- Solidity HOT 3
- html.nanorc corrupts lines containing emoji HOT 2
- Error in some file on some line: Command "linter/comment" not understood HOT 3
- Lua syntax highlighting is broken HOT 2
- Please support files without file ending HOT 2
- Error in /Users/[USERNAME]/.nano/nanorc.nanorc on line 26: Color 'normal' takes no prefix
- Vlang highlighting HOT 4
- Highlight nano search result (CTRL+W) HOT 5
- Mistakes in '/usr/share/nano-syntax-highlighting/nanorc.nanorc' error message HOT 3
- Add V support HOT 1
- Feature request HOT 2
- Sorry for the noob question. Is /usr/share/nano-syntax-highlighting/ created only by this distribution, or is this a default directory for .nanorc files? HOT 2
- support vue and or svelte. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanorc.