fix(format): JavaDoc {@link} reflow + CI/hooks cleanup#2
Merged
Conversation
- Add .typos.toml so typos workflow can locate its config - Replace broken inline-table vim.toml with proper selene std-lib (vim.yml) - Lua quality job: pass --allow-warnings so selene only fails on errors - Nvim integration test: switch syntax check from loadfile()() (which executes the chunk and fails on require() with -u NONE) to loadfile() with explicit error capture
Mirrors CI quality checks locally on every commit to fail fast: - stylua --check on staged Lua files - selene --allow-warnings on lua/ - nvim loadfile() syntax parse on staged Lua files Enable with: git config core.hooksPath .githooks
Mechanical reformat of files that drifted from .stylua.toml. All diffs are whitespace-only (verified with git diff -w showing 0 semantic changes). Unblocks CI lua-quality check.
- Remove unused collect_formatters_opts extension point (dead code, no language ever defined formatters_opts) - collect_config fallback priority: config.filetypes > lsp_opts.filetypes > lang_name so linters/formatters can map to filetypes distinct from LSP's - Add explicit filetypes for entries previously relying on lang_name fallback: - docker: hadolint -> dockerfile (was wrongly mapped to yaml.docker-compose) - helm: prettier -> helm (requires vim-helm ftdetect, see helm.lua) - java: clang-format-java -> java - Rename java formatter to clang-format-java alias to isolate Java-specific clang-format options from any future c_cpp formatter usage
Neovim has no built-in 'helm' filetype, so the prettier formatter mapping in languages.lua never fired on Helm chart templates. towolf/vim-helm provides the missing ftdetect for templates/*.yaml under Chart.yaml, helmfile.*, and *.gotmpl. lazy.nvim sources ftdetect/ regardless of lazy state, so default lazy=true is sufficient.
Root cause: conform.nvim silently drops prepend_args for custom formatters that have no built-in parent file. clang-format-java was configured with --style in prepend_args, which never reached the binary -- clang-format ran with no style and defaulted to LLVM C++, which reflowed JavaDoc against the user's wish. Fix the formatter spec end-to-end: - Move --style into args directly so it actually reaches clang-format - Add range_args for visual-mode partial formatting (was silently falling back to whole-buffer reformat + diff trim) - inherit=false to skip pcall lookup of nonexistent builtin - ReflowComments: Never (correct enum syntax for clang-format v16+; the boolean 'false' form is silently rejected by v21) - Remove deprecated/inert options for Language: Java: AlwaysBreakAfterDefinitionReturnType (removed in clang-format 11), DerivePointerAlignment (C/C++ only) - AllowAllParametersOfDeclarationOnNextLine -> false (avoid hybrid indent when parameter list does not fit) - format_on_save timeout 1500ms -> 2500ms so ruff_fix + ruff_organize_imports + ruff_format chain has margin
- finder.lua: apply stylua to match .stylua.toml (was tab-indented)
- vim.yml: declare Snacks debug globals dd/bb so selene stops
flagging them as undefined in finder.lua
- nvim-test workflow: remove "Test Plugin Manager" step. It ran
`require('lazy').restore()` against a runner with no lazy.nvim
bootstrap, so it failed deterministically. Syntax-check above
is the right scope; plugin-manager smoke needs a separate
bootstrap setup.
Mechanical reformat of files whose committed state still drifted from .stylua.toml. Working-tree user WIP is preserved untouched (index-only stage of the stylua-clean HEAD content). Unblocks CI lua-quality StyLua Format Check.
Nix:
- nixd.nixpkgs.expr: switch from CWD-flake-root assumption to flake
registry alias (`builtins.getFlake "nixpkgs"`). Survives non-flake
projects and launches that lack NIX_PATH (macOS Spotlight/Launcher).
- clangd query-driver: narrow glob to *-clang-* / *-gcc-* so the Nix
store walk on first IntelliSense is bounded; add /usr/bin/clang as
nix-darwin fallback when no Nix cc wrapper is installed.
- VimLeavePre nixd cleanup: pkill -9 -> pkill -15 so the nixd
evaluation cache flushes before exit.
Java / jdtls:
- LspAttach BufWritePre: scope augroup name by buffer AND client id so
(a) re-attach of the same client clears its prior handler and (b) a
second client attaching to the same buffer does not wipe out the
first client's save-action handler.
- jdtls organizeImports: declare importOrder { java, javax, org, com }
as a sensible default. Project-level .settings/org.eclipse.jdt.ui.prefs
still takes precedence when present (Spring-generated repos).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
세션 작업 6개 커밋. 핵심은 conform.nvim이
prepend_args를 builtin parent 없는 custom formatter에서 silently drop한다는 함정으로clang-format-java에 style이 전혀 도달하지 않아 JavaDoc이 LLVM 기본 스타일로 reflow되던 버그 fix.fix(format)—--style을args에 직접 배치 /range_args추가 /ReflowComments: Never(v16+ enum) / deprecated 옵션 제거feat(helm)—towolf/vim-helm으로 helm filetype ftdetect 등록 → prettier 매핑 활성refactor(config)—collect_configfallback priority 정리 + docker/helm/java 명시적 filetypes + deadcollect_formatters_opts제거style— pure stylua 정리 (10개 파일, semantic diff 0)chore(ci)— 누락된.typos.toml, selene 표준 라이브러리 형식 수정, nvim-test workflow의loadfile()()→loadfile()(rtp 미설정 환경에서 require 실패 회피)chore(hooks)—.githooks/pre-commit(stylua/selene/syntax 게이트)Test plan
clang-format --style "..."CLI reproduction → 166자 JavaDoc 라인 보존 확인stylua --check lua/exit 0selene --display-style=quiet --allow-warnings lua/exit 0