Neovim Filetype Detection

Up: Neovim Config Tutorial Down: LSP servers, snippets

Filetype detection is a label maker. It is tiny until the label is wrong, then everything downstream feels cursed.

The config has focused rules under ftdetect/:

RuleWhy it matters
VueSets Vue indentation to 2 spaces so the file starts in the right shape.
Docker ComposeMarks compose filenames as yaml.docker-compose for better YAML behavior.
ZigRecognizes .zig and .zir.
TidalRecognizes .tidal live-coding files.
Sonic PiRecognizes .sonicpi files.
JupyniumSupports notebook-related detection.

Once a filetype is correct, LSP servers, snippets, formatters, linters, Treesitter parsers, and completion source menus all have a better chance of doing the right thing.

Related: habits layer, language plugins