Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

  • Create makefile-language-configuration.json with # region / # endregion folding markers
  • Add languages contribution to package.json referencing the new language config
  • Update CHANGELOG.md citing issue region and endregion support please in makefile #544
  • Make folding markers case-insensitive to support # Region, # REGION, etc.
  • Validate JSON syntax and regex patterns
  • Run code review and security checks
Original prompt

This section details on the original issue you should resolve

<issue_title>region and endregion support please in makefile</issue_title>
<issue_description>Hi,

Is it possible to add support in vscode for # region and # endregion block like in other supported language.

For instance:

# region - ANSI colors support
COLOR_BLUE:=34
COLOR_CYAN:=36
COLOR_GRAY:=30
COLOR_GREEN:=32
COLOR_PURPLE:=35
COLOR_RED:=31
COLOR_WHITE:=37
COLOR_YELLOW:=33

_CYAN   := "\e[1;${COLOR_CYAN}m%s\033[0m %s\n"   # F.i. printf $(_CYAN)   "Info xxx"
_GRAY   := "\e[1;${COLOR_GRAY}m%s\033[0m %s\n"   # F.i. printf $(_GRAY)   "ipso lorem"
_GREEN  := "\e[1;${COLOR_GREEN}m%s\033[0m %s\n"  # F.i. printf $(_GREEN)  "Success - xxx"
_RED    := "\e[1;${COLOR_RED}m%s\033[0m %s\n"    # F.i. printf $(_RED)    "Error - xxx"
_WHITE  := "\e[1;${COLOR_WHITE}m%s\033[0m %s\n"  # F.i. printf $(_WHITE)  "ispo lorem"
_YELLOW := "\e[1;${COLOR_YELLOW}m%s\033[0m %s\n" # F.i. printf $(_YELLOW) "ispo lorem"
# endregion

I would like to be able to fold the ANSI color block.

Not supported

(as you can see, folding is not supported here above)

For information, code folding already supported when there is indentation like in:

# region - help
help:
      # any valid code 
# endregion

Well supported when there is an indentation

(as you can see, folding is well supported here above as soon as there is an indentation)

Thanks!
</issue_description>

<agent_instructions>After addressing this issue described here, please update the changelog citing issue #544.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@gcampbell-msft @cavo789 Thanks for the request! I'll mark this as a feature request and we'll keep it under consideration in future planning.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Copilot AI changed the title [WIP] Add region and endregion support in Makefile for VSCode Add # region / # endregion folding support for makefiles Feb 12, 2026
Copilot AI requested a review from snehara99 February 12, 2026 17:46
@snehara99
Copy link
Contributor

@copilot does this handle scenarios where region has extra text such as # region - ANSI colors or when it's capitalized like # Region or # REGION?

Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 12, 2026

@copilot does this handle scenarios where region has extra text such as # region - ANSI colors or when it's capitalized like # Region or # REGION?

Extra text like # region - ANSI colors was already handled by the \b word boundary (no end-of-line anchor). However, capitalized variants like # Region or # REGION were not matched. Updated the regex to use character classes for case-insensitive matching in b449ef5. All these now work:

  • # region, # Region, # REGION
  • # region - ANSI colors
  • #region (no space)
  • # endregion, # Endregion, # ENDREGION

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

Successfully merging this pull request may close these issues.

region and endregion support please in makefile

2 participants