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

Makefile syntax highlighting #18

Open
aeschli opened this issue Aug 11, 2017 · 6 comments
Open

Makefile syntax highlighting #18

aeschli opened this issue Aug 11, 2017 · 6 comments

Comments

@aeschli
Copy link

aeschli commented Aug 11, 2017

From @ds0nt on June 13, 2017 22:51

  • VSCode Version: 1.13.0
  • OS Version: Linux

When editing a makefile, sometimes things don't color as prettily as they could.

I've noticed this when using an ifeq block, in particular.

2017-06-13-185037_841x488_scrot

As you can see, the variables that are indented are not colored, and neither is the else ifeq.

Copied from original issue: microsoft/vscode#28668

@fadeevab
Copy link

Fixed here (pull request is still not merged to the master): #15

@andrey-gvrd
Copy link

This seems still broken.
Screen Shot 2021-10-06 at 2 50 21 PM

@Sunbreak
Copy link

Sunbreak commented Jul 7, 2022

It has been broken for a year since announcement of Microsoft https://devblogs.microsoft.com/cppblog/now-announcing-makefile-support-in-visual-studio-code/

@0x0fe
Copy link

0x0fe commented Jan 6, 2023

is there any advance on this issue? because not only the highlighting is broken, but also the conditional declarations highlighting is broken, the disabled/inactive part of the statement should be greyed out, currently we cannot see what is active and inactive which is quite a pain when you have complex makefiles with thousand of lines and hundreds and inactive blocks
In the below example _SUPPORT_64M_MEM is defined, yet the highlighting is wrong and broken

image

@fadeevab
Copy link

@0x0fe Makefile syntax highlighting is static, it doesn't analyze context, it's how it's implemented.

@ds0nt @andrey-gvrd @Sunbreak else-ifeq will be highlighted starting from the next VSCode release. Fix is here: fadeevab@1d4c0b5

Somehow I didn't notice that original complaint under that huge screenshot :)

@0x0fe
Copy link

0x0fe commented Feb 12, 2023

@0x0fe Makefile syntax highlighting is static, it doesn't analyze context, it's how it's implemented.

By "static" do you imply it will only parse the current file and not take into account any other file of the project to compute the synthax highlighting? If so i dont think that is how it should behave and it is definitely not how most IDE behave, most IDE will take into account both all the makefiles and also all the includes, and highligh the makefile accordingly.

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

5 participants