This document summarizes the coding style standards configured in Neovim, following industry-standard style guides.
All settings are automatically applied when opening files of the corresponding type.
| Language | Style Guide | Column Limit | Notes |
|---|---|---|---|
| C/C++ | Industry standard | 100 | Includes .c, .cpp, .cc, .h, .hpp |
| Shell/Bash | Industry standard | 100 | Includes sh, bash, zsh, fish |
| JavaScript/TypeScript | Industry standard | 100 | Includes JSX/TSX, JSON |
| HTML/CSS | Industry standard | 100 | Includes SCSS, SASS, LESS |
| Swift | Industry standard | 100 | Common convention |
| Lua | Industry standard | 100 | Common convention |
| LaTeX | Industry standard | 100 | With word wrap enabled |
| Ruby | Industry standard | 100 | Rails convention |
| YAML/TOML | Industry standard | - | Configuration files |
| Markdown | Industry standard | 100 | With word wrap enabled |
| Language | Style Guide | Column Limit | Notes |
|---|---|---|---|
| Python | PEP 8 standard | 100 | Industry convention |
| Rust | Official Rust Style | 100 | rustfmt default |
| Language | Style Guide | Notes |
|---|---|---|
| Go | Official Go Style | gofmt enforced |
| Makefile | Required by syntax | Tabs are mandatory |
Language servers are configured to respect these settings:
clangd for C/C++pyright for Pythongopls for Gorust_analyzer for Rustlua_ls for Luatexlab for LaTeXTo temporarily override settings for the current buffer:
:setlocal shiftwidth=4 tabstop=4
To check current settings:
:set shiftwidth? tabstop? expandtab?
Use the :Format command or the fixy shell script to automatically format files according to these standards.
The Google Python Style Guide pylintrc is available at styleguide/pylintrc. This provides:
Run pylint using the Google style guide:
pylint --rcfile=~/.dotfiles/styleguide/pylintrc myfile.py
The fixy script will automatically run pylint if itβs installed.