Skip to content

Commit 992b971

Browse files
committed
feat: enable difffold to gin-diff
1 parent 1565e72 commit 992b971

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

denops/gin/command/diff/edit.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
import * as buffer from "jsr:@denops/std@^7.0.0/buffer";
1616
import { exec as execBuffer } from "../../command/buffer/edit.ts";
1717
import { init as initDiffJump } from "../../feat/diffjump/jump.ts";
18+
import { init as initDiffFold } from "../../feat/difffold/fold.ts";
1819

1920
export async function edit(
2021
denops: Denops,
@@ -90,4 +91,7 @@ export async function exec(
9091

9192
// Initialize diff jump functionality
9293
await initDiffJump(denops, bufnr, "diff");
94+
95+
// Initialize diff fold functionality
96+
await initDiffFold(denops, bufnr);
9397
}

ftplugin/gin-diff.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ if exists('b:did_ftplugin')
33
endif
44
runtime ftplugin/diff.vim
55

6+
setlocal foldlevel=1
7+
68
if !get(g:, 'gin_diff_disable_default_mappings')
79
nmap <buffer> <CR> <Plug>(gin-diffjump-smart)zv
810
nmap <buffer> g<CR> <Plug>(gin-diffjump-old)zv

0 commit comments

Comments
 (0)