Code Monkey home page Code Monkey logo

Comments (21)

p00f avatar p00f commented on May 29, 2024 2

It's not random per se, it just uses all nodes to calculate nesting depth (instead of only brackets) so it appears random

This was adressed by #25 but I reverted it for other reasons, I'll add it again when #29 is complete.

I'm keeping this open as a reminder, thank you.

from nvim-ts-rainbow.

brymer-meneses avatar brymer-meneses commented on May 29, 2024 1

Sorry I got caught up in acads, I'll get to it now

Dude I'm not supporting you or anything, you're working for free. It's okay lol, I'm grateful for your work!

from nvim-ts-rainbow.

brymer-meneses avatar brymer-meneses commented on May 29, 2024

Is this a bug or a known feature?

from nvim-ts-rainbow.

brymer-meneses avatar brymer-meneses commented on May 29, 2024

Any updates on this one?

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

I'll try to do it this week

from nvim-ts-rainbow.

brymer-meneses avatar brymer-meneses commented on May 29, 2024

Thank you! Let me know if I can help!

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

Sorry I got caught up in acads, I'll get to it now

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

You can try out the colornum branch now, I've done lua, c++ and rust.

Let me know if I can help!

Can you test if there's a performance hit against master ? Maybe large C++ files like firefox source

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

before

image

after

image

from nvim-ts-rainbow.

brymer-meneses avatar brymer-meneses commented on May 29, 2024

You can try out the colornum branch now, I've done lua, c++ and rust.

It's a hit-or-miss.

2021-05-26_23-00

The brackets at the bottom of my screenshot are okay, however the colors at the top are not as expected.

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

There's nothing much I can do for lua though - it's a parser limitation. To highlight print(1+(2+(3))) correctly I'll have to count binary_operation since there is no parenthesized_expression node like java here. This will now do

image

because it counts the concatenation as a level

c++ and rust on the other hand look much better

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

Similarly there's no node for indexing so this happens

image

(which is maybe fine here because the shapes of the brackets are different)

from nvim-ts-rainbow.

brymer-meneses avatar brymer-meneses commented on May 29, 2024

I guess we'll just have to live with this minor inconvenience then.

Thanks for fixing this!

from nvim-ts-rainbow.

brymer-meneses avatar brymer-meneses commented on May 29, 2024

You can try out the colornum branch now, I've done lua, c++ and rust.

Let me know if I can help!

Can you test if there's a performance hit against master ? Maybe large C++ files like firefox source

I have opened a cpp file with 2500 lines taken from tensorflow, there was a slight lag, but not that bad imo.

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

I've merged the colornum branch into master (currently with rust, cpp and fennel queries). Now we only need to add levels for more languages from #25 (and change if needed)

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

I won't be able to do stuff in the coming weeks, feel free to submit PRs

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

Just add the rainbow.level nodes from the PR into the respective table in levels.lua like so:
image

from nvim-ts-rainbow.

github-actions avatar github-actions commented on May 29, 2024

Stale issue message

from nvim-ts-rainbow.

karimlevallois avatar karimlevallois commented on May 29, 2024

Is this still being worked on? I'm trying to mirror my colour settings from Sublime Text and VSCode, so I have put the colours in the same order in my lua config file. However, Python files (at least) are not colouring in the same order as they are in my config file.

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

Is this still being worked on?

Not actively, I (and other contributors) fix this when I notice something

from nvim-ts-rainbow.

p00f avatar p00f commented on May 29, 2024

Lua is fixed with the new parser

from nvim-ts-rainbow.

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.