Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Function highlighting once declared. #105

Closed
lanox opened this issue Jun 16, 2019 · 5 comments
Closed

Python Function highlighting once declared. #105

lanox opened this issue Jun 16, 2019 · 5 comments

Comments

@lanox
Copy link

lanox commented Jun 16, 2019

Hi,

I was wondering if we could add function highlighting once the function has be declared.

I have this in my vimrc as workaround, however I was wondering if we could just add it in?

augroup python_syntax
       au!
       au FileType python syntax match pythonFunction /\v([^[:cntrl:][:space:][:punct:][:digit:]]|_)([^[:cntrl:][:punct:][:space:]]|_)*\ze(\s?\()/
       hi! link pythonFunction GruvboxAqua
augroup END

Thanks.

@lanox lanox changed the title Python Function match Python Function highlighting once declared. Jun 16, 2019
@lanox
Copy link
Author

lanox commented Jun 23, 2019

Hi, any chance of this been added to gruvbox ? Thanks

@rbong
Copy link

rbong commented Jun 23, 2019

I'm not sure what this does differently from this line. Could you please explain?

@lanox
Copy link
Author

lanox commented Jun 23, 2019

Problem is that it colours in the function when you declaring it, however when you actually use the function it is not coloured .

let's say:

def fun(): <-- fun function will be coloured 
    print(“hello world.”)
fun() <-- calling function will not be coloured.

With out my fix.
Screen Shot 2019-06-24 at 9 26 44 am

with
Screen Shot 2019-06-24 at 9 27 22 am

If you can confirm that is the case, then maybe something is up with my setup ?

@rbong
Copy link

rbong commented Jun 24, 2019

Gruvbox does not define the syntax matching for pythonFunction, it only colors what's there. The syntax matching is declared in the vim runtime files, or if you have it installed, it may be defined through vim-python/python-syntax (or another alternate vim syntax plugin).

It would be more appropriate to submit a patch or point out the problem to the python runtime syntax maintainer, or to submit a pull request or issue to vim-python/python-syntax.

@rbong rbong closed this as completed Jun 24, 2019
@lanox
Copy link
Author

lanox commented Jun 24, 2019

Ah okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants