Skip to content

Makefile syntax highlighting #18

Open

Description

@aeschli

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

Activity

  1. fadeevab commented on Aug 29, 2017

    @fadeevab

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

  2. andrey-gvrd commented on Oct 6, 2021

    @andrey-gvrd

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

  3. 0x0fe commented on Jan 6, 2023

    @0x0fe

    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

  4. fadeevab commented on Jan 27, 2023

    @fadeevab

    @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 :)

  5. 0x0fe commented on Feb 12, 2023

    @0x0fe

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions