notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

[Enhancement Request] Allow users to associate full file paths matching defined glob patterns to languages (rather than extensions only)

Open
#14,397 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description of the Issue

Allow users to associate full file paths using glob patterns to existing languages rather than extensions alone in style configurator.

Expected Behavior

Instead of only being able to associate files to languages by their extension in notepad++, a user could instead employ glob patterns. For instance, consider a user who separates script files without extensions in folders by language, e.g., a subfolder titled cpp\ for files written in C++ (and additional subfolders for other similarly grouped files) in the directory users\username\coderepo\. That user could associate all files with a full file path matching the glob pattern "**/coderepo/cpp/*.*" regardless of extension to C++ while doing the same for the other subfolders similarly labeled by language. This is just one example of the utility of such an enhancement in improving user experience.

Actual Behavior

The style configurator in notepad++ only allows a user to associate file extensions to programming languages (is my understanding after a reasonable amount of research). This is completely logical and standard in most editors; however, there are limitations to this type of association. Some languages have several different extensions. Some users do not append extensions to their scripts' filenames until they are prepared to run them. While certainly not the biggest inconvenience, editing such a file in notepad++ currently finds a user having to select the applicable language each time any such files are opened even after saving those files with the appropriate language selected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Style Configurator and the existing file-extension association handling. Compare the requested full-path glob behavior with the current language association flow and identify where matching rules are defined. Done means users can associate full paths matching patterns such as "**/coderepo/cpp/." with an existing language while preserving current extension associations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.