Files detected via shebang or modeline (e.g., `build` with `#!/bin/bash`) weren't getting syntax highlighting because `vim.filetype.match()` only does filename-based detection. Now `get_ft_from_filename()` first checks if a buffer already exists for the file and uses its detected filetype. This requires knowing the repo root to construct the full path, so: - `parse_buffer()` reads `b:diffs_repo_root` or `b:git_dir` (fugitive) - `commands.lua` sets `b:diffs_repo_root` on diff buffers it creates Co-authored-by: phanen <phanen@qq.com> |
||
|---|---|---|
| .. | ||
| diffs | ||