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/:
| Rule | Why it matters |
|---|---|
| Vue | Sets Vue indentation to 2 spaces so the file starts in the right shape. |
| Docker Compose | Marks compose filenames as yaml.docker-compose for better YAML behavior. |
| Zig | Recognizes .zig and .zir. |
| Tidal | Recognizes .tidal live-coding files. |
| Sonic Pi | Recognizes .sonicpi files. |
| Jupynium | Supports 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