micro-editor / micro-editor/micro

ini.yaml - Code Highlighter Misses .conf Files

Open
#4,004 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug syntax
Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description

I noticed that syntax highlighting isn't working for standard .conf files (like sysctl.conf or nginx.conf). The current regex seems to be anchoring the extension to the weechat string, so it ignores everything else.

I moved .conf into the first lookup group so it applies to all configuration files, not just Weechat ones. And I then had sytax color highlighting for any file ending in .conf I opened in micro.

Proposed Fix:
Rewrite the regex pattern for the file syntax/ini.yam to capture the string .conf correctly.

Verified Regex:
(\.(ini|desktop|lfl|override|tscn|tres|conf)$|(mimeapps\.list|pinforc|setup\.cfg|project\.godot)$|weechat.+\.conf)

Test Plan
Tested locally and verified the highlighting now shows up correctly.

Note: This is my first time submitting a fix for a project this size (or ever actually), so please let me know if I need to adjust anything!

Environment
  • Version: 2.015
  • OS: CachyOS
  • Terminal: Fish

Contributor guide

No contributing guide indexed for this repository

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

Open syntax/ini.yaml and inspect the file-extension regex described in the issue. Verify the pattern against standard .conf files such as sysctl.conf and nginx.conf, then open a .conf file in micro to confirm syntax highlighting appears. Done means .conf files highlight while the existing INI-related filenames continue to match.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
cli
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.