configure python
This commit is contained in:
parent
b045d7c627
commit
b9d9f7e264
9 changed files with 96 additions and 12 deletions
|
|
@ -261,13 +261,13 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
|
|||
|
||||
## Phase 9.1 — Confirm scope and priorities
|
||||
- [x] Confirm scope and priorities for this phase
|
||||
- [x] Decision: Formatters - prettier (JS/TS/CSS/JSON/MD/HTML), phpcbf (PHP), stylua (Lua)
|
||||
- [x] Decision: Linters - eslint (JS/TS), phpcs (PHP), markdownlint (Markdown)
|
||||
- [x] Decision: Formatters - prettier (JS/TS/CSS/JSON/MD/HTML), phpcbf (PHP), stylua (Lua), black (Python)
|
||||
- [x] Decision: Linters - eslint (JS/TS), phpcs (PHP), markdownlint (Markdown), ruff (Python)
|
||||
- [x] Decision: Project-local executables preferred, fallback to global (node_modules/.bin/, vendor/bin/)
|
||||
- [x] Decision: phpcs/phpcbf already installed globally with WordPress coding standards - no installation needed
|
||||
- [x] Decision: Format-on-save enabled by default with toggle capability
|
||||
- [x] Decision: Manual format keymaps: `<leader>lf` (normal), `<leader>lf` (visual range)
|
||||
- [x] Decision: Respect project config files (.prettierrc, phpcs.xml, .eslintrc, etc.)
|
||||
- [x] Decision: Respect project config files (.prettierrc, phpcs.xml, .eslintrc, pyproject.toml, etc.)
|
||||
- [x] Strategy: Helper function detects project-local executables first, then global
|
||||
- [x] WordPress: phpcs.xml in project root or --standard=WordPress flag for WordPress projects
|
||||
- [x] Philosophy: Formatters are authoritative source of truth; Neovim settings should match formatter rules per filetype
|
||||
|
|
@ -293,17 +293,21 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
|
|||
|
||||
## Phase 9.3 — Mason formatter/linter installation
|
||||
- [x] Add `WhoIsSethDaniel/mason-tool-installer.nvim` for automated installation
|
||||
- [x] Install via Mason: prettier, eslint_d, markdownlint, stylua
|
||||
- [x] Install via Mason: prettier, eslint_d, markdownlint, stylua, black, ruff
|
||||
- [x] Note: phpcs/phpcbf already installed globally, skip Mason installation
|
||||
- [x] Verify all tools available: Tools installed to ~/.local/share/nvim/mason/bin/
|
||||
|
||||
## Phase 9.4 — Align Neovim settings with formatter rules
|
||||
- [ ] Configure per-filetype settings to match formatter defaults
|
||||
- [ ] PHP: Match phpcs/WordPress standards (likely tabs, 4-width)
|
||||
- [ ] JS/TS/CSS/JSON: Match prettier defaults (likely 2 spaces)
|
||||
- [ ] Lua: Match stylua defaults (likely tabs or 4 spaces)
|
||||
- [ ] Use autocmds or after/ftplugin/ for filetype-specific tabstop, shiftwidth, expandtab
|
||||
- [ ] Goal: Manual editing feels natural and matches what formatter will produce on save
|
||||
- [x] Configure per-filetype settings to match formatter defaults
|
||||
- [x] PHP: tabs, 2-width display (WordPress standards)
|
||||
- [x] JS/TS/CSS/JSON/HTML: spaces, 2-width (Prettier defaults)
|
||||
- [x] Lua: spaces, 2-width (common Neovim convention)
|
||||
- [x] Markdown: spaces, 2-width (Prettier defaults)
|
||||
- [x] Python: spaces, 4-width (Black/PEP 8 defaults)
|
||||
- [x] Use autocmds in lua/autocmds.lua for filetype-specific tabstop, shiftwidth, expandtab
|
||||
- [x] Set global defaults: 4-width, spaces (reasonable baseline)
|
||||
- [x] Goal: Manual editing feels natural and matches what formatter will produce on save
|
||||
- [x] Note: All settings kept explicit per-filetype for clarity and maintainability
|
||||
|
||||
## Phase 10 — Migrate Kept Behaviours
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue