Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 938 Bytes

HACKING.md

File metadata and controls

30 lines (21 loc) · 938 Bytes

Hacking Guide

Formatting code

This project uses clang-format to format source files.

Setting up environment for LSP

To enable LSP, you can use compile_commands.json generated by CMake. Configure your build with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON. Doing so, you'll get compile_commands.json in your build directory. Creating symlink to the file in the project root will be the easiest way to follow future change of the file.

Adding new blocks

Edit TSV (Tab-Separated Values) files on /block. These are stored in /block/${namespace}/block_colors_${prefix}.tsv for convenience. If you add new namespace or new prefix, remember editing CMakeLists.txt.

Format for each TSV files is the following:

block_id	r	g	b	a
foo	ff	00	00	ff

Note that first line is reserved for index and always skipped. Second line adds a red block foo with completely opaque. You MUST write each component of color in hex.