microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
194 stars 58 forks source link

Native support for custom `Makefile` naming conventions #645

Open apexDev37 opened 3 weeks ago

apexDev37 commented 3 weeks ago

Description:

Currently, the extension only provides syntax highlighting and support for files named Makefile. When the Makefile has a different name, such as docker.Makefile or Makefile.test, these files are treated as plain text. Such naming conventions are commonly used in larger projects to separate concerns or context (ie. docker, test, etc.). It would be an enhancement to support these types of naming conventions out-of-the-box!

Issue

Steps to Reproduce

  1. Install the Makefile extension.
  2. Create a file named docker.Makefile or Makefile.test.
  3. Observe that the extension does not provide Makefile syntax highlighting or support for these files.

Example

makefile-example-01 makefile-example-02

Current Workaround

This can be resolved with the following manual hack added to settings.json. However, this begins to prove inefficient when working with large or several teams:

    "files.associations": {
        "compose.Makefile": "makefile",
    },

Enhancement / Feature Request

Ideally, the extension should offer syntax highlighting, linting, and other Makefile-related functionality for files that follow common alternative naming conventions. I propose the following enhancement:

đź’ˇ Allow the extension to recognize additional naming conventions, such as:

  • *.Makefile
  • Makefile.*
  • *.makefile

Additional Context:

Extension Version: 0.10.26 VS Code Version: 1.92.0-insider Operating System: Ubuntu Focal LTS

Yingzi1234 commented 2 weeks ago

@gcampbell-msft We are currently able to reproduce this problem and you can get the details below: ENV:

  1. VSCode: 1.93.0
  2. Makefile: v0.11.8(pre-release)

image