Giter VIP home page Giter VIP logo

Comments (9)

kaicataldo avatar kaicataldo commented on September 22, 2024

Hey, thanks for the issue. You're correct - there aren't any specific colors set for any Python syntax plugins. I'm mostly a JS dev, which is why there's a lot of customization there.

PRs are welcome! I would just want to make sure we're adding colors for a popular syntax plugin. You can see an example of the JS colors here.

from material.vim.

mariush2 avatar mariush2 commented on September 22, 2024

I see, Vim-polyglot has ~2500 stars on their github repo. Do I start adding highlighting for python uses that syntax plugin?

from material.vim.

kaicataldo avatar kaicataldo commented on September 22, 2024

It looks like vim-polyglot uses this syntax plugin.

from material.vim.

mariush2 avatar mariush2 commented on September 22, 2024

I have started writing the colors for python now.

from material.vim.

ashwinvis avatar ashwinvis commented on September 22, 2024

I am quite happy with the syntax highlighting for Python now. @mariush2, you had used a very bare script for comparison. See instead:

import unittest
import os


class TestFile(unittest.TestCase):

    def setUp(self):
        self.file = open("test_file.txt", "w")

    def tearDown(self):
        os.remove("test_file.txt")

    def test_meh(self):
        self.file.write("manga")


if __name__ == "__main__":
    unittest.main()

Screenshot_20190404_110447

from material.vim.

mariush2 avatar mariush2 commented on September 22, 2024

To clarify what I want to achieve with the new highlighting for python.

Here is a screenshot of some code in vim:

Screenshot 2019-04-04 at 11 25 05

Here is the same piece of code in Atom using the material theme:

Screenshot 2019-04-04 at 11 25 30

I want to get closer to the Atom look in vim here. Specifically on lines like request.session['login'] = True and user = authenticate(username=form.username, password=form.password)

from material.vim.

ashwinvis avatar ashwinvis commented on September 22, 2024

Just my opinion, take it as constructive feedback:

  • Overall I feel the vim version is easier to read
  • 👍 for colouring methods (is_valid) and classes / functions (LoginForm, redirect) in blue and keyword args (commit=, username=) in cyan - it might be possible to do that in vim, and maybe it helps
  • 👎 However, I don't like how the color of the variable request, form, user etc change between based on context. It is distracting.

from material.vim.

kaicataldo avatar kaicataldo commented on September 22, 2024

I'm definitely open to adding some Python-specific syntax highlighting. I'd love to try to keep colors consistent between languages where we can, but that's obviously not possible 100% of the time. If someone does decide to take this on, if we could use the JS example provided by the issue author as a guide, I think we'll be on the right track.

from material.vim.

kaicataldo avatar kaicataldo commented on September 22, 2024

Closing this due to lack of movement. Comment above still stands and would definitely be open to updating styles. :)

from material.vim.

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.