Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 2.11 KB

File metadata and controls

64 lines (46 loc) · 2.11 KB

Micro Syntax Highlighting for Minecraft .mcfunction Files

Overview

This repository provides syntax highlighting for Minecraft .mcfunction files in the Micro editor.
It improves readability and helps developers quickly identify commands, selectors, effects, numbers, boolean values, JSON-like arguments, and dangerous commands.

Screenshot

Who is it for?

  • Minecraft datapack developers
  • Function and command script creators
  • Micro editor users who want clearer, more readable .mcfunction files

Features

  • Highlight main commands (effect, execute, give, tp, scoreboard, etc.)
  • Highlight subcommands / operators (run, if, matches, modify, etc.)
  • Highlight selectors (@s, @e, @a)
  • Highlight namespaces (minecraft:wither, minecraft:stone)
  • Highlight numbers and boolean values (true, false)
  • Highlight dangerous commands (kill @e, tp @e, clear @a) as error (red in most colorschemes)
  • Highlight JSON-like arguments ({"text":"Hello","color":"red"})

Installation

git clone https://github.com/BuriXon-code/micro-syntax-mcfunction  
cd micro-syntax-mcfunction  
mkdir -p $HOME/.config/micro/syntax  
cp mcfunction.yaml $HOME/.config/micro/syntax/

After installation, open a .mcfunction file in Micro and the syntax highlighting will be applied automatically.


Example

effect give @s minecraft:wither 5 1 true  
execute if score @s weapon_random matches 25 run item modify entity @s weapon.mainhand murder_weapon:mark25  
kill @e[type=zombie]
  • effect → statement
  • give → subcommand
  • @s → selector
  • minecraft:wither → identifier
  • Numbers (5 1) → numbers
  • true → boolean / constant
  • Dangerous commands (kill @e) → error / red

Notes

  • This repository only adds syntax highlighting for .mcfunction files
  • It does not modify Micro core functionality
  • Works on Linux, macOS, Windows, and Termux
  • For color customization, adjust your Micro colorscheme (e.g., error token color for dangerous commands)