Comments (8)
Implemented
from slt.
I parse the source file, get corresponding parenthesis and get max nesting number. Then I split 1.0 float into same intervals and use that as source to HSV.
from slt.
SLT uses custom highlight to show parenthesis. I wonder if I can cook up some custom solution for this.
from slt.
It looks like this: https://i.imgur.com/6nrrVmt.png
from slt.
Great job :) Is it possible to adjust the colours for each depth of parentheses? I think this is important, in order to maintain high enough contrast when using different IDE colour schemes. Also because some people might not like the default colours. (Although I think they're fine.)
For example, rainbow-delimiters for Emacs allows you to customise depths 1-9, with 1 being the outermost colour.
from slt.
Hmm, I suppose I can have a setting for range of colors used. I generate it as HSV 0.0-1.0 so technically there can be other range than 0.0-1.0 so you could set up your own range. Would that be enough?
from slt.
I think there is a problem with generating colours in this way, but I could be wrong. The colour difference between each depth of parenthesis will be consistent (which is good), but each parenthesis colour will not necessarily have sufficient contrast with the background colour. Protesilaos Stavrou took this into consideration when choosing the parenthesis colours for his Emacs themes.
Allowing for the user to select a custom range might be helpful, but I think this problem would still remain. Perhaps a better solution is to pre-define colours for some number of depths (say, 10), and to make these colours user-customisable. There could also be an option to limit the number of colours to something less than ten.
I would also like to ask: what number of colours does this implementation use? Do the colours cycle for each level of nesting (eg. red, green, blue, red, green, ...) or will each level have its own unique colour?
BTW I think the current implementation is fine, and is totally an improvement over not having rainbow parentheses. My proposals might be outside the scope of SLT.
from slt.
All right, I think your current implementation is fine. Thank you for implementing it so quickly.
from slt.
Related Issues (20)
- JCEF is not supported in this env or failed to initialize
- Quicklisp
- Added eval-when or other toplevel constructs to show correctly in structure navigator
- refactor loading asd without quicklisp for certain libraries
- Hyperspec integration
- Cannot Verify SDK HOT 3
- Stacktrace internal IDE errors while normal use HOT 1
- Remove automatic macroexpand - instead add menu to require it
- Add evaluate toplevel expression action
- CLHS hyperspec not readable with a dark theme HOT 6
- "Start Lisp Instance" not working HOT 5
- Refactoring - Add refactor to extract lambda into function
- Swank actions
- The SBCL on Ubuntu does not verify with a cut off message
- Java Error from IntelliJ HOT 7
- Instruction for the MacOS installation for the wiki HOT 1
- Java error from IntelliJ while editing
- Doesn't work with IDEA 2023.2
- Capturing the Ctrl-C keystroke in the Lisp Process Standard Output panel
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 slt.