{"id":44197518,"url":"https://github.com/barrettruth/diffs.nvim","last_synced_at":"2026-04-04T23:01:03.129Z","repository":{"id":335930454,"uuid":"1147512530","full_name":"barrettruth/diffs.nvim","owner":"barrettruth","description":"treesitter syntax highlighting for diffs","archived":false,"fork":false,"pushed_at":"2026-04-03T17:44:05.000Z","size":421,"stargazers_count":70,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-03T20:25:49.244Z","etag":null,"topics":["neovim","neovim-plugin","treesitter","vim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barrettruth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-01T21:23:53.000Z","updated_at":"2026-04-03T19:01:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/barrettruth/diffs.nvim","commit_stats":null,"previous_names":["barrettruth/fugitive-ts.nvim","barrettruth/diffs.nvim"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/barrettruth/diffs.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettruth%2Fdiffs.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettruth%2Fdiffs.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettruth%2Fdiffs.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettruth%2Fdiffs.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barrettruth","download_url":"https://codeload.github.com/barrettruth/diffs.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettruth%2Fdiffs.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31418286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","neovim-plugin","treesitter","vim"],"created_at":"2026-02-09T20:00:24.069Z","updated_at":"2026-04-04T23:01:03.080Z","avatar_url":"https://github.com/barrettruth.png","language":"Lua","readme":"# diffs.nvim\n\n**Treesitter-powered Diff Syntax highlighting for Neovim**\n\nEnhance Neovim's built-in diff mode (and much more!) with language-aware syntax\nhighlighting driven by treesitter.\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/24574916-ecb2-478e-a0ea-e4cdc971e310\" width=\"100%\" controls\u003e\u003c/video\u003e\n\n## Features\n\n- Treesitter syntax highlighting in\n  [vim-fugitive](https://github.com/tpope/vim-fugitive),\n  [Neogit](https://github.com/NeogitOrg/neogit), builtin `diff` filetype, and\n  more!\n- Character-level intra-line diff highlighting (with optional\n  [vscode-diff](https://github.com/esmuellert/codediff.nvim) FFI backend for\n  word-level accuracy)\n- `:Gdiff` unified diff against any revision\n- `:Greview` full-repo review diff with qflist/loclist navigation\n- Inline merge conflict detection, highlighting, and resolution\n- gitsigns.nvim blame popup highlighting\n- Email quoting/patch syntax support (`\u003e diff ...`)\n- Vim syntax fallback\n- Configurable highlighiting blend \u0026 priorities\n- Context-inclusive, high-accuracy highlights\n\n## Requirements\n\n- Neovim 0.9.0+\n\n## Installation\n\nInstall with your package manager of choice or via\n[luarocks](https://luarocks.org/modules/barrettruth/diffs.nvim):\n\n```\nluarocks install diffs.nvim\n```\n\n## Documentation\n\n```vim\n:help diffs.nvim\n```\n\n## FAQ\n\n**Q: How do I install with lazy.nvim?**\n\n```lua\n{\n  'barrettruth/diffs.nvim',\n  init = function()\n    vim.g.diffs = {\n      ...\n    }\n  end,\n}\n```\n\nDo not lazy load `diffs.nvim` with `event`, `lazy`, `ft`, `config`, or `keys` to\ncontrol loading - `diffs.nvim` lazy-loads itself.\n\n**Q: Does diffs.nvim support\n[vim-fugitive](https://github.com/tpope/vim-fugitive)/[Neogit](https://github.com/NeogitOrg/neogit)/[neojj](https://github.com/NicholasZolton/neojj)/[gitsigns](https://github.com/lewis6991/gitsigns.nvim)?**\n\nYes. Enable integrations in your config:\n\n```lua\nvim.g.diffs = {\n  integrations = {\n    fugitive = true,\n    neogit = true,\n    neojj = true,\n    gitsigns = true,\n  }\n}\n```\n\nSee the documentation for more information.\n\n## Known Limitations\n\n- **Incomplete syntax context**: Treesitter parses each diff hunk in isolation.\n  Context lines within the hunk provide syntactic context for the parser. In\n  rare cases, hunks that start or end mid-expression may produce imperfect\n  highlights due to treesitter error recovery.\n\n- **Syntax \"flashing\"**: `diffs.nvim` hooks into the `FileType fugitive` event\n  triggered by `vim-fugitive`, at which point the buffer is preliminarily\n  painted. The decoration provider applies highlights on the next redraw cycle,\n  causing a brief visual \"flash\".\n\n- **Cold Start**: Treesitter grammar loading (~10ms) and query compilation\n  (~4ms) are one-time costs per language per Neovim session. Each language pays\n  this cost on first encounter, which may cause a brief stutter when a diff\n  containing a new language first enters the viewport.\n\n- **Vim syntax fallback is deferred**: The vim syntax fallback (for languages\n  without a treesitter parser) cannot run inside the decoration provider's\n  redraw cycle due to Neovim's restriction on buffer mutations. Vim syntax\n  highlights for these hunks appear slightly delayed.\n\n- **Conflicting diff plugins**: `diffs.nvim` may not interact well with other\n  plugins that modify diff highlighting. Known plugins that may conflict:\n  - [`diffview.nvim`](https://github.com/sindrets/diffview.nvim) - provides its\n    own diff highlighting and conflict resolution UI\n  - [`mini.diff`](https://github.com/echasnovski/mini.diff) - visualizes buffer\n    differences with its own highlighting system\n  - [`gitsigns.nvim`](https://github.com/lewis6991/gitsigns.nvim) - generally\n    compatible, but both plugins modifying line highlights may produce\n    unexpected results\n  - [`git-conflict.nvim`](https://github.com/akinsho/git-conflict.nvim) -\n    `diffs.nvim` now includes built-in conflict resolution; disable one or the\n    other to avoid overlap\n\n# Acknowledgements\n\n- [`vim-fugitive`](https://github.com/tpope/vim-fugitive)\n- [@esmuellert](https://github.com/esmuellert) /\n  [`codediff.nvim`](https://github.com/esmuellert/codediff.nvim) - vscode-diff\n  algorithm FFI backend for word-level intra-line accuracy\n- [`diffview.nvim`](https://github.com/sindrets/diffview.nvim)\n- [`difftastic`](https://github.com/Wilfred/difftastic)\n- [`mini.diff`](https://github.com/echasnovski/mini.diff)\n- [`gitsigns.nvim`](https://github.com/lewis6991/gitsigns.nvim)\n- [`git-conflict.nvim`](https://github.com/akinsho/git-conflict.nvim)\n- [@phanen](https://github.com/phanen) - diff header highlighting, unknown\n  filetype fix, shebang/modeline detection, treesitter injection support,\n  decoration provider highlighting architecture, gitsigns blame popup\n  highlighting, intra-line bg visibility fix\n- [@tris203](https://github.com/tris203) - support for transparent backgrounds\n- [@letientai299](https://github.com/letientai299) - `diff.mnemonicPrefix`\n  support\n","funding_links":[],"categories":["Git"],"sub_categories":["Quickfix"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettruth%2Fdiffs.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarrettruth%2Fdiffs.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettruth%2Fdiffs.nvim/lists"}