Full Code of yuki-ycino/fzf-preview.vim for AI

main 933836744ad5 cached
295 files
466.7 KB
134.8k tokens
169 symbols
1 requests
Download .txt
Showing preview only (532K chars total). Download the full file or copy to clipboard to get everything.
Repository: yuki-ycino/fzf-preview.vim
Branch: main
Commit: 933836744ad5
Files: 295
Total size: 466.7 KB

Directory structure:
gitextract_mlnhz3k1/

├── .eslintignore
├── .eslintrc.js
├── .github/
│   ├── ISSUE_TEMPLATE.md
│   ├── issue_example/
│   │   └── Dockerfile
│   └── workflows/
│       ├── build.yml
│       ├── can-release.yml
│       ├── release-coc.yml
│       ├── release-remote.yml
│       └── release-rpc.yml
├── .gitignore
├── .luarc.json
├── .markdownlint.json
├── .prettierrc.json
├── LICENSE
├── README.md
├── autoload/
│   ├── fzf_preview/
│   │   ├── remote/
│   │   │   ├── consumer/
│   │   │   │   ├── git.vim
│   │   │   │   └── register.vim
│   │   │   ├── exec_fzf.vim
│   │   │   ├── handler_to_process.vim
│   │   │   ├── mr.vim
│   │   │   ├── process.vim
│   │   │   ├── resource/
│   │   │   │   ├── all_buffers.vim
│   │   │   │   ├── bookmarks.vim
│   │   │   │   ├── buffers.vim
│   │   │   │   ├── changes.vim
│   │   │   │   ├── directory_files.vim
│   │   │   │   ├── git_files.vim
│   │   │   │   ├── git_status.vim
│   │   │   │   ├── grep.vim
│   │   │   │   ├── jumps.vim
│   │   │   │   ├── lines.vim
│   │   │   │   ├── marks.vim
│   │   │   │   ├── memolist.vim
│   │   │   │   ├── project_files.vim
│   │   │   │   ├── quickfix_and_locationlist.vim
│   │   │   │   ├── tags.vim
│   │   │   │   ├── todo_comments.vim
│   │   │   │   ├── util.vim
│   │   │   │   ├── vim_command.vim
│   │   │   │   ├── vim_lsp.vim
│   │   │   │   ├── vista.vim
│   │   │   │   └── yankround.vim
│   │   │   ├── runner.vim
│   │   │   ├── tagstack.vim
│   │   │   ├── util.vim
│   │   │   ├── variable.vim
│   │   │   └── window.vim
│   │   ├── rpc/
│   │   │   └── server.vim
│   │   └── rpc.vim
│   ├── fzf_preview.vim
│   └── vital/
│       ├── _fzf_preview/
│       │   ├── Async/
│       │   │   ├── Later.vim
│       │   │   └── Promise.vim
│       │   └── VS/
│       │       ├── Event/
│       │       │   └── Emitter.vim
│       │       ├── RPC/
│       │       │   └── JSON.vim
│       │       └── System/
│       │           └── Job.vim
│       ├── _fzf_preview.vim
│       ├── fzf_preview.vim
│       └── fzf_preview.vital
├── bin/
│   ├── git_actions_preview
│   ├── git_blame_pr
│   └── preview_yankround_register
├── doc/
│   └── fzf_preview_vim.txt
├── jest.config.ts
├── lua/
│   └── fzf-preview/
│       └── init.lua
├── package.json
├── plugin/
│   └── fzf_preview.vim
├── rplugin/
│   └── node/
│       └── fzf-preview.vim/
│           └── .keep
├── scripts/
│   └── preview.js
├── src/
│   ├── @types/
│   │   └── index.d.ts
│   ├── args/
│   │   ├── add-fzf-arg-parser.test.ts
│   │   ├── add-fzf-arg-parser.ts
│   │   ├── directory-files-args-parser.ts
│   │   ├── empty-source-func-args-parser.ts
│   │   ├── experimental-parser.ts
│   │   ├── files-from-resources-parser.ts
│   │   ├── grep-args-parser.ts
│   │   ├── index.ts
│   │   ├── parser.ts
│   │   ├── processes-parser.test.ts
│   │   ├── processes-parser.ts
│   │   ├── resume-parser.ts
│   │   └── session-parser.ts
│   ├── association/
│   │   ├── coc-command.ts
│   │   ├── command.ts
│   │   └── vim-variable.ts
│   ├── coc.ts
│   ├── connector/
│   │   ├── bookmarks.ts
│   │   ├── buffers.ts
│   │   ├── changes.ts
│   │   ├── coc.ts
│   │   ├── convert-for-fzf.ts
│   │   ├── directory-files.ts
│   │   ├── fzf.ts
│   │   ├── git.ts
│   │   ├── grep.ts
│   │   ├── jumps.ts
│   │   ├── lines.ts
│   │   ├── lsp.ts
│   │   ├── marks.ts
│   │   ├── memolist.ts
│   │   ├── nvim-lsp.ts
│   │   ├── old-files.ts
│   │   ├── open-bufnr.ts
│   │   ├── open-file.ts
│   │   ├── project-files.ts
│   │   ├── quickfix-and-locationlist.ts
│   │   ├── register.ts
│   │   ├── resume.ts
│   │   ├── tags.ts
│   │   ├── todo-comments.ts
│   │   ├── util.ts
│   │   ├── vim-command.ts
│   │   ├── vim-help.ts
│   │   ├── vim-lsp.ts
│   │   ├── vista.ts
│   │   └── yankround.ts
│   ├── const/
│   │   ├── fzf-handler.ts
│   │   ├── fzf-option.ts
│   │   ├── fzf-processes.ts
│   │   ├── fzf-resource.ts
│   │   ├── fzf-runner.ts
│   │   ├── git.ts
│   │   ├── module.ts
│   │   └── system.ts
│   ├── fzf/
│   │   ├── command/
│   │   │   ├── execute-fast.ts
│   │   │   ├── execute-normal.ts
│   │   │   ├── index.ts
│   │   │   └── util.ts
│   │   ├── function/
│   │   │   └── index.ts
│   │   ├── handler/
│   │   │   └── index.ts
│   │   ├── option/
│   │   │   ├── convert.test.ts
│   │   │   ├── convert.ts
│   │   │   ├── generator.test.ts
│   │   │   └── generator.ts
│   │   ├── process/
│   │   │   ├── command-palette.ts
│   │   │   ├── consumer/
│   │   │   │   ├── command-palette.ts
│   │   │   │   ├── git-action.ts
│   │   │   │   ├── git-branch-action.ts
│   │   │   │   ├── git-branch.ts
│   │   │   │   ├── git-log-action.ts
│   │   │   │   ├── git-log.ts
│   │   │   │   ├── git-reflog-action.ts
│   │   │   │   ├── git-reflog.ts
│   │   │   │   ├── git-stash-action.ts
│   │   │   │   ├── git-stash.ts
│   │   │   │   ├── git-status-action.ts
│   │   │   │   ├── git-status.ts
│   │   │   │   ├── git.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── open-buffer.ts
│   │   │   │   ├── open-bufnr.ts
│   │   │   │   ├── open-file.test.ts
│   │   │   │   ├── open-file.ts
│   │   │   │   ├── open-pr.ts
│   │   │   │   └── register.ts
│   │   │   ├── git-action.ts
│   │   │   ├── git-branch-action.ts
│   │   │   ├── git-branch.ts
│   │   │   ├── git-log-action.ts
│   │   │   ├── git-log.ts
│   │   │   ├── git-reflog-action.ts
│   │   │   ├── git-reflog.ts
│   │   │   ├── git-stash-action.ts
│   │   │   ├── git-stash.ts
│   │   │   ├── git-status-action.ts
│   │   │   ├── git-status.ts
│   │   │   ├── index.ts
│   │   │   ├── open-buffer.ts
│   │   │   ├── open-bufnr.ts
│   │   │   ├── open-file.ts
│   │   │   ├── open-pr.ts
│   │   │   ├── process.ts
│   │   │   └── register.ts
│   │   ├── resource/
│   │   │   ├── all-buffers.ts
│   │   │   ├── blame-pr.ts
│   │   │   ├── bookmarks.ts
│   │   │   ├── buffer-lines.ts
│   │   │   ├── buffer-tags.ts
│   │   │   ├── buffer-vista.ts
│   │   │   ├── buffers.ts
│   │   │   ├── changes.ts
│   │   │   ├── coc/
│   │   │   │   ├── coc-current-diagnostics.ts
│   │   │   │   ├── coc-definitions.ts
│   │   │   │   ├── coc-diagnostics.ts
│   │   │   │   ├── coc-implementations.ts
│   │   │   │   ├── coc-outline.ts
│   │   │   │   ├── coc-references.ts
│   │   │   │   ├── coc-tsserver-source-definition.ts
│   │   │   │   ├── coc-type-definitions.ts
│   │   │   │   └── index.ts
│   │   │   ├── command-palette.ts
│   │   │   ├── ctags.ts
│   │   │   ├── directory-files.ts
│   │   │   ├── files-from-resources.ts
│   │   │   ├── git-actions.ts
│   │   │   ├── git-branch-actions.ts
│   │   │   ├── git-branches.ts
│   │   │   ├── git-files.ts
│   │   │   ├── git-log-actions.ts
│   │   │   ├── git-logs.ts
│   │   │   ├── git-reflog-actions.ts
│   │   │   ├── git-reflogs.ts
│   │   │   ├── git-stash-actions.ts
│   │   │   ├── git-stashes.ts
│   │   │   ├── git-status-actions.ts
│   │   │   ├── git-status.ts
│   │   │   ├── grep.ts
│   │   │   ├── index.ts
│   │   │   ├── jumps.ts
│   │   │   ├── lines.ts
│   │   │   ├── locationlist.ts
│   │   │   ├── marks.ts
│   │   │   ├── memolist-grep.ts
│   │   │   ├── memolist.ts
│   │   │   ├── mru.ts
│   │   │   ├── mrw.ts
│   │   │   ├── nvim-lsp-current-diagnostics.ts
│   │   │   ├── nvim-lsp-definition.ts
│   │   │   ├── nvim-lsp-diagnostics.ts
│   │   │   ├── nvim-lsp-implementation.ts
│   │   │   ├── nvim-lsp-references.ts
│   │   │   ├── nvim-lsp-type-definition.ts
│   │   │   ├── oldfiles.ts
│   │   │   ├── project-files.ts
│   │   │   ├── project-mru.ts
│   │   │   ├── project-mrw.ts
│   │   │   ├── project-oldfiles.ts
│   │   │   ├── quickfix.ts
│   │   │   ├── todo-comments.ts
│   │   │   ├── vim-help.ts
│   │   │   ├── vim-lsp-current-diagnostics.ts
│   │   │   ├── vim-lsp-definition.ts
│   │   │   ├── vim-lsp-diagnostics.ts
│   │   │   ├── vim-lsp-implementation.ts
│   │   │   ├── vim-lsp-references.ts
│   │   │   ├── vim-lsp-type-definition.ts
│   │   │   ├── vista.ts
│   │   │   └── yankround.ts
│   │   ├── syntax/
│   │   │   └── colorize.ts
│   │   └── util.ts
│   ├── module/
│   │   ├── execute-command.ts
│   │   ├── file-path.ts
│   │   ├── git-config.ts
│   │   ├── recall.ts
│   │   ├── resume.ts
│   │   ├── selector/
│   │   │   ├── execute-command.ts
│   │   │   ├── file-path.ts
│   │   │   ├── git-config.ts
│   │   │   ├── recall.ts
│   │   │   ├── resume.ts
│   │   │   ├── session.ts
│   │   │   └── vim-variable.ts
│   │   ├── session.ts
│   │   └── vim-variable.ts
│   ├── plugin/
│   │   ├── fzf-runner.ts
│   │   ├── index.ts
│   │   ├── process-runner.ts
│   │   └── sync-vim-variable.ts
│   ├── register/
│   │   ├── coc/
│   │   │   └── index.ts
│   │   └── remote/
│   │       └── index.ts
│   ├── remote.ts
│   ├── rpc.ts
│   ├── store/
│   │   └── index.ts
│   ├── system/
│   │   ├── command.ts
│   │   ├── file.ts
│   │   ├── mr.ts
│   │   ├── project.ts
│   │   └── tags.ts
│   ├── type/
│   │   ├── args.ts
│   │   ├── command.ts
│   │   ├── connector.ts
│   │   ├── fzf.ts
│   │   ├── git.ts
│   │   ├── index.ts
│   │   ├── lsp.ts
│   │   ├── process.ts
│   │   ├── resource.ts
│   │   ├── rpc.ts
│   │   ├── syntax.ts
│   │   ├── system.ts
│   │   ├── vim-variable.ts
│   │   └── vim.ts
│   └── util/
│       ├── align.test.ts
│       ├── align.ts
│       ├── array.ts
│       ├── type.ts
│       └── uniq-with.ts
├── stylua.toml
├── tsconfig.json
├── tsconfig.webpack-jest.json
├── webpack.coc.ts
├── webpack.common.ts
├── webpack.preview.ts
├── webpack.remote.ts
└── webpack.rpc.ts

================================================
FILE CONTENTS
================================================

================================================
FILE: .eslintignore
================================================
.eslintrc.js


================================================
FILE: .eslintrc.js
================================================
module.exports = {
  parser: "@typescript-eslint/parser",
  extends: [
    "airbnb-base",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:@typescript-eslint/recommended-requiring-type-checking",
    "plugin:eslint-comments/recommended",
    "plugin:n/recommended",
    "plugin:import/errors",
    "plugin:import/warnings",
    "plugin:import/typescript",
    "prettier",
  ],
  plugins: ["@typescript-eslint", "import", "simple-import-sort"],
  parserOptions: {
    sourceType: "module",
    project: "./tsconfig.json",
    ecmaVersion: 2020,
  },
  settings: {
    "import/resolver": {
      typescript: {},
    },
    "import/parsers": {
      "@typescript-eslint/parser": [".ts"],
    },
  },
  rules: {
    complexity: ["error", 7],
    "no-console": "off",
    "no-else-return": "off",
    "object-shorthand": "error",
    "arrow-body-style": "off",
    "no-restricted-syntax": "off",
    "no-param-reassign": [
      "error",
      {
        props: true,
        ignorePropertyModificationsFor: ["draft", "state"],
      },
    ],
    "padding-line-between-statements": [
      "error",
      {
        blankLine: "always",
        prev: "*",
        next: "return",
      },
    ],
    "no-return-await": "off",

    "simple-import-sort/imports": "warn",
    "simple-import-sort/exports": "warn",
    "no-restricted-imports": ["error", { patterns: ["./", "../"] }],
    "import/prefer-default-export": "off",
    "import/extensions": ["error", "ignorePackages", { ts: "never" }],
    "@typescript-eslint/consistent-type-imports": "error",

    "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
    "@typescript-eslint/strict-boolean-expressions": "error",
    "@typescript-eslint/array-type": ["error", { default: "generic" }],
    "@typescript-eslint/prefer-optional-chain": "error",
    "@typescript-eslint/prefer-nullish-coalescing": "error",
    "@typescript-eslint/no-namespace": "error",
    "@typescript-eslint/no-unnecessary-type-assertion": "error",
    "@typescript-eslint/restrict-plus-operands": "error",
    "@typescript-eslint/explicit-function-return-type": "off",
    "@typescript-eslint/ban-ts-comment": "off",
    "@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],

    "eslint-comments/no-unused-disable": "error",

    "n/no-unsupported-features/es-syntax": "off",
    "n/no-missing-import": "off",
  },
  overrides: [
    {
      files: ["**/*.test.ts"],
      extends: ["plugin:jest/recommended", "plugin:jest/style"],
      plugins: ["jest"],
      env: {
        jest: true,
      },
      rules: {
        "@typescript-eslint/no-empty-function": "off",
      },
    },
    {
      parserOptions: {
        sourceType: "module",
        project: "./tsconfig.webpack-jest.json",
      },
      files: ["./webpack.*.ts", "./jest.config.ts"],
      rules: {
        "import/no-extraneous-dependencies": ["error", { devDependencies: true }],
        "no-restricted-imports": "off",
      },
    },
  ],
}


================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
## Problems summary


### Expected


### Environment Information

- fzf-preview version (package.json):

- OS:

- Vim/Neovim version:

### Provide a minimal init.vim

```vim
" call plug#begin('~/.vim/plugged')
" Plug 'junegunn/fzf'
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Plug 'ryanoasis/vim-devicons'
" call plug#end()
" 
" let g:coc_global_extensions = ['coc-fzf-preview']
```

### Screenshot


### Dockerfile that reproduces the problem (if possible)

Refer to https://github.com/yuki-yano/fzf-preview.vim/blob/main/.github/issue_example/Dockerfile

```Dockerfile
```


================================================
FILE: .github/issue_example/Dockerfile
================================================
FROM ubuntu:focal

ENV DEBIAN_FRONTEND=noninteractive

# Neovim
RUN apt update && apt install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip git

WORKDIR /usr/local/src
RUN git clone https://github.com/neovim/neovim.git

WORKDIR /usr/local/src/neovim
RUN make && make install

# zsh
RUN apt install -y zsh

# Node
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt install -y nodejs

# Python
RUN apt install -y python python3 python3-pip
# RUN pip3 install neovim

# bat & ripgrep
# RUN apt install -y bat
# RUN apt install -y ripgrep

# Workaround for https://github.com/sharkdp/bat/issues/938
RUN apt install -y -o Dpkg::Options::="--force-overwrite" bat ripgrep

# fd
RUN apt install -y fd-find

# vim plugin
RUN sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
RUN mkdir -p /root/.config/nvim
RUN echo "call plug#begin('~/.vim/plugged') \n\
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'} \n\
Plug 'neoclide/coc.nvim', {'branch': 'release'} \n\
call plug#end() \n\
\n\
let g:coc_global_extensions = ['coc-fzf-preview'] \n" >> /root/.config/nvim/init.vim

RUN nvim -c "PlugInstall" -c "qa!"
RUN nvim -c "CocInstall -sync coc-fzf-preview" -c "qa!"

ENTRYPOINT ["nvim"]


================================================
FILE: .github/workflows/build.yml
================================================
name: Build

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 16
      - run: yarn install --ignore-script --frozen-lockfile
      - run: yarn run typecheck
      - run: yarn run lint
      - run: yarn run prettier
      - run: yarn run test
      - run: yarn run release-build:remote
      - run: yarn run release-build:coc
      - run: yarn run release-build:rpc
      - id: check-release
        run: |
          if [[ $(git show --no-patch --format=%s) =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
            echo ::set-output name=IS_RELEASE::true
          fi
      - if: steps.check-release.outputs.IS_RELEASE == 'true'
        uses: peter-evans/repository-dispatch@v1
        with:
          token: ${{ secrets.REPO_ACCESS_TOKEN }}
          event-type: can-release


================================================
FILE: .github/workflows/can-release.yml
================================================
name: Can release

on:
  repository_dispatch:
    types: 
      - can-release

jobs:
  can_release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 16
      - run: yarn install --ignore-script --frozen-lockfile
      - run: yarn run can-npm-publish


================================================
FILE: .github/workflows/release-coc.yml
================================================
name: Release coc extensions

on:
  workflow_run:
    workflows:
      - Can release
    branches:
      - main
    types:
      - completed

jobs:
  release:
    name: Release coc extensions
    if: github.event.workflow_run.conclusion == 'success'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          ref: main
      - uses: actions/setup-node@v1
        with:
          node-version: 16
          registry-url: https://registry.npmjs.org/
      - run: yarn install --ignore-script --frozen-lockfile
      - run: |
          git config --global user.email "github-actions[bot]@users.noreply.github.com"
          git config --global user.name "github-actions[bot]"
      - run: yarn run release-build:coc
      - run: yarn run build:preview-script
      - run: |
          TAG="v$(yarn run --silent print-version)"
          git tag $TAG
          git push origin $TAG
      - run: yarn publish
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}


================================================
FILE: .github/workflows/release-remote.yml
================================================
name: Release remote plugin

on:
  workflow_run:
    workflows:
      - Can release
    branches:
      - main
    types:
      - completed

jobs:
  release:
    name: Release remote plugin
    if: github.event.workflow_run.conclusion == 'success'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v1
        with:
          node-version: 16
      - run: |
          git config --global user.email "github-actions[bot]@users.noreply.github.com"
          git config --global user.name "github-actions[bot]"
      - run: git checkout release/remote
      - run: git merge main
      - run: yarn install --ignore-script --frozen-lockfile
      - run: yarn run release-build:remote
      - run: yarn run build:preview-script
      - run: git add --all
      - run: git commit -m "Release $(yarn run --silent print-version)" --allow-empty
      - run: git push origin release/remote


================================================
FILE: .github/workflows/release-rpc.yml
================================================
name: Release Vim script RPC

on:
  workflow_run:
    workflows:
      - Can release
    branches:
      - main
    types:
      - completed

jobs:
  release:
    name: Release Vim script RPC
    if: github.event.workflow_run.conclusion == 'success'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v1
        with:
          node-version: 16
      - run: |
          git config --global user.email "github-actions[bot]@users.noreply.github.com"
          git config --global user.name "github-actions[bot]"
      - run: git checkout release/rpc
      - run: git merge main
      - run: yarn install --ignore-script --frozen-lockfile
      - run: yarn run release-build:rpc
      - run: yarn run build:preview-script
      - run: git add --all
      - run: git commit -m "Release $(yarn run --silent print-version)" --allow-empty
      - run: git push origin release/rpc


================================================
FILE: .gitignore
================================================
/node_modules

/lib
/rplugin/node/fzf-preview.vim/index.js
/bin/preview_fzf_grep

/doc/tags


================================================
FILE: .luarc.json
================================================
{
    "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
    "Lua.diagnostics.disable": [
        "undefined-global"
    ],
    "Lua.diagnostics.globals": [
        "vim"
    ]
}

================================================
FILE: .markdownlint.json
================================================
{
  "line-length": false,
  "no-inline-html": false,
  "no-duplicate-header": false,
  "commands-show-output": false
}


================================================
FILE: .prettierrc.json
================================================
{
  "semi": false,
  "printWidth": 120
}


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2018 Yuki Yano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# ![logo](https://user-images.githubusercontent.com/5423775/104124691-7f8b4c00-5395-11eb-85d6-93b1c55cf0c8.png)

[![Build](https://github.com/yuki-yano/fzf-preview.vim/workflows/Build/badge.svg)](https://github.com/yuki-yano/fzf-preview.vim/actions?query=workflow:Build)
[![Release RPC](https://github.com/yuki-yano/fzf-preview.vim/workflows/Release%20Vim%20script%20RPC/badge.svg)](https://github.com/yuki-yano/fzf-preview.vim/actions?query=workflow:"Release+Vim+script+RPC")
[![Release remote plugin](https://github.com/yuki-yano/fzf-preview.vim/workflows/Release%20remote%20plugin/badge.svg)](https://github.com/yuki-yano/fzf-preview.vim/actions?query=workflow:%22Release+remote+plugin%22)
[![Release coc extensions](https://github.com/yuki-yano/fzf-preview.vim/workflows/Release%20coc%20extensions/badge.svg)](https://github.com/yuki-yano/fzf-preview.vim/actions?query=workflow:%22Release+coc+extensions%22)

[![Support](https://img.shields.io/badge/Support-Vim%208.1%20or%20above-yellowgreen)](https://www.vim.org)
[![Support](https://img.shields.io/badge/Support-Neovim%200.4%20or%20above-yellowgreen)](https://neovim.io)
[![Language](https://img.shields.io/badge/Language-TypeScript-blue)](https://www.typescriptlang.org)
[![Language](https://img.shields.io/badge/Language-Vim%20script-green)](https://www.vim.org)
[![Lint with](https://img.shields.io/badge/Lint%20with-ESLint-blueviolet)](https://eslint.org)
[![Styled with](https://img.shields.io/badge/Styled%20with-Prettier-ff69b4)](https://prettier.io)
[![Tested with](https://img.shields.io/badge/Tested%20with-Jest-green)](https://jestjs.io/)
[![Powered by](https://img.shields.io/badge/Powered%20by-fzf-7b3948)](https://github.com/junegunn/fzf)
[![Powered by](https://img.shields.io/badge/Powered%20by-coc.nvim-7b3948)](https://github.com/neoclide/coc.nvim)
[![Powered by](https://img.shields.io/badge/Powered%20by-vital--vs-7b3948)](https://github.com/hrsh7th/vim-vital-vs)
[![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/yuki-yano/fzf-preview.vim/blob/main/LICENSE)
[![Doc](https://img.shields.io/badge/Doc-:h%20fzf--preview-orange)](https://github.com/yuki-yano/fzf-preview.vim/blob/main/doc/fzf_preview_vim.txt)
[![All contributors](https://img.shields.io/badge/All%20contributors-17-orange)](https://github.com/yuki-yano/fzf-preview.vim/graphs/contributors)

fzf-preview is a (Neo)vim plugin and coc extension written in TypeScript that provide powerful integration with fzf. It provides multiple presets for fzf and correspondingly powerful preview functionality. It also provides advanced interactive git integration.

Since fzf-preview.vim implements RPC in the Vim script, it will work in both Vim and Neovim if you use the RPC release.
It can also be installed as Remote Plugin and coc extensions. If you want to use the integration with coc, install coc extensions.

[Introductory Article](https://zenn.dev/yano/articles/vim_with_fzf_preview_is_best_experience) (Japanese)

This plugin can be easily extended in comparison to [fzf.vim](https://github.com/junegunn/fzf.vim).

e.g. [Fugitive](https://github.com/tpope/vim-fugitive)(launch git commands), bdelete(delete a selected buffer from the buffer list)

## TOC

- [1. Features](#features)
- [2. Demo](#demo)
- [3. Requirements](#requirements)
- [4. Installation](#installation)
- [5. Usage](#usage)
- [6. Customization](#customization)
- [7. Release note](#release-note)
- [8. Others](#others)
- [9. License](#license)

## Features

1. Provides an excellent UI with floating windows by default
2. Supports devicons and output highlighting by default
3. Preview the selected item (with an arbitrary command)
4. Fast file and buffer search by fuzzy matching
5. Search all project files and history
6. Search from file history files using oldfiles and mru
7. Interactive git integration (with [Fugitive](https://github.com/tpope/vim-fugitive) or [Gina](https://github.com/lambdalisue/gina.vim))
8. Jump lines from jumplist or changelist
9. Interactive grep and preview from the current project
10. Export the selected items to QuickFix.

## Demo

### Open file and :bdelete

![fzf-preview](https://user-images.githubusercontent.com/5423775/88540152-6e4fbc80-d04d-11ea-8d19-314ee5e4d294.gif "fzf-preview")

### Interactive git integration (Integrate with [Fugitive](https://github.com/tpope/vim-fugitive) or [Gina](https://github.com/lambdalisue/gina.vim))

![fzf-preview](https://user-images.githubusercontent.com/5423775/88540232-86bfd700-d04d-11ea-8604-8ad8aed09cbb.gif "fzf-preview")

### Grep

![fzf-preview](https://user-images.githubusercontent.com/5423775/88540281-9ccd9780-d04d-11ea-9672-b9af8a6d6307.gif "fzf-preview")

### Export quickfix and refactor (with [vim-qfreplace](https://github.com/thinca/vim-qfreplace))

![fzf-preview](https://user-images.githubusercontent.com/5423775/88540327-af47d100-d04d-11ea-99b5-f453862ae892.gif "fzf-preview")

## Requirements

- **Node** <https://nodejs.org/>
- git <https://git-scm.com/>
- fzf <https://github.com/junegunn/fzf>

### Remote Plugin

- Neovim <https://neovim.io/>

### coc extensions

- coc.nvim <https://github.com/neoclide/coc.nvim>

### Optional

#### Functional

- **ripgrep (Require FzfPreviewProjectGrep and FzfPreviewDirectoryFiles)** (Recommended) <https://github.com/BurntSushi/ripgrep>
- **Fugitive (Require git integration)**  (Recommended) <https://github.com/tpope/vim-fugitive>
- Gina (Require git integration) <https://github.com/lambdalisue/gina.vim>
- universal-ctags (Require FzfPreviewCtags and FzfPreviewBufferTags) <https://github.com/universal-ctags/ctags>
- vista.vim (Require FzfPreviewVistaCtags and FzfPreviewVistaBufferCtags) <https://github.com/liuchengxu/vista.vim>
- vim-bookmarks (Require FzfPreviewBookmarks) <https://github.com/MattesGroeger/vim-bookmarks>
- yankround.vim (Require FzfPreviewYankround) <https://github.com/LeafCage/yankround.vim>
- memolist.vim (Require FzfPreviewMemoList and FzfPreviewMemoListGrep) <https://github.com/glidenote/memolist.vim>
- todo-comments.nvim (Require FzfPreviewTodoComments) <https://github.com/folke/todo-comments.nvim>
- GitHub cli (Require FzfPreviewBlamePR) <https://github.com/cli/cli>
- Yarn (Require build latest version) <https://classic.yarnpkg.com/>

#### Appearance

When bat is installed you can highlight the preview and see it. Otherwise, head will be used

- **bat (Add color to the preview)** (Recommended) <https://github.com/sharkdp/bat>
- vim-devicons (Use devicons) <https://github.com/ryanoasis/vim-devicons>

## Installation

### Vim script RPC

Use [Dein](https://github.com/Shougo/dein.vim), [vim-plug](https://github.com/junegunn/vim-plug) or any Vim plugin manager of your choice.

Install `release/rpc` branch.

```vim
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'yuki-yano/fzf-preview.vim', { 'branch': 'release/rpc' }
```

or

```vim
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
call dein#add('yuki-yano/fzf-preview.vim', { 'rev': 'release/rpc' })
```

### Remote Plugin

Install the npm package [neovim](https://www.npmjs.com/package/neovim) to get the remote plugin working.

```shell
$ npm install -g neovim
```

Use [Dein](https://github.com/Shougo/dein.vim), [vim-plug](https://github.com/junegunn/vim-plug) or any Vim plugin manager of your choice.

Install `release/remote` branch and execute `:UpdateRemotePlugins` when after installed plugin.

```vim
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'yuki-yano/fzf-preview.vim', { 'branch': 'release/remote', 'do': ':UpdateRemotePlugins' }
```

or

```vim
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
call dein#add('yuki-yano/fzf-preview.vim', { 'rev': 'release/remote' })
```

### coc extensions

Install the [fzf](https://github.com/junegunn/fzf), [coc.nvim](https://github.com/neoclide/coc.nvim) and install coc-fzf-preview

```vim
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
```

```vim
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
call dein#add('neoclide/coc.nvim', { 'rev': 'release', 'merged': 0 })
```

and

```vim
:CocInstall coc-fzf-preview
```

## Usage

### Command

Vim script RPC, Remote Plugin, and coc extensions, in that order.

```vim
" Select project files
:FzfPreviewProjectFilesRpc
:FzfPreviewProjectFiles
:CocCommand fzf-preview.ProjectFiles

" Select file from git ls-files
:FzfPreviewGitFilesRpc
:FzfPreviewGitFiles
:CocCommand fzf-preview.GitFiles

" Select file from directory files (default to current working directory) (Required [ripgrep](https://github.com/BurntSushi/ripgrep))
:FzfPreviewDirectoryFilesRpc {path or none}
:FzfPreviewDirectoryFiles {path or none}
:CocCommand fzf-preview.DirectoryFiles

" Select file buffers. Used open-buffer processes.
:FzfPreviewBuffersRpc
:FzfPreviewBuffers
:CocCommand fzf-preview.Buffers

" Select all buffers. Used open-bufnr processes
:FzfPreviewAllBuffersRpc
:FzfPreviewAllBuffers
:CocCommand fzf-preview.AllBuffers

" Select project files from oldfiles
:FzfPreviewProjectOldFilesRpc
:CocCommand fzf-preview.ProjectOldFiles

" Select project mru (Most Recently Used) files
:FzfPreviewProjectMruFilesRpc
:FzfPreviewProjectMruFiles
:CocCommand fzf-preview.ProjectMruFiles

" Select project mrw (Most Recently Written) files
:FzfPreviewProjectMrwFilesRpc
:FzfPreviewProjectMrwFiles
:CocCommand fzf-preview.ProjectMrwFiles

" Grep project files from args word
:FzfPreviewProjectGrepRpc {args}
:FzfPreviewProjectGrep {args}
:CocCommand fzf-preview.ProjectGrep {args}

" Run FzfPreviewProjectGrep with the same arguments as before.
:FzfPreviewProjectGrepRecallRpc
:FzfPreviewProjectGrepRecall
:CocCommand fzf-preview.ProjectGrepRecall

" Select tags from tags file (Required [universal-ctags](https://github.com/universal-ctags/ctags))
:FzfPreviewCtagsRpc
:FzfPreviewCtags
:CocCommand fzf-preview.Ctags

" Select tags from current files (Required [universal-ctags](https://github.com/universal-ctags/ctags))
:FzfPreviewBufferTagsRpc
:FzfPreviewBufferTags
:CocCommand fzf-preview.BufferTags

" Select files from oldfiles
:FzfPreviewOldFilesRpc
:FzfPreviewOldFiles
:CocCommand fzf-preview.OldFiles

" Select mru (Most Recently Used) files
:FzfPreviewMruFilesRpc
:FzfPreviewMruFiles
:CocCommand fzf-preview.MruFiles

" Select mrw (Most Recently Written) files
:FzfPreviewMrwFilesRpc
:FzfPreviewMrwFiles
:CocCommand fzf-preview.MrwFiles

" Select line from QuickFix
:FzfPreviewQuickFixRpc
:FzfPreviewQuickFix
:CocCommand fzf-preview.QuickFix

" Select line from LocationList
:FzfPreviewLocationListRpc
:FzfPreviewLocationList
:CocCommand fzf-preview.LocationList

" Select line from current buffer (Required [bat](https://github.com/sharkdp/bat))
:FzfPreviewLinesRpc
:FzfPreviewLines
:CocCommand fzf-preview.Lines

" Select line from loaded buffer
:FzfPreviewBufferLinesRpc
:FzfPreviewBufferLines
:CocCommand fzf-preview.BufferLines

" Select jumplist item
:FzfPreviewJumpsRpc
:FzfPreviewJumps
:CocCommand fzf-preview.Jumps

" Select changelist item
:FzfPreviewChangesRpc
:FzfPreviewChanges
:CocCommand fzf-preview.Changes

" Select mark
:FzfPreviewMarksRpc
:CocCommand fzf-preview.Marks

" Select files from selected resources (project, git, directory, buffer, project_old, project_mru, project_mrw, old, mru, mrw)
:FzfPreviewFromResourcesRpc
:FzfPreviewFromResources
:CocCommand fzf-preview.FromResources

" Execute and edit command history
:FzfPreviewCommandPaletteRpc
:FzfPreviewCommandPalette
:CocCommand fzf-preview.CommandPalette

# Grep vim help
:FzfPreviewGrepHelpRpc
:FzfPreviewGrepHelp
:CocCommand fzf-preview.GrepHelp

" Interactive git integration. (Required [Fugitive](https://github.com/tpope/vim-fugitive) or [Gina](https://github.com/lambdalisue/gina.vim))
:FzfPreviewGitActionsRpc
:FzfPreviewGitActions
:CocCommand fzf-preview.GitActions

" Select git status listed file. (Required [Fugitive](https://github.com/tpope/vim-fugitive) or [Gina](https://github.com/lambdalisue/gina.vim))
:FzfPreviewGitStatusRpc
:FzfPreviewGitStatus
:CocCommand fzf-preview.GitStatus

" Select references from nvim-lsp
:FzfPreviewNvimLspReferencesRpc
:FzfPreviewNvimLspReferences

" Select diagnostics from nvim-lsp
:FzfPreviewNvimLspDiagnosticsRpc
:FzfPreviewNvimLspDiagnostics

" Select current file diagnostics from nvim-lsp
:FzfPreviewNvimLspCurrentDiagnosticsRpc
:FzfPreviewNvimLspCurrentDiagnostics

" Select definitions from nvim-lsp
:FzfPreviewNvimLspDefinitionRpc
:FzfPreviewNvimLspDefinition

" Select type definitions from nvim-lsp
:FzfPreviewNvimLspTypeDefinitionRpc
:FzfPreviewNvimLspTypeDefinition

" Select implementations from nvim-lsp
:FzfPreviewNvimLspImplementationsRpc
:FzfPreviewNvimLspImplementations

" Select references from vim-lsp
:FzfPreviewVimLspReferencesRpc
:FzfPreviewVimLspReferences

" Select diagnostics from vim-lsp
:FzfPreviewVimLspDiagnosticsRpc
:FzfPreviewVimLspDiagnostics

" Select current file diagnostics from vim-lsp
:FzfPreviewVimLspCurrentDiagnosticsRpc
:FzfPreviewVimLspCurrentDiagnostics

" Select definitions from vim-lsp
:FzfPreviewVimLspDefinitionRpc
:FzfPreviewVimLspDefinition

" Select type definitions from vim-lsp
:FzfPreviewVimLspTypeDefinitionRpc
:FzfPreviewVimLspTypeDefinition

" Select implementations from vim-lsp
:FzfPreviewVimLspImplementationsRpc
:FzfPreviewVimLspImplementations

" Select tags from vista.vim (Required [vista.vim](https://github.com/liuchengxu/vista.vim))
:FzfPreviewVistaCtagsRpc
:FzfPreviewVistaCtags
:CocCommand fzf-preview.VistaCtags

" Select current buffer tags from vista.vim (Required [vista.vim](https://github.com/liuchengxu/vista.vim))
:FzfPreviewVistaBufferCtagsRpc
:FzfPreviewVistaBufferCtags
:CocCommand fzf-preview.VistaBufferCtags

" Select bookmarks (Required [vim-bookmarks](https://github.com/MattesGroeger/vim-bookmarks))
:FzfPreviewBookmarksRpc
:FzfPreviewBookmarks
:CocCommand fzf-preview.Bookmarks

" Select register history (Required [yankround.vim](https://github.com/LeafCage/yankround.vim))
:FzfPreviewYankroundRpc
:FzfPreviewYankround
:CocCommand fzf-preview.Yankround

" Select memolist (Required [glidenote/memolist.vim](https://github.com/glidenote/memolist.vim))
:FzfPreviewMemoListRpc
:FzfPreviewMemoList
:CocCommand fzf-preview.MemoList

" Grep memolist (Required [glidenote/memolist.vim](https://github.com/glidenote/memolist.vim))
:FzfPreviewMemoListGrepRpc
:FzfPreviewMemoListGrep
:CocCommand fzf-preview.MemoListGrep

" Search TodoComments (Required  [folke/todo-comments.nvim](https://github.com/folke/todo-comments.nvim))
:FzfPreviewTodoCommentsRpc
:FzfPreviewTodoComments
:CocCommand fzf-preview.TodoComments

" Open the PR corresponding to the selected line (Required [GitHub cli](https://github.com/cli/cli))
:FzfPreviewBlamePRRpc
:FzfPreviewBlamePR
:CocCommand fzf-preview.BlamePR

" Select references from coc.nvim (only coc extensions)
:CocCommand fzf-preview.CocReferences

" Select diagnostics from coc.nvim (only coc extensions)
:CocCommand fzf-preview.CocDiagnostics

" Select current file diagnostics from coc.nvim (only coc extensions)
:CocCommand fzf-preview.CocCurrentDiagnostics

" Select definitions from coc.nvim (only coc extensions)
:CocCommand fzf-preview.CocDefinition

" Select type definitions from coc.nvim (only coc extensions)
:CocCommand fzf-preview.CocTypeDefinition

" Select implementations from coc.nvim (only coc extensions)
:CocCommand fzf-preview.CocImplementations

" Select outline from coc.nvim (only coc extensions)
:CocCommand fzf-preview.CocOutline
```

### Recommended mappings

#### Vim script RPC

```vim
nmap <Leader>f [fzf-p]
xmap <Leader>f [fzf-p]

nnoremap <silent> [fzf-p]p     :<C-u>FzfPreviewFromResourcesRpc project_mru git<CR>
nnoremap <silent> [fzf-p]gs    :<C-u>FzfPreviewGitStatusRpc<CR>
nnoremap <silent> [fzf-p]ga    :<C-u>FzfPreviewGitActionsRpc<CR>
nnoremap <silent> [fzf-p]b     :<C-u>FzfPreviewBuffersRpc<CR>
nnoremap <silent> [fzf-p]B     :<C-u>FzfPreviewAllBuffersRpc<CR>
nnoremap <silent> [fzf-p]o     :<C-u>FzfPreviewFromResourcesRpc buffer project_mru<CR>
nnoremap <silent> [fzf-p]<C-o> :<C-u>FzfPreviewJumpsRpc<CR>
nnoremap <silent> [fzf-p]g;    :<C-u>FzfPreviewChangesRpc<CR>
nnoremap <silent> [fzf-p]/     :<C-u>FzfPreviewLinesRpc --add-fzf-arg=--no-sort --add-fzf-arg=--query="'"<CR>
nnoremap <silent> [fzf-p]*     :<C-u>FzfPreviewLinesRpc --add-fzf-arg=--no-sort --add-fzf-arg=--query="'<C-r>=expand('<cword>')<CR>"<CR>
nnoremap          [fzf-p]gr    :<C-u>FzfPreviewProjectGrepRpc<Space>
xnoremap          [fzf-p]gr    "sy:FzfPreviewProjectGrepRpc<Space>-F<Space>"<C-r>=substitute(substitute(@s, '\n', '', 'g'), '/', '\\/', 'g')<CR>"
nnoremap <silent> [fzf-p]t     :<C-u>FzfPreviewBufferTagsRpc<CR>
nnoremap <silent> [fzf-p]q     :<C-u>FzfPreviewQuickFixRpc<CR>
nnoremap <silent> [fzf-p]l     :<C-u>FzfPreviewLocationListRpc<CR>
```

#### Remote Plugin

```vim
nmap <Leader>f [fzf-p]
xmap <Leader>f [fzf-p]

nnoremap <silent> [fzf-p]p     :<C-u>FzfPreviewFromResources project_mru git<CR>
nnoremap <silent> [fzf-p]gs    :<C-u>FzfPreviewGitStatus<CR>
nnoremap <silent> [fzf-p]ga    :<C-u>FzfPreviewGitActions<CR>
nnoremap <silent> [fzf-p]b     :<C-u>FzfPreviewBuffers<CR>
nnoremap <silent> [fzf-p]B     :<C-u>FzfPreviewAllBuffers<CR>
nnoremap <silent> [fzf-p]o     :<C-u>FzfPreviewFromResources buffer project_mru<CR>
nnoremap <silent> [fzf-p]<C-o> :<C-u>FzfPreviewJumps<CR>
nnoremap <silent> [fzf-p]g;    :<C-u>FzfPreviewChanges<CR>
nnoremap <silent> [fzf-p]/     :<C-u>FzfPreviewLines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'"<CR>
nnoremap <silent> [fzf-p]*     :<C-u>FzfPreviewLines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'<C-r>=expand('<cword>')<CR>"<CR>
nnoremap          [fzf-p]gr    :<C-u>FzfPreviewProjectGrep<Space>
xnoremap          [fzf-p]gr    "sy:FzfPreviewProjectGrep<Space>-F<Space>"<C-r>=substitute(substitute(@s, '\n', '', 'g'), '/', '\\/', 'g')<CR>"
nnoremap <silent> [fzf-p]t     :<C-u>FzfPreviewBufferTags<CR>
nnoremap <silent> [fzf-p]q     :<C-u>FzfPreviewQuickFix<CR>
nnoremap <silent> [fzf-p]l     :<C-u>FzfPreviewLocationList<CR>
```

#### coc extensions

```vim
nmap <Leader>f [fzf-p]
xmap <Leader>f [fzf-p]

nnoremap <silent> [fzf-p]p     :<C-u>CocCommand fzf-preview.FromResources project_mru git<CR>
nnoremap <silent> [fzf-p]gs    :<C-u>CocCommand fzf-preview.GitStatus<CR>
nnoremap <silent> [fzf-p]ga    :<C-u>CocCommand fzf-preview.GitActions<CR>
nnoremap <silent> [fzf-p]b     :<C-u>CocCommand fzf-preview.Buffers<CR>
nnoremap <silent> [fzf-p]B     :<C-u>CocCommand fzf-preview.AllBuffers<CR>
nnoremap <silent> [fzf-p]o     :<C-u>CocCommand fzf-preview.FromResources buffer project_mru<CR>
nnoremap <silent> [fzf-p]<C-o> :<C-u>CocCommand fzf-preview.Jumps<CR>
nnoremap <silent> [fzf-p]g;    :<C-u>CocCommand fzf-preview.Changes<CR>
nnoremap <silent> [fzf-p]/     :<C-u>CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'"<CR>
nnoremap <silent> [fzf-p]*     :<C-u>CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'<C-r>=expand('<cword>')<CR>"<CR>
nnoremap          [fzf-p]gr    :<C-u>CocCommand fzf-preview.ProjectGrep<Space>
xnoremap          [fzf-p]gr    "sy:CocCommand   fzf-preview.ProjectGrep<Space>-F<Space>"<C-r>=substitute(substitute(@s, '\n', '', 'g'), '/', '\\/', 'g')<CR>"
nnoremap <silent> [fzf-p]t     :<C-u>CocCommand fzf-preview.BufferTags<CR>
nnoremap <silent> [fzf-p]q     :<C-u>CocCommand fzf-preview.QuickFix<CR>
nnoremap <silent> [fzf-p]l     :<C-u>CocCommand fzf-preview.LocationList<CR>
```

### Base Fzf window Keymaps

```text
<C-g>, <Esc>
  Cancel fzf

<C-x>
  Open split

<C-v>
  Open vsplit

<C-t>
  Open tabedit

<C-o>
  Jump to buffer if already open. See :drop.
  If g:fzf_preview_buffers_jump is set to 1 then it will open the buffer in
  current window instead.

<C-q>
  Build QuickFix in open-file processes.
  Execute :bdelete! command from open-buffer and open-bufnr processes.

<C-d>
  Preview page down

<C-u>
  Preview page up

?
  Toggle display of preview screen
```

## Customization

### Optional Configuration Tips

- Increase the size of file history:

```vim
" oldfiles uses viminfo, but the default setting is 100
" Change the number by setting it in viminfo with a single quote.
" Ref: viminfo-'
set viminfo='1000
```

- Set values for each variable. The default settings are as follows.

```vim
" floating window size ratio
let g:fzf_preview_floating_window_rate = 0.9

" fzf window position settings
let g:fzf_preview_direct_window_option = ''

" fzf command default options
let g:fzf_preview_default_fzf_options = { '--reverse': v:true, '--preview-window': 'wrap' }

" Add fzf quit mapping
let g:fzf_preview_quit_map = 1

" jump to the buffers by default, when possible
let g:fzf_preview_buffers_jump = 0

" Commands used for fzf preview.
" The file name selected by fzf becomes {}
let g:fzf_preview_command = 'cat'                               " Not installed bat
" let g:fzf_preview_command = 'bat --color=always --plain {-1}' " Installed bat

" g:fzf_binary_preview_command is executed if this command succeeds, and g:fzf_preview_command is executed if it fails
let g:fzf_preview_if_binary_command = '[[ "$(file --mime {})" =~ binary ]]'

" Commands used for binary file
let g:fzf_binary_preview_command = 'echo "{} is a binary file"'

" Commands used to get the file list from project
let g:fzf_preview_filelist_command = 'git ls-files --exclude-standard'               " Not Installed ripgrep
" let g:fzf_preview_filelist_command = 'rg --files --hidden --follow --no-messages -g \!"* *"' " Installed ripgrep

" Commands used to get the file list from git repository
let g:fzf_preview_git_files_command = 'git ls-files --exclude-standard'

" Commands used to get the file list from current directory
let g:fzf_preview_directory_files_command = 'rg --files --hidden --follow --no-messages -g \!"* *"'

" Commands used to get the git status file list
let g:fzf_preview_git_status_command = 'git -c color.status=always status --short --untracked-files=all'

" Commands used for git status preview.
let g:fzf_preview_git_status_preview_command =  "[[ $(git diff --cached -- {-1}) != \"\" ]] && git diff --cached --color=always -- {-1} || " .
\ "[[ $(git diff -- {-1}) != \"\" ]] && git diff --color=always -- {-1} || " .
\ g:fzf_preview_command

" Commands used for project grep
let g:fzf_preview_grep_cmd = 'rg --line-number --no-heading --color=never --hidden'

" MRU and MRW cache directory
let g:fzf_preview_cache_directory = expand('~/.cache/vim/fzf_preview')

" If this value is not 0, disable mru and mrw
let g:fzf_preview_disable_mru = 0

" Limit of the number of files to be saved by mru
let g:fzf_preview_mru_limit = 1000

" Commands used for current file lines
let g:fzf_preview_lines_command = 'cat -n'                                " Not Installed bat
" let g:fzf_preview_lines_command = 'bat --color=always --plain --number' " Installed bat

" Commands used for preview of the grep result
let g:fzf_preview_grep_preview_cmd = expand('<sfile>:h:h') . '/bin/preview_fzf_grep'

" Cache directory for mru and mrw
let g:fzf_preview_cache_directory = expand('~/.cache/vim/fzf_preview')

" Keyboard shortcuts while fzf preview is active
let g:fzf_preview_preview_key_bindings = ''
" let g:fzf_preview_preview_key_bindings = 'ctrl-d:preview-page-down,ctrl-u:preview-page-up,?:toggle-preview'

" Specify the color of fzf
let g:fzf_preview_fzf_color_option = ''

" Set the processes when selecting an element with fzf
let g:fzf_preview_custom_processes = {}
" For example, set split to ctrl-s
" let g:fzf_preview_custom_processes['open-file'] = fzf_preview#remote#process#get_default_processes('open-file')
" on coc extensions
" let g:fzf_preview_custom_processes['open-file'] = fzf_preview#remote#process#get_default_processes('open-file', 'coc')
" let g:fzf_preview_custom_processes['open-file']['ctrl-s'] = g:fzf_preview_custom_processes['open-file']['ctrl-x']
" call remove(g:fzf_preview_custom_processes['open-file'], 'ctrl-x')

" Use as fzf preview-window option
let g:fzf_preview_fzf_preview_window_option = ''
" let g:fzf_preview_fzf_preview_window_option = 'up:30%'

" Use vim-devicons
let g:fzf_preview_use_dev_icons = 0

" Use fzf history option
let g:fzf_preview_history_dir = false
" let g:fzf_preview_history_dir = '~/.fzf'

" devicons character width
let g:fzf_preview_dev_icon_prefix_string_length = 3

" Devicons can make fzf-preview slow when the number of results is high
" By default icons are disable when number of results is higher that 5000
let g:fzf_preview_dev_icons_limit = 5000

" The theme used in the bat preview
$FZF_PREVIEW_PREVIEW_BAT_THEME = 'OneHalfDark'
```

### Command Options

Commented-out lines are settings for the coc extension.

```vim
--processes
" Set process when selecting element with fzf started by this command.
" Value must be a global variable name.
" Variable is dictionary and format is same as g:fzf_preview_custom_processes['open-file'].
"
" Most commands are passed a file path to the process function.
" FzfPreviewAllBuffers will be passed “buffer {bufnr}”
"
" Value example: let g:foo_processes = {
"                \ '':       'FzfPreviewOpenFileEnter',
"                \ 'ctrl-x': get(function('s:foo_function'), 'name'),
"                \ }
"

--add-fzf-arg
" Set the arguments to be passed when executing fzf.
" This value is added to the default options.
" Value must be a string without spaces.

" Example: Exclude filename with FzfPreviewProjectGrep
nnoremap <Leader>g :<C-u>FzfPreviewProjectGrep --add-fzf-arg=--nth=3<Space>
" nnoremap <Leader>g :<C-u>CocCommand fzf-preview.ProjectGrep --add-fzf-arg=--nth=3<Space>


--resume
" Reuse the input that was last used to select the element with fzf.
" Do not need to pass a value for this option.

" Example: Reuse last query for project grep.
nnoremap <Leader>G :<C-u>FzfPreviewProjectGrep . --resume<Space>
" nnoremap <Leader>G :<C-u>CocCommand fzf-preview.ProjectGrep . --resume<Space>
```

### Function

```vim
" Get the initial value of the open file processes
" processes_name is 'open-file', 'open-buffer' and 'open-bufnr'.
" plugin_type is 'remote', 'coc' or 'rpc'. Default value is 'remote'
call fzf_preview#remote#process#get_default_processes({processes_name}, {plugin_type})
```

## Release note

<details>
<summary>Changes history</summary>

- 2023/01/02 version 2.16.0
  - Implement nvim-lsp resources.

- 2021/12/05 version 2.12.0
  - Implement vim-lsp resources.

- 2022/08/23 version 2.13.0
  - Implement coc TypeScript go to source definition resource.

- 2021/12/05 version 2.12.0
  - Implement vim-lsp resources.

- 2021/10/15 version 2.9.0
  - Implement coc outline resource.

- 2021/09/10 version 2.7.0
  - Implement vim help resource.

- 2021/09/08 version 2.6.0
  - Improve project files performance

- 2021/06/06 version 2.5.0
  - Implement --experimental-fast option.

- 2021/06/04 version 2.4.0
  - Implement [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) resource.

- 2021/05/19 version 2.3.0
  - Implement fzf history option.

- 2021/05/18 version 2.2.0
  - Implement grep recall.

- 2021/01/16 version 2.0.7
  - Implement coc implementations resource.

- 2021/01/16 version 2.0.6
  - Implement [memolist.vim](https://github.com/glidenote/memolist.vim) resource.

- 2021/01/10 version 2.0.0
  - Release of stable version.
  - Change release from github actions.
  - Update latest npm packages.

- 2021/01/06 version 0.6.0
  - Update coc.nvim package version to 0.0.80.

- 2020/12/31 version 0.5.0
  - Implement Vim script RPC
    - Only need Vim and Node
  - **Breaking change**: The release branch of the Remote Plugin has been changed to release/remote.

- 2020/11/08 version 0.4.27
  - Add g:fzf_preview_direct_window_option option.

- 2020/11/07 version 0.4.26
  - Change buffer sort with mru order.
  - Add mru and mrw limit settings.
  - Improve grep preview highlight.

- 2020/10/30 version 0.4.24
  - Improved grep etc previews to scroll to the top of the file.

- 2020/10/4 version 0.4.20
  - Implement CommandPalette resource.

- 2020/10/4 version 0.4.17
  - Implement CocTypeDefinitions resource.

- 2020/07/30 version 0.4.7
  - Implement git reflog integration.

- 2020/07/30 version 0.4.6
  - Implement git stash integration.
  - Implement rename git branch.

- 2020/07/27 version 0.4.1
  - Implement create git branch.

- 2020/07/27 version 0.4.0
  - Implement interactive git integration. (`:FzfPreviewGitActions` and `:CocCommand fzf-preview.GitActions`)

- 2020/07/24 version 0.3.2
  - Remove g:fzf_preview_filelist_postprocess_command and to colorize the fzf window by default

- 2020/07/24 version 0.2.1
  - Change g:fzf_preview_default_fzf_options and g:fzf_preview_fzf_preview_window_option default value.
  - Fix export quickfix bug in grep.

- 2020/07/23 version 0.2.0
  - Improving the internal data structure.
  - Remove `FzfPreviewProjectCommandGrep` command. (Changes to the data structure have made implementation difficult)
  - Some bug fixes.

</details>

## Others

- How to use fish user?
  - Set the `set shell` and `$SHELL`.

```vim
set shell=/bin/zsh
let $SHELL = "/bin/zsh"
```

- Use true color preview in Neovim
  - Set the preview command to `COLORTERM=truecolor`

```vim
augroup fzf_preview
  autocmd!
  autocmd User fzf_preview#rpc#initialized call s:fzf_preview_settings() " fzf_preview#remote#initialized or fzf_preview#coc#initialized
augroup END

function! s:fzf_preview_settings() abort
  let g:fzf_preview_command = 'COLORTERM=truecolor ' . g:fzf_preview_command
  let g:fzf_preview_grep_preview_cmd = 'COLORTERM=truecolor ' . g:fzf_preview_grep_preview_cmd
endfunction
```

- `FzfPreviewVistaBufferCtags` does not work
  - Vista must be initialized. Run the Vista command once or write the following settings.

```vim
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()
```

## License

The MIT License (MIT)


================================================
FILE: autoload/fzf_preview/remote/consumer/git.vim
================================================
" using pseudo synchronous call in Vim8 because Vim8 asynchronous call is unstable
function! s:execute(command) abort
  if !has('nvim')
    call feedkeys(':' . a:command . "\n", 'n')
  else
    execute a:command
  endif
endfunction

function! fzf_preview#remote#consumer#git#add(file) abort
  call system('git add ' . shellescape(a:file))
  if v:shell_error
    echomsg 'Failed: git add ' . a:file
  endif
endfunction

function! fzf_preview#remote#consumer#git#add_intent_to_add(file) abort
  call system('git add --intent-to-add ' . shellescape(a:file))
  if v:shell_error
    echomsg 'Failed: git add --intent-to-add ' . a:file
  endif
endfunction

function! fzf_preview#remote#consumer#git#reset(file, option) abort
  if a:option !=# ''
    let command = 'git reset ' . a:option . ' ' . shellescape(a:file)
  else
    let command = 'git reset ' . shellescape(a:file)
  endif

  call system(command)

  if v:shell_error
    echomsg 'Failed: ' . command
  endif
endfunction

function! fzf_preview#remote#consumer#git#reset_intent_to_add(file) abort
  call system('git reset --intent-to-add ' . shellescape(a:file))
  if v:shell_error
    echomsg 'Failed: git reset --intent-to-add ' . a:file
  endif
endfunction

function! fzf_preview#remote#consumer#git#patch(file) abort
  if exists(':Gin') == 2
    tabedit
    call s:execute('GinPatch ' . fnamemodify(a:file, ':p'))
    return
  elseif exists(':Gina') == 2
    call s:execute('Gina patch ' . fnamemodify(a:file, ':p'))
    return
  elseif exists(':Git') != 0
    execute 'tabedit ' . a:file . ' | Git diff'
    return
  endif

  echoerr 'Gin, Gina and Fugitive not installed'
endfunction

function! fzf_preview#remote#consumer#git#chaperon(file) abort
  if exists(':Gin') == 2
    tabedit
    call s:execute('GinChaperon ' . fnamemodify(a:file, ':p'))
    return
  elseif exists(':Gina') == 2
    call s:execute('Gina chaperon ' . fnamemodify(a:file, ':p'))
    return
  endif

  echoerr 'Gin and Gina not installed'
endfunction

function! fzf_preview#remote#consumer#git#commit(option) abort
  if match(a:option, '--fixup') != -1
    echomsg system('git commit ' . a:option)
    return
  elseif exists(':Gin') == 2
    call s:execute('Gin commit --verbose ' . a:option)
    return
  elseif exists(':Gina') == 2
    call s:execute('Gina commit --verbose ' . a:option)
    return
  elseif exists(':Git') == 2
    execute 'Git commit --verbose ' . a:option
    return
  endif

  echoerr 'Gin, Gina and Fugitive not installed'
endfunction

function! fzf_preview#remote#consumer#git#restore(file) abort
  if exists(':Gin') == 2
    call s:execute('Gin checkout -- ' . fnamemodify(a:file, ':p'))
    return
  elseif exists(':Gina') == 2
    call s:execute('Gina checkout -- ' . fnamemodify(a:file, ':p'))
    return
  elseif exists(':Git') == 2
    execute 'Git checkout -- ' . a:file
    return
  else
    call system('git checkout -- ' . shellescape(a:file))
    if v:shell_error
      echomsg 'Failed: git checkout -- ' . a:file
    endif
  endif
endfunction

function! fzf_preview#remote#consumer#git#switch(branch) abort
  if exists(':Gin') == 2
    call s:execute('Gin checkout ' . a:branch)
    return
  elseif exists(':Gina') == 2
    call s:execute('Gina checkout ' . a:branch)
    return
  elseif exists(':Git') == 2
    execute 'Git checkout ' . a:branch
    return
  else
    call system('git checkout ' . shellescape(a:branch))
    if v:shell_error
      echomsg 'Failed: git checkout ' . a:branch
    endif
  endif
endfunction

function! fzf_preview#remote#consumer#git#create_branch() abort
  let branch_name = input('Branch name: ')
  if branch_name !=# ''
    echomsg system('git checkout -b ' . shellescape(branch_name))
  endif
endfunction

function! fzf_preview#remote#consumer#git#diff(branch, ...) abort
  let branch2 = get(a:, 1, '')

  if exists(':Gin') == 2
    execute 'silent GinDiff ' . a:branch . '..' . branch2
    echomsg 'git diff ' . a:branch . '..' . branch2
    return
  elseif exists(':Gina') == 2
    execute 'silent Gina diff ' . a:branch . '..' . branch2
    echomsg 'git diff ' . a:branch . '..' . branch2
    return
  elseif exists(':Git') == 2
    execute 'silent Git diff ' . a:branch . '..' . branch2
    echomsg 'git diff ' . a:branch . '..' . branch2
    return
  endif

  echoerr 'Gin, Gina and Fugitive not installed'
endfunction

function! fzf_preview#remote#consumer#git#show(name_or_hash) abort
  " TODO: Until GinShow is implemented in gin, gina is the priority
  if exists(':Gina') == 2
    call s:execute('Gina show ' . a:name_or_hash)
    return
  elseif exists(':Gin') == 2
    call s:execute('GinBuffer show ' . a:name_or_hash)
    return
  elseif exists(':Git') == 2
    execute 'Git show ' . a:name_or_hash
    return
  endif

  echoerr 'Gin, Gina and Fugitive not installed'
endfunction

function! fzf_preview#remote#consumer#git#merge(branch, option) abort
  if exists(':Gin') == 2
    call s:execute('Gin merge ' . a:option . ' ' . a:branch)
    return
  elseif exists(':Gina') == 2
    call s:execute('Gina merge ' . a:option . ' ' . a:branch)
    return
  elseif exists(':Git') == 2
    execute 'Git merge ' . a:option . ' ' . a:branch
    return
  endif

  echoerr 'Gin, Gina and Fugitive not installed'
endfunction

function! fzf_preview#remote#consumer#git#rebase(branch) abort
  if exists(':Gin') == 2
    call s:execute('Gin rebase ' . a:branch)
    return
  elseif exists(':Gina') == 2
    call s:execute('Gina rebase ' . a:branch)
    return
  elseif exists(':Git') == 2
    execute 'Git rebase ' . a:branch
    return
  endif

  echoerr 'Fugitive and Gina not installed'
endfunction

function! fzf_preview#remote#consumer#git#rebase_interactive(branch_or_hash) abort
  if exists(':Gin') == 2
    execute 'Gin rebase --interactive ' . a:branch_or_hash
    return
  elseif exists(':Git') == 2
    execute 'Git rebase --interactive ' . a:branch_or_hash
    return
  endif

  echoerr 'Gin and Fugitive not installed'
endfunction

function! fzf_preview#remote#consumer#git#push(option) abort
  echomsg system('git push ' . a:option)
  if v:shell_error
    echomsg 'Failed: git push ' . a:option
  endif
endfunction

function! fzf_preview#remote#consumer#git#fetch() abort
  echomsg system('git fetch')
  if v:shell_error
    echomsg 'Failed: git fetch'
  endif
endfunction

function! fzf_preview#remote#consumer#git#delete_branch(branch, option) abort
  echomsg system('git branch --delete ' . a:option . ' ' . shellescape(a:branch))
  if v:shell_error
    echomsg 'Failed: git branch --delete ' . a:option . ' ' . a:branch
  endif
endfunction

function! fzf_preview#remote#consumer#git#rename_branch(src) abort
  let dest = input('Branch name: ')
  if dest !=# ''
    let command = 'git branch -m ' . shellescape(a:src) . ' ' . dest
    echo system(command)

    if v:shell_error
      echomsg 'Failed: ' . command
    endif
  endif
endfunction

function! fzf_preview#remote#consumer#git#stash_apply(stash) abort
  let command = 'git stash apply ' . shellescape(a:stash)
  echo system(command)

  if v:shell_error
    echomsg 'Failed: ' . command
  endif
endfunction

function! fzf_preview#remote#consumer#git#stash_pop(stash) abort
  let command = 'git stash pop ' . shellescape(a:stash)
  echo system(command)

  if v:shell_error
    echomsg 'Failed: ' . command
  endif
endfunction

function! fzf_preview#remote#consumer#git#stash_drop(stash) abort
  let command = 'git stash drop ' . shellescape(a:stash)
  echo system(command)

  if v:shell_error
    echomsg 'Failed: ' . command
  endif
endfunction

function! fzf_preview#remote#consumer#git#stash_create() abort
  let message = input('Message: ')
  if  message !=# ''
    let command = 'git stash save "' . message . '"'
  else
    let command = 'git stash save'
  endif

  echo system(command)

  if v:shell_error
    echomsg 'Failed: ' . command
  endif
endfunction

function! fzf_preview#remote#consumer#git#pull() abort
  echomsg system('git pull')
  if v:shell_error
    echomsg 'Failed: git pull'
  endif
endfunction

function! fzf_preview#remote#consumer#git#yank(branch) abort
  let hash = system('git rev-parse ' . shellescape(a:branch))
  call fzf_preview#remote#consumer#register#set(hash, 'v')
  echomsg 'yanked ' a:branch . ' branch hash: ' . hash
endfunction


================================================
FILE: autoload/fzf_preview/remote/consumer/register.vim
================================================
function! fzf_preview#remote#consumer#register#set(str, options) abort
  call setreg('"', a:str, a:options)
endfunction

function! fzf_preview#remote#consumer#register#paste(str, options) abort
  call setreg('"', a:str, a:options)
  normal! ""p
endfunction


================================================
FILE: autoload/fzf_preview/remote/exec_fzf.vim
================================================
function! fzf_preview#remote#exec_fzf#exec(command, env, ...) abort
  let session_token = get(a:, 1, '')

  if a:env ==# 'remote'
    if session_token !=# ''
      execute a:command . ' --session=' . session_token
    else
      execute a:command
    endif
  elseif a:env ==# 'coc'
    let command_name = substitute(a:command, '^FzfPreview', 'fzf-preview.', '')
    if session_token !=# ''
      execute 'CocCommand ' . command_name . ' --session=' . session_token
    else
      execute 'CocCommand ' . command_name
    endif
  elseif a:env ==# 'rpc'
    if session_token !=# ''
      execute a:command . 'Rpc --session=' . session_token
    else
      execute a:command . 'Rpc'
    endif
  endif
endfunction


================================================
FILE: autoload/fzf_preview/remote/handler_to_process.vim
================================================
function! fzf_preview#remote#handler_to_process#call_funcref_or_fallback_default_process(env, default_process_function_name, expect_key, lines, process_name) abort
  if a:env ==# 'remote'
    call s:call_remote_plugin(a:default_process_function_name, a:expect_key, a:lines, a:process_name)
  elseif a:env ==# 'coc'
    call s:call_coc(a:default_process_function_name, a:expect_key, a:lines, a:process_name)
  elseif a:env ==# 'rpc'
    call s:call_rpc(a:default_process_function_name, a:expect_key, a:lines, a:process_name)
  endif
endfunction

function! s:call_remote_plugin(default_process_function_name, expect_key, lines, process_name) abort
  if (a:process_name == v:null)
    call call(a:default_process_function_name, [a:lines])
  else
    let processes = eval('g:' . a:process_name)
    let Process = processes[a:expect_key]

    if type(Process) == v:t_string
      if exists('*' . Process)
        call call(Process, [a:lines])
      else
        call fzf_preview#rpc#exec_process_callback(Process, a:lines)
      endif
    elseif type(Process) == v:t_func
      call Process(a:lines)
    endif
  endif
endfunction

function! s:call_coc(default_process_function_name, expect_key, lines, process_name) abort
  if (a:process_name == v:null)
    let process_name = substitute(a:default_process_function_name, '^FzfPreview', '', '')
    call CocAction('runCommand', 'fzf-preview-callback.' . process_name, [a:lines])
  else
    let processes = eval('g:' . a:process_name)
    let Process = processes[a:expect_key]

    if type(Process) == v:t_string
      let Process = substitute(Process, '^FzfPreview', '', '')
      if exists('*' . Process)
        call call(Process, [a:lines])
      else
        call CocAction('runCommand', 'fzf-preview-callback.' . Process, [a:lines])
      endif
    elseif type(Process) == v:t_func
      call Process(a:lines)
    endif
  endif
endfunction

function! s:call_rpc(default_process_function_name, expect_key, lines, process_name) abort
  if (a:process_name == v:null)
    call fzf_preview#rpc#exec_process_callback(a:default_process_function_name, a:lines)
  else
    let processes = eval('g:' . a:process_name)
    let Process = processes[a:expect_key]

    if type(Process) == v:t_string
      if exists('*' . Process)
        call call(Process, [a:lines])
      else
        call fzf_preview#rpc#exec_process_callback(Process, a:lines)
      endif
    elseif type(Process) == v:t_func
      call Process(a:lines)
    endif
  endif
endfunction


================================================
FILE: autoload/fzf_preview/remote/mr.vim
================================================
function! fzf_preview#remote#mr#append(path, cache_path) abort
  let files = s:get_files_with_create_directory(a:cache_path)

  call insert(files, a:path)
  call writefile(fzf_preview#remote#util#uniq(files)[:g:fzf_preview_mru_limit - 1], a:cache_path)
endfunction

function! fzf_preview#remote#mr#mru_file_path() abort
  return g:fzf_preview_cache_directory . '/mru'
endfunction

function! fzf_preview#remote#mr#mrw_file_path() abort
  return g:fzf_preview_cache_directory . '/mrw'
endfunction

function! s:get_files_with_create_directory(cache_path) abort
  if !isdirectory(g:fzf_preview_cache_directory)
    call mkdir(g:fzf_preview_cache_directory, 'p')
  endif

  try
    let files = readfile(a:cache_path)
  catch
    let files = []
  endtry

  return files
endfunction


================================================
FILE: autoload/fzf_preview/remote/process.vim
================================================
function! fzf_preview#remote#process#get_default_processes(name, ...) abort
  let env = get(a:, 1, 'remote')

  if env ==# 'remote'
    return FzfPreviewGetDefaultProcesses(a:name)
  elseif env ==# 'coc'
    return CocAction('runCommand', 'fzf-preview.GetDefaultProcesses', [a:name])
  elseif env ==# 'rpc'
    return fzf_preview#rpc#get_default_processes(a:name)
  endif
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/all_buffers.vim
================================================
function! fzf_preview#remote#resource#all_buffers#get() abort
  let buffers = []
  for bufinfo in copy(getbufinfo())
    let buffer = {
    \ 'name': fnamemodify(bufinfo['name'], ':.'),
    \ 'bufnr': bufinfo['bufnr'],
    \ }
    call add(buffers, buffer)
  endfor

  let buffers = map(copy(getbufinfo({ 'buflisted': 1 })),
  \ { _, buffer -> {
  \     'fileName': fnamemodify(buffer['name'], ':.'),
  \     'bufnr': buffer['bufnr'],
  \     'isCurrent': v:false,
  \     'isAlternate': v:false,
  \     'isModified': v:false,
  \   }
  \ }
  \ )

  return buffers
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/bookmarks.vim
================================================
function! fzf_preview#remote#resource#bookmarks#get() abort
  return filter(map(bm#location_list(), {
 \ _, b -> s:bookmarks_format_line(b)
 \ }), {
 \ _, b -> b.file !=# ''
 \ })
endfunction

function! s:bookmarks_format_line(line) abort
  let line = split(a:line, ':')
  let filename = fnamemodify(line[0], ':.')
  if !filereadable(filename)
    return { 'file': '' }
  endif

  let line_number = line[1]
  let text = line[2]

  if text ==# 'Annotation'
    let comment = line[3]
  else
    let text = join(line[2:], ':')
  endif

  if text !=# 'Annotation'
    return { 'file': filename, 'line': line_number, 'text': text, 'comment': '' }
  else
    return { 'file': filename, 'line': line_number, 'text': text, 'comment': comment }
  endif
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/buffers.vim
================================================
function! fzf_preview#remote#resource#buffers#get_other_buffers() abort
  let list = filter(range(1, bufnr('$')),
  \ { _, bufnr -> bufexists(bufnr) && buflisted(bufnr) && filereadable(expand('#' . bufnr . ':p')) && bufnr != bufnr('%') && bufnr != bufnr('#')}
  \ )

  return map(list, { _, bufnr -> s:bufnr_to_bufinfo(bufnr) })
endfunction

function! fzf_preview#remote#resource#buffers#get_current_buffer() abort
  return s:bufnr_to_bufinfo(bufnr('%'))
endfunction

function! fzf_preview#remote#resource#buffers#get_alternate_buffer() abort
  return s:bufnr_to_bufinfo(bufnr('#'))
endfunction

function! fzf_preview#remote#resource#buffers#get() abort
  let list = filter(range(1, bufnr('$')),
  \ { _, bufnr -> bufexists(bufnr) && buflisted(bufnr) && filereadable(expand('#' . bufnr . ':p'))}
  \ )

  return map(list, { _, bufnr -> s:bufnr_to_bufinfo(bufnr) })
endfunction

function! s:bufnr_to_bufinfo(bufnr) abort
  let name = bufname(a:bufnr)
  let is_current = a:bufnr == bufnr('%')
  let is_alternate = a:bufnr == bufnr('#')
  let is_modified = getbufvar(a:bufnr, '&modified')

  return {
  \ 'fileName': name,
  \ 'bufnr': a:bufnr,
  \ 'isCurrent': is_current == 1 ? v:true : v:false,
  \ 'isAlternate': is_alternate == 1 ? v:true : v:false,
  \ 'isModified': is_modified == 1 ? v:true : v:false,
  \ }
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/changes.vim
================================================
function! fzf_preview#remote#resource#changes#get() abort
  if !filereadable(expand('%'))
    return []
  endif

  let list = []
  let lnums = map(copy(getchangelist('%')[0]), { _, change -> change['lnum'] })
  for lnum in lnums
    let lines = getbufline(bufnr('%'), lnum)
    if len(lines) > 0
      call add(list, lnum . ' ' . lines[0])
    endif
  endfor

  call reverse(list)
  let list = fzf_preview#remote#util#uniq(list)

  return list
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/directory_files.vim
================================================
function! fzf_preview#remote#resource#directory_files#get(command) abort
  return systemlist(a:command)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/git_files.vim
================================================
function! fzf_preview#remote#resource#git_files#get(command) abort
  return systemlist(a:command)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/git_status.vim
================================================
function! fzf_preview#remote#resource#git_status#get(command) abort
  return systemlist(a:command)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/grep.vim
================================================
function! fzf_preview#remote#resource#grep#get(command) abort
  return systemlist(a:command)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/jumps.vim
================================================
function! fzf_preview#remote#resource#jumps#get() abort
  let splitted_project_path = split(fzf_preview#remote#util#project_root(), '/')
  let bufnr_and_lnum_list = map(copy(getjumplist()[0]), {
  \ _, jump -> { 'bufnr': jump['bufnr'], 'lnum': jump['lnum'] }
  \ })

  let result = fzf_preview#remote#util#bufnr_and_lnum_to_resource(bufnr_and_lnum_list, splitted_project_path)

  call reverse(result)
  return result
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/lines.vim
================================================
function! fzf_preview#remote#resource#lines#get(command) abort
  return systemlist(a:command)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/marks.vim
================================================
function! fzf_preview#remote#resource#marks#get() abort
  let splitted_project_path = split(fzf_preview#remote#util#project_root(), '/')

  let chars = [
  \ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
  \ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
  \ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  \ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
  \ ]

  let bufnr_and_lnum_list = map(map(copy(chars), {
  \ _, char -> getpos("'" . char)
  \ }), {
  \ _, pos -> { 'bufnr': pos[0] == 0 ? bufnr('%') : pos[0], 'lnum': pos[1] }
  \ })
  call filter(bufnr_and_lnum_list, { _, bufnr_and_lnum -> bufnr_and_lnum['lnum'] != 0 })

  let result = fzf_preview#remote#util#bufnr_and_lnum_to_resource(bufnr_and_lnum_list, splitted_project_path)
  return result
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/memolist.vim
================================================
function! fzf_preview#remote#resource#memolist#files() abort
  return memolist#files()
endfunction

function! fzf_preview#remote#resource#memolist#grep(command) abort
  return systemlist(a:command. ' ' . g:memolist_path)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/project_files.vim
================================================
function! fzf_preview#remote#resource#project_files#get(command) abort
  return systemlist(a:command)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/quickfix_and_locationlist.vim
================================================
function! fzf_preview#remote#resource#quickfix_and_locationlist#get(type) abort
  let lines = s:get_quickfix_or_locationlist_lines(a:type)

  if !empty(filter(lines, { _, line -> line !=# '' }))
    return lines
  else
    return []
  endif
endfunction

function! s:get_quickfix_or_locationlist_lines(type) abort
  let qf_or_loc_lists = s:get_quickfix_or_loclist(a:type)

  if len(qf_or_loc_lists) != 0
    return len(qf_or_loc_lists) > 0 ? getbufline(qf_or_loc_lists[0]['bufnr'], 1, '$') : []
  endif

  return s:open_process_with_qf_and_close(a:type, { type -> s:get_quickfix_or_locationlist_lines(type) })
endfunction

function! s:get_quickfix_or_loclist(type) abort
  return filter(getwininfo(), { _, w -> w['tabnr'] == tabpagenr() && getwinvar(w['winnr'], '&filetype') ==# 'qf' && w[a:type]})
endfunction

function! s:open_process_with_qf_and_close(type, F) abort
  let winid = win_getid()

  if a:type ==# 'quickfix'
    copen
  elseif a:type ==# 'loclist'
    try
      lopen
    catch
      return []
    endtry
  else
    return []
  endif

  call win_gotoid(winid)

  let result = a:F(a:type)

  if a:type ==# 'quickfix'
    cclose
  elseif a:type ==# 'loclist'
    lclose
  endif

  return result
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/tags.vim
================================================
function! fzf_preview#remote#resource#tags#ctags() abort
  return s:read_tag_file()
endfunction

function! s:read_tag_file() abort
  let lines = []
  let files = filter(s:get_tag_files(), { _, file -> filereadable(file) })
  for file in files
    let lines = lines + filter(readfile(file), { _, line -> match(line, '^!') == -1 })
  endfor

  call map(lines, { _, line -> s:parse_tagline(line) })
  return lines
endfunction

function! s:get_tag_files() abort
  return split(&tags, ',')
endfunction

function! s:parse_tagline(line) abort
  let elem = split(a:line, '\t')
  let file_path = fnamemodify(elem[1], ':.')

  let match = matchlist(elem[2], '^\(\d\+\);"')

  try
    let info = {
    \ 'name': elem[0],
    \ 'file': file_path,
    \ 'line': match[1],
    \ 'type': elem[3],
    \ }
  catch
    throw 'Set excmd=number or excmd=combine in universal-ctags options'
  endtry

  return info
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/todo_comments.vim
================================================
function! fzf_preview#remote#resource#todo_comments#get() abort
  lua vim.g.fzf_preview_todo_keywords = vim.fn.keys((require('todo-comments.config').keywords))
  return g:fzf_preview_todo_keywords
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/util.vim
================================================
function! fzf_preview#remote#resource#util#exec_command(command) abort
  return systemlist(a:command)
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/vim_command.vim
================================================
function! fzf_preview#remote#resource#vim_command#commands() abort
  return map(getcompletion('', 'command'), {_, command -> {
  \   'name': command,
  \   'number': v:null,
  \ }})
endfunction

function! fzf_preview#remote#resource#vim_command#history() abort
  let commands = filter(map(range(1, max([0, histnr(':')])), {_, index -> histget(':', index)}), {_, command -> command !=# ''})
  return map(reverse(commands), {index, command -> {
  \   'name': command,
  \   'number': index + 1,
  \ }})
endfunction

function! fzf_preview#remote#resource#vim_command#exec(command) abort
  echo a:command
  execute a:command
endfunction

function! fzf_preview#remote#resource#vim_command#edit(command) abort
  call histadd(':', a:command)
  redraw
  call feedkeys(":\<Up>", 'n')
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/vim_lsp.vim
================================================
let s:references = {}
let s:definition = {}
let s:type_definition = {}
let s:implementation = {}

function! fzf_preview#remote#resource#vim_lsp#servers(method) abort
  return filter(lsp#get_allowed_servers(), 'lsp#capabilities#has_' . a:method . '_provider(v:val)')
endfunction

function! fzf_preview#remote#resource#vim_lsp#request_references(servers) abort
  let s:references = {}

  let command_id = lsp#_new_command()
  let ctx = {
  \ 'counter': len(a:servers),
  \ 'list':[],
  \ 'last_command_id': command_id,
  \ 'mods': '',
  \ 'in_preview': 0,
  \ 'jump_if_one': 0,
  \ }

  let params = {
  \ 'textDocument': lsp#get_text_document_identifier(),
  \ 'position': lsp#get_position(),
  \ 'context': {'includeDeclaration': v:false},
  \ }

  for server in a:servers
    call lsp#send_request(server, {
    \ 'method': 'textDocument/references',
    \ 'params': params,
    \ 'on_notification': function('s:handle_references', [ctx, server, 'references']),
    \ })
  endfor
endfunction

function! fzf_preview#remote#resource#vim_lsp#request_definition(servers) abort
  let s:definition = {}

  let command_id = lsp#_new_command()
  let ctx = {
  \ 'counter': len(a:servers),
  \ 'list':[],
  \ 'last_command_id': command_id,
  \ 'mods': '',
  \ 'in_preview': 0,
  \ 'jump_if_one': 0,
  \ }

  let params = {
  \ 'textDocument': lsp#get_text_document_identifier(),
  \ 'position': lsp#get_position(),
  \ }

  for server in a:servers
    call lsp#send_request(server, {
    \ 'method': 'textDocument/definition',
    \ 'params': params,
    \ 'on_notification': function('s:handle_definition', [ctx, server, 'definition']),
    \ })
  endfor
endfunction

function! fzf_preview#remote#resource#vim_lsp#request_type_definition(servers) abort
  let s:type_definition = {}

  let command_id = lsp#_new_command()
  let ctx = {
  \ 'counter': len(a:servers),
  \ 'list':[],
  \ 'last_command_id': command_id,
  \ 'mods': '',
  \ 'in_preview': 0,
  \ 'jump_if_one': 0,
  \ }

  let params = {
  \ 'textDocument': lsp#get_text_document_identifier(),
  \ 'position': lsp#get_position(),
  \ }

  for server in a:servers
    call lsp#send_request(server, {
    \ 'method': 'textDocument/typeDefinition',
    \ 'params': params,
    \ 'on_notification': function('s:handle_type_definition', [ctx, server, 'typeDefinition']),
    \ })
  endfor
endfunction

function! fzf_preview#remote#resource#vim_lsp#request_implementation(servers) abort
  let s:implementation = {}

  let command_id = lsp#_new_command()
  let ctx = {
  \ 'counter': len(a:servers),
  \ 'list':[],
  \ 'last_command_id': command_id,
  \ 'mods': '',
  \ 'in_preview': 0,
  \ 'jump_if_one': 0,
  \ }

  let params = {
  \ 'textDocument': lsp#get_text_document_identifier(),
  \ 'position': lsp#get_position(),
  \ }

  for server in a:servers
    call lsp#send_request(server, {
    \ 'method': 'textDocument/implementation',
    \ 'params': params,
    \ 'on_notification': function('s:handle_implementation', [ctx, server, 'implementation']),
    \ })
  endfor
endfunction

function! fzf_preview#remote#resource#vim_lsp#fetch_references() abort
  return s:references
endfunction

function! fzf_preview#remote#resource#vim_lsp#fetch_definition() abort
  return s:definition
endfunction

function! fzf_preview#remote#resource#vim_lsp#fetch_type_definition() abort
  return s:type_definition
endfunction

function! fzf_preview#remote#resource#vim_lsp#fetch_implementation() abort
  return s:implementation
endfunction

function! s:handle_references(ctx, server, type, data) abort
  let s:references[a:data['server_name']] = a:data['response']['result']
endfunction

function! s:handle_definition(ctx, server, type, data) abort
  let s:definition[a:data['server_name']] = a:data['response']['result']
endfunction

function! s:handle_type_definition(ctx, server, type, data) abort
  let s:type_definition[a:data['server_name']] = a:data['response']['result']
endfunction

function! s:handle_implementation(ctx, server, type, data) abort
  let s:implementation[a:data['server_name']] = a:data['response']['result']
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/vista.vim
================================================
function! fzf_preview#remote#resource#vista#ctags() abort
  let result = vista#executive#ctags#ProjectRun()
  let keys = keys(result)
  let source = []

  let index = 0
  while index < len(keys)
    let kind = keys[index]
    let values = result[kind]

    for value in values
      call add(source, { 'lineNumber': value['lnum'], 'kind': kind, 'text': value['text'], 'tagFile': value['tagfile'] })
    endfor

    let index = index + 1
  endwhile

  return source
endfunction

function! fzf_preview#remote#resource#vista#buffer_ctags() abort
  let result = vista#executive#ctags#Run(expand('%:p'))
  let keys = keys(result)
  let source = []

  let index = 0
  while index < len(keys)
    let kind = keys[index]
    let values = result[kind]

    for value in values
      call add(source, { 'lineNumber': value['lnum'], 'kind': kind, 'text': value['text'], 'line': getline(value['lnum']) })
    endfor

    let index = index + 1
  endwhile

  return source
endfunction


================================================
FILE: autoload/fzf_preview/remote/resource/yankround.vim
================================================
function! fzf_preview#remote#resource#yankround#get() abort
  let histories = map(copy(g:_yankround_cache), 'split(v:val, "\t", 1)')
  return map(histories, { key, val -> { 'line': key + 1, 'option': val[0], 'text': get(val, 1) } })
endfunction


================================================
FILE: autoload/fzf_preview/remote/runner.vim
================================================
function! fzf_preview#remote#runner#fzf_run(params) abort
  let source = a:params['source']
  let options = a:params['options']
  let handler = a:params['handler']
  let env = a:params['environment']

  if env ==# 'remote'
    let Sink = function('s:handler_wrapper', [handler])
  elseif env ==# 'coc'
    let Sink = function('s:coc_handler')
  elseif env ==# 'rpc'
    let Sink = function('fzf_preview#rpc#rpc_handler')
  endif

  let window = !empty(g:fzf_preview_direct_window_option) ?
        \  g:fzf_preview_direct_window_option :
        \  { 'width': g:fzf_preview_floating_window_rate, 'height': g:fzf_preview_floating_window_rate }

  call feedkeys("\<Cmd>nohlsearch\<CR>", 'nit')

  call fzf#run({
  \ 'source':  source,
  \ 'sink*':   Sink,
  \ 'options': options,
  \ 'window':  window,
  \ })
endfunction

function! s:handler_wrapper(handler, lines) abort
  call feedkeys('', 'x')
  call call(a:handler, [a:lines])
endfunction

function! s:coc_handler(lines) abort
  call feedkeys('', 'x')
  call CocAction('runCommand', 'fzf-preview.HandleResource', [a:lines])
endfunction


================================================
FILE: autoload/fzf_preview/remote/tagstack.vim
================================================
function! fzf_preview#remote#tagstack#push_tag_stack() abort
  let from = [bufnr('%'), line('.'), col('.'), 0]
  let tagname = expand('<cword>')
  let winid = win_getid()
  call settagstack(winid, {'items': [{'from': from, 'tagname': tagname}]}, 'a')
  call settagstack(winid, {'curidx': len(gettagstack(winid)['items']) + 1})
endfunction


================================================
FILE: autoload/fzf_preview/remote/util.vim
================================================
function! fzf_preview#remote#util#is_git_directory() abort
  let git_root = system('git rev-parse --show-toplevel 2>/dev/null')
  if git_root ==# ''
    return v:false
  else
    return v:true
  endif
endfunction

function! fzf_preview#remote#util#project_root() abort
  let git_root = system('git rev-parse --show-toplevel 2>/dev/null')
  if git_root ==# ''
    echomsg 'The current directory is not a git project'
    return ''
  endif

  return strpart(git_root, 0, strlen(git_root) - 1)
endfunction

function! fzf_preview#remote#util#is_project_file(file, splitted_project_path) abort
  let splitted_file_path = split(a:file, '/')
  if len(splitted_file_path) == 0
    return 0
  endif

  let is_project_file = 1
  let index = 0
  for dir_name in a:splitted_project_path[:len(splitted_file_path) - 1]
    if dir_name !=# splitted_file_path[index]
      let is_project_file = 0
    endif
    let index = index + 1
  endfor

  return is_project_file
endfunction

function! fzf_preview#remote#util#bufnr_and_lnum_to_resource(bufnr_and_lnum_list, splitted_project_path) abort
  let result = []
  for bufnr_and_lnum in a:bufnr_and_lnum_list
    let bufnr = bufnr_and_lnum['bufnr']
    let lnum = bufnr_and_lnum['lnum']
    let bufinfos = getbufinfo(bufnr)

    if len(bufinfos) > 0
      let bufinfo = bufinfos[0]
      let file = bufinfo['name']

      if fzf_preview#remote#util#is_project_file(file, a:splitted_project_path) && filereadable(file)
        let file = fnamemodify(file, ':.')
        let line_number = lnum
        let lines = getbufline(bufname(bufnr), lnum)

        if len(lines) > 0
          let text = lines[0]
        else
          let text = ''
        endif

        call add(result, { 'file': file, 'line': line_number, 'text': text })
      endif
    endif
  endfor

  return result
endfunction

function! fzf_preview#remote#util#get_columns() abort
  return &columns
endfunction

function! fzf_preview#remote#util#uniq(list) abort
  let result = []
  for item in a:list
    if index(result, item) == -1
      call add(result, item)
    endif
  endfor
  return result
endfunction


================================================
FILE: autoload/fzf_preview/remote/variable.vim
================================================
function! fzf_preview#remote#variable#get_global_variables() abort
  return {
  \   'fzfPreviewDefaultFzfOptions': g:fzf_preview_default_fzf_options,
  \   'fzfPreviewUseDevIcons': g:fzf_preview_use_dev_icons,
  \   'fzfPreviewDevIconPrefixStringLength': g:fzf_preview_dev_icon_prefix_string_length,
  \   'fzfPreviewDevIconsLimit': g:fzf_preview_dev_icons_limit,
  \   'webDevIconsUnicodeDecorateFileNodesDefaultSymbol': get(g:, 'WebDevIconsUnicodeDecorateFileNodesDefaultSymbol', ''),
  \   'webDevIconsUnicodeDecorateFileNodesExtensionSymbols': get(g:, 'WebDevIconsUnicodeDecorateFileNodesExtensionSymbols', {}),
  \   'webDevIconsUnicodeDecorateFileNodesExactSymbols': get(g:, 'WebDevIconsUnicodeDecorateFileNodesExactSymbols', {}),
  \   'webDevIconsUnicodeDecorateFileNodesPatternSymbols': get(g:, 'WebDevIconsUnicodeDecorateFileNodesPatternSymbols', {}),
  \   'fzfPreviewCommand': g:fzf_preview_command,
  \   'fzfBinaryPreviewCommand': g:fzf_binary_preview_command,
  \   'fzfPreviewIfBinaryCommand': g:fzf_preview_if_binary_command,
  \   'fzfPreviewFilelistCommand': g:fzf_preview_filelist_command,
  \   'fzfPreviewGitFilesCommand': g:fzf_preview_git_files_command,
  \   'fzfPreviewDirectoryFilesCommand': g:fzf_preview_directory_files_command,
  \   'fzfPreviewGitStatusCommand': g:fzf_preview_git_status_command,
  \   'fzfPreviewGitStatusPreviewCommand': g:fzf_preview_git_status_preview_command,
  \   'fzfPreviewGrepCmd': g:fzf_preview_grep_cmd,
  \   'fzfPreviewScriptDir': g:fzf_preview_script_dir,
  \   'fzfPreviewCacheDirectory': g:fzf_preview_cache_directory,
  \   'fzfPreviewLinesCommand': g:fzf_preview_lines_command,
  \   'fzfPreviewGrepPreviewCmd': g:fzf_preview_grep_preview_cmd,
  \   'fzfPreviewCustomProcesses': g:fzf_preview_custom_processes,
  \   'fzfPreviewFzfPreviewWindowOption': g:fzf_preview_fzf_preview_window_option,
  \   'fzfPreviewPreviewKeyBindings': g:fzf_preview_preview_key_bindings,
  \   'fzfPreviewHistoryDir': g:fzf_preview_history_dir,
  \   'fzfPreviewFzfColorOption': g:fzf_preview_fzf_color_option,
  \   'fzfPreviewBuffersJump': g:fzf_preview_buffers_jump,
  \   'yankroundDir': get(g:, 'yankround_dir', ''),
  \   'fzfPreviewYankroundPreviewCommand': g:fzf_preview_yankround_preview_command,
  \   'fzfPreviewBlamePrCommand': g:fzf_preview_blame_pr_command,
  \ }
endfunction


================================================
FILE: autoload/fzf_preview/remote/window.vim
================================================
" TODO: Command other than fzf-preview saves wrong resumes
let s:resource_command_name = ''

function! fzf_preview#remote#window#set_resource_command_name(command_name) abort
  if s:resource_command_name !=# a:command_name
    let s:resource_command_name = a:command_name
  endif
  call timer_start(10, { -> fzf_preview#remote#window#set_status_line(v:true) })
endfunction

function! fzf_preview#remote#window#get_resource_command_name() abort
  return substitute(s:resource_command_name, '^FzfPreview', '', '')
endfunction

function! fzf_preview#remote#window#set_status_line(updated_command_name) abort
  if !g:fzf_preview_update_statusline
    return
  endif

  if &laststatus != 3
    return
  endif

  if a:updated_command_name
    setlocal statusline=%#Identifier#\ >\ fzf-preview\ %{fzf_preview#remote#window#get_resource_command_name()}
  else
    setlocal statusline=\ 
  endif
endfunction

function! fzf_preview#remote#window#set_fzf_last_query(...) abort
  if &filetype ==# 'fzf' && s:resource_command_name !=# ''
    let matches = matchlist(getline('.'), '\w\+\>.\(\(\w\|\s\|''\)\+\)')
    if len(matches) > 0
      let query = substitute(substitute(matches[1], '\s\+$', '', ''), '^\s\+', '', '')

      if get(g:, 'fzf_preview_has_remote', v:false)
        call FzfPreviewDispatchResumeQuery(s:resource_command_name, query)
      endif

      if get(g:, 'fzf_preview_has_coc', v:false)
        call CocAction('runCommand', 'fzf-preview-function.DispatchResumeQuery', [s:resource_command_name, query])
      endif

      if get(g:, 'fzf_preview_has_rpc', v:false)
        call fzf_preview#rpc#dispatch_resume_query(s:resource_command_name, query)
      endif
    endif

    call timer_start(50, function('fzf_preview#remote#window#set_fzf_last_query'))
  endif
endfunction


================================================
FILE: autoload/fzf_preview/rpc/server.vim
================================================
let s:JSON = vital#fzf_preview#import('VS.RPC.JSON')
let s:Server = {}

function! fzf_preview#rpc#server#import() abort
  return s:Server
endfunction

function! s:Server.new(args) abort
  let l:server = extend(deepcopy(s:Server), { 'cmd': a:args.command, 'rpc': s:JSON.new(), 'request_id': 0 })
  let l:server.events = l:server.rpc.events
  return l:server
endfunction

function! s:Server.start() abort
  return self.rpc.start({ 'cmd': self.cmd })
endfunction

function! s:Server.request(method, params) abort
  return self.rpc.request(self.id(), a:method, a:params)
endfunction

function! s:Server.response(id, params) abort
  return self.rpc.response(a:id, a:params)
endfunction

function! s:Server.id() abort
  let self.request_id += 1
  return self.request_id
endfunction


================================================
FILE: autoload/fzf_preview/rpc.vim
================================================
let s:Promise = vital#fzf_preview#import('Async.Promise')
let s:Server = fzf_preview#rpc#server#import()

let s:root_dir = expand('<sfile>:h:h:h')

let s:state = {
\   'id': -1,
\   'sources': {},
\   'server': v:null
\ }

let default_processes = {}

call s:Promise.on_unhandled_rejection({ err -> fzf_preview#rpc#log('[ERROR]', err) })

function! fzf_preview#rpc#initialize() abort
  if !filereadable(printf('%s/lib/rpc.js', s:root_dir))
    return
  endif

  call s:start()

  function! s:initialize_default_processes(response) abort
    let s:default_processes = a:response

    let g:fzf_preview_has_rpc = v:true
    silent doautocmd User fzf_preview#initialized
    silent doautocmd User fzf_preview#rpc#initialized
  endfunction

  call s:state.server.request('getDefaultProcesses', {}).then({ response -> s:initialize_default_processes(response) })
endfunction

function! fzf_preview#rpc#restart() abort
  if !empty(s:state.server)
    call s:state.server.stop()
  endif

  let s:state.server = v:null
  call s:start()
endfunction

function! fzf_preview#rpc#get_default_processes(name) abort
  return s:default_processes[a:name]
endfunction

function! fzf_preview#rpc#command(command, ...) abort
  call s:start()
  if a:0 == 0
    call s:state.server.request('execCommand', { 'commandName': a:command })
  else
    call s:state.server.request('execCommand', { 'commandName': a:command, 'args': a:1 })
  endif
endfunction

function! fzf_preview#rpc#rpc_handler(lines) abort
  call feedkeys('', 'x')
  call s:state.server.request('callProcess', { 'lines': a:lines })
endfunction

function! fzf_preview#rpc#exec_process_callback(process_name, lines) abort
  call s:state.server.request('execProcessCallback', { 'processName': a:process_name, 'lines': a:lines })
endfunction

function! fzf_preview#rpc#dispatch_resume_query(command_name, query) abort
  call s:state.server.request('dispatchResumeQuery', { 'commandName': a:command_name, 'query': a:query })
endfunction

function! fzf_preview#rpc#log(...) abort
  if exists('g:fzf_preview_debug')
    call writefile([join([strftime('%H:%M:%S')] + a:000, "\t")], '/tmp/fzf_preview_rpc.log', 'a')
  endif
endfunction

function! s:start() abort
  try
    if !empty(s:state.server)
      return s:state.server
    endif
    let s:state.server = s:Server.new({ 'command': s:command() })
    " call s:state.server.rpc.job.events.on('stdout', { out -> fzf_preview#rpc#log('[STDOUT]', out) })
    call s:state.server.events.on('stderr', { err -> fzf_preview#rpc#log('[ERROR]', err) })
    call s:state.server.events.on('request', { request -> s:on_request(request) })
    call s:state.server.start()
    return s:state.server
  catch /.*/
    echomsg string({ 'exception': v:exception, 'throwpoint': v:throwpoint })
  endtry
endfunction

function! s:on_request(request) abort
  if a:request['method'] ==# 'execCommand'
    execute a:request['params']['command']
    call s:state.server.response(a:request['id'], { 'result': v:null })
  elseif a:request['method'] ==# 'execCall'
    let result = call(a:request['params']['fname'], a:request['params']['args'])
    call s:state.server.response(a:request['id'], { 'result': result })
  elseif a:request['method'] ==# 'getVar'
    let result = get(g:, a:request['params']['name'])
    call s:state.server.response(a:request['id'], { 'result': result })
  elseif a:request['method'] ==# 'getVvar'
    let result = get(v:, a:request['params']['name'])
    call s:state.server.response(a:request['id'], { 'result': result })
  endif
endfunction

function! s:command() abort
  return ['node', printf('%s/lib/rpc.js', s:root_dir)]
endfunction


================================================
FILE: autoload/fzf_preview.vim
================================================
function! fzf_preview#install() abort
  !yarn install
  UpdateRemotePlugins
endfunction


================================================
FILE: autoload/vital/_fzf_preview/Async/Later.vim
================================================
" ___vital___
" NOTE: lines between '" ___vital___' is generated by :Vitalize.
" Do not modify the code nor insert new lines before '" ___vital___'
function! s:_SID() abort
  return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze__SID$')
endfunction
execute join(['function! vital#_fzf_preview#Async#Later#import() abort', printf("return map({'set_max_workers': '', 'call': '', 'get_max_workers': '', 'set_error_handler': '', 'get_error_handler': ''}, \"vital#_fzf_preview#function('<SNR>%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n")
delfunction s:_SID
" ___vital___
let s:tasks = []
let s:workers = []
let s:max_workers = 50
let s:error_handler = v:null

function! s:call(fn, ...) abort
  call add(s:tasks, [a:fn, a:000])
  if empty(s:workers)
    call add(s:workers, timer_start(0, s:Worker, { 'repeat': -1 }))
  endif
endfunction

function! s:get_max_workers() abort
  return s:max_workers
endfunction

function! s:set_max_workers(n) abort
  if a:n <= 0
    throw 'vital: Async.Later: the n must be a positive integer'
  endif
  let s:max_workers = a:n
endfunction

function! s:get_error_handler() abort
  return s:error_handler
endfunction

function! s:set_error_handler(handler) abort
  let s:error_handler = a:handler
endfunction

function! s:_default_error_handler() abort
  let ms = split(v:exception . "\n" . v:throwpoint, '\n')
  echohl ErrorMsg
  for m in ms
    echomsg m
  endfor
  echohl None
endfunction

function! s:_worker(...) abort
  if v:dying
    return
  endif
  let n_workers = len(s:workers)
  if empty(s:tasks)
    if n_workers
      call timer_stop(remove(s:workers, 0))
    endif
    return
  endif
  try
    call call('call', remove(s:tasks, 0))
  catch
    if s:error_handler is# v:null
      call s:_default_error_handler()
    else
      call s:error_handler()
    endif
  endtry
  if n_workers < s:max_workers
    call add(s:workers, timer_start(0, s:Worker, { 'repeat': -1 }))
  endif
endfunction

let s:Worker = funcref('s:_worker')


================================================
FILE: autoload/vital/_fzf_preview/Async/Promise.vim
================================================
" ___vital___
" NOTE: lines between '" ___vital___' is generated by :Vitalize.
" Do not modify the code nor insert new lines before '" ___vital___'
function! s:_SID() abort
  return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze__SID$')
endfunction
execute join(['function! vital#_fzf_preview#Async#Promise#import() abort', printf("return map({'resolve': '', '_vital_depends': '', 'race': '', 'wait': '', '_vital_created': '', 'all': '', 'noop': '', 'on_unhandled_rejection': '', 'is_promise': '', 'chain': '', 'is_available': '', 'reject': '', 'new': '', '_vital_loaded': ''}, \"vital#_fzf_preview#function('<SNR>%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n")
delfunction s:_SID
" ___vital___
" ECMAScript like Promise library for asynchronous operations.
"   Spec: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
" This implementation is based upon es6-promise npm package.
"   Repo: https://github.com/stefanpenner/es6-promise

" States of promise
let s:PENDING = 0
let s:FULFILLED = 1
let s:REJECTED = 2

let s:DICT_T = type({})

let s:TIMEOUT_ERROR = 'vital: Async.Promise: Timeout'
let s:DEFAULT_WAIT_INTERVAL = 30

function! s:_vital_created(module) abort
  let a:module.TimeoutError = s:TIMEOUT_ERROR
  lockvar a:module.TimeoutError
endfunction

function! s:_vital_loaded(V) abort
  let s:Later = a:V.import('Async.Later')
endfunction

function! s:_vital_depends() abort
  return ['Async.Later']
endfunction

function! s:noop(...) abort
endfunction
let s:NOOP = funcref('s:noop')

" Internal APIs

let s:PROMISE = {
    \   '_state': s:PENDING,
    \   '_has_floating_child': v:false,
    \   '_children': [],
    \   '_fulfillments': [],
    \   '_rejections': [],
    \   '_result': v:null,
    \ }

let s:id = -1
function! s:_next_id() abort
  let s:id += 1
  return s:id
endfunction

" ... is added to use this function as a callback of s:Later.call()
function! s:_invoke_callback(settled, promise, callback, result, ...) abort
  let has_callback = a:callback isnot v:null
  let success = 1
  let err = v:null
  if has_callback
    try
      let l:Result = a:callback(a:result)
    catch
      let err = {
      \   'exception' : v:exception,
      \   'throwpoint' : v:throwpoint,
      \ }
      let success = 0
    endtry
  else
    let l:Result = a:result
  endif

  if a:promise._state != s:PENDING
    " Do nothing
  elseif has_callback && success
    call s:_resolve(a:promise, Result)
  elseif !success
    call s:_reject(a:promise, err)
  elseif a:settled == s:FULFILLED
    call s:_fulfill(a:promise, Result)
  elseif a:settled == s:REJECTED
    call s:_reject(a:promise, Result)
  endif
endfunction

" ... is added to use this function as a callback of s:Later.call()
function! s:_publish(promise, ...) abort
  let settled = a:promise._state
  if settled == s:PENDING
    throw 'vital: Async.Promise: Cannot publish a pending promise'
  endif

  if empty(a:promise._children)
    if settled == s:REJECTED && !a:promise._has_floating_child
      call s:_on_unhandled_rejection(a:promise._result)
    endif
    return
  endif

  for i in range(len(a:promise._children))
    if settled == s:FULFILLED
      let l:CB = a:promise._fulfillments[i]
    else
      " When rejected
      let l:CB = a:promise._rejections[i]
    endif
    let child = a:promise._children[i]
    if child isnot v:null
      call s:_invoke_callback(settled, child, l:CB, a:promise._result)
    else
      call l:CB(a:promise._result)
    endif
  endfor

  let a:promise._children = []
  let a:promise._fulfillments = []
  let a:promise._rejections = []
endfunction

function! s:_subscribe(parent, child, on_fulfilled, on_rejected) abort
  let a:parent._children += [ a:child ]
  let a:parent._fulfillments += [ a:on_fulfilled ]
  let a:parent._rejections += [ a:on_rejected ]
endfunction

function! s:_handle_thenable(promise, thenable) abort
  if a:thenable._state == s:FULFILLED
    call s:_fulfill(a:promise, a:thenable._result)
  elseif a:thenable._state == s:REJECTED
    call s:_reject(a:promise, a:thenable._result)
  else
    call s:_subscribe(
         \   a:thenable,
         \   v:null,
         \   funcref('s:_resolve', [a:promise]),
         \   funcref('s:_reject', [a:promise]),
         \ )
  endif
endfunction

function! s:_resolve(promise, ...) abort
  let l:Result = a:0 > 0 ? a:1 : v:null
  if s:is_promise(Result)
    call s:_handle_thenable(a:promise, Result)
  else
    call s:_fulfill(a:promise, Result)
  endif
endfunction

function! s:_fulfill(promise, value) abort
  if a:promise._state != s:PENDING
    return
  endif
  let a:promise._result = a:value
  let a:promise._state = s:FULFILLED
  if !empty(a:promise._children)
    call s:Later.call(funcref('s:_publish', [a:promise]))
  endif
endfunction

function! s:_reject(promise, ...) abort
  if a:promise._state != s:PENDING
    return
  endif
  let a:promise._result = a:0 > 0 ? a:1 : v:null
  let a:promise._state = s:REJECTED
  call s:Later.call(funcref('s:_publish', [a:promise]))
endfunction

function! s:_notify_done(wg, index, value) abort
  let a:wg.results[a:index] = a:value
  let a:wg.remaining -= 1
  if a:wg.remaining == 0
    call a:wg.resolve(a:wg.results)
  endif
endfunction

function! s:_all(promises, resolve, reject) abort
  let total = len(a:promises)
  if total == 0
    call a:resolve([])
    return
  endif

  let wait_group = {
      \   'results': repeat([v:null], total),
      \   'resolve': a:resolve,
      \   'remaining': total,
      \ }

  " 'for' statement is not available here because iteration variable is captured into lambda
  " expression by **reference**.
  call map(
       \   copy(a:promises),
       \   {i, p -> p.then({v -> s:_notify_done(wait_group, i, v)}, a:reject)},
       \ )
endfunction

function! s:_race(promises, resolve, reject) abort
  for p in a:promises
    call p.then(a:resolve, a:reject)
  endfor
endfunction

" Public APIs

function! s:new(resolver) abort
  let promise = deepcopy(s:PROMISE)
  let promise._vital_promise = s:_next_id()
  try
    if a:resolver != s:NOOP
      call a:resolver(
      \   funcref('s:_resolve', [promise]),
      \   funcref('s:_reject', [promise]),
      \ )
    endif
  catch
    call s:_reject(promise, {
    \   'exception' : v:exception,
    \   'throwpoint' : v:throwpoint,
    \ })
  endtry
  return promise
endfunction

function! s:all(promises) abort
  return s:new(funcref('s:_all', [a:promises]))
endfunction

function! s:race(promises) abort
  return s:new(funcref('s:_race', [a:promises]))
endfunction

function! s:resolve(...) abort
  let promise = s:new(s:NOOP)
  call s:_resolve(promise, a:0 > 0 ? a:1 : v:null)
  return promise
endfunction

function! s:reject(...) abort
  let promise = s:new(s:NOOP)
  call s:_reject(promise, a:0 > 0 ? a:1 : v:null)
  return promise
endfunction

function! s:is_available() abort
  return has('lambda') && has('timers')
endfunction

function! s:is_promise(maybe_promise) abort
  return type(a:maybe_promise) == s:DICT_T && has_key(a:maybe_promise, '_vital_promise')
endfunction

function! s:wait(promise, ...) abort
  if a:0 && type(a:1) is# v:t_number
    let t = a:1
    let i = s:DEFAULT_WAIT_INTERVAL . 'm'
  else
    let o = a:0 ? a:1 : {}
    let t = get(o, 'timeout', v:null)
    let i = get(o, 'interval', s:DEFAULT_WAIT_INTERVAL) . 'm'
  endif
  let s = reltime()
  while a:promise._state is# s:PENDING
    if (t isnot# v:null && reltimefloat(reltime(s)) * 1000 > t)
      return [v:null, s:TIMEOUT_ERROR]
    endif
    execute 'sleep' i
  endwhile
  if a:promise._state is# s:FULFILLED
    return [a:promise._result, v:null]
  else
    return [v:null, a:promise._result]
  endif
endfunction

function! s:chain(promise_factories) abort
  return s:_chain(copy(a:promise_factories), [])
endfunction

function! s:_chain(promise_factories, results) abort
  if len(a:promise_factories) is# 0
    return s:resolve(a:results)
  endif
  let l:Factory = remove(a:promise_factories, 0)
  try
    return Factory()
          \.then({ v -> add(a:results, v) })
          \.then({ -> s:_chain(a:promise_factories, a:results) })
  catch
    return s:reject({
          \ 'exception': v:exception,
          \ 'throwpoint': v:throwpoint,
          \})
  endtry
endfunction

let s:_on_unhandled_rejection = s:NOOP
function! s:on_unhandled_rejection(on_unhandled_rejection) abort
  let s:_on_unhandled_rejection = a:on_unhandled_rejection
endfunction

function! s:_promise_then(...) dict abort
  let parent = self
  let state = parent._state
  let child = s:new(s:NOOP)
  let l:Res = a:0 > 0 ? a:1 : v:null
  let l:Rej = a:0 > 1 ? a:2 : v:null
  if state == s:FULFILLED
    let parent._has_floating_child = v:true
    call s:Later.call(funcref('s:_invoke_callback', [state, child, Res, parent._result]))
  elseif state == s:REJECTED
    let parent._has_floating_child = v:true
    call s:Later.call(funcref('s:_invoke_callback', [state, child, Rej, parent._result]))
  else
    call s:_subscribe(parent, child, Res, Rej)
  endif
  return child
endfunction
let s:PROMISE.then = funcref('s:_promise_then')

" .catch() is just a syntax sugar of .then()
function! s:_promise_catch(...) dict abort
  return self.then(v:null, a:0 > 0 ? a:1 : v:null)
endfunction
let s:PROMISE.catch = funcref('s:_promise_catch')

function! s:_on_finally(CB, parent, Result) abort
  call a:CB()
  if a:parent._state == s:FULFILLED
    return a:Result
  else " REJECTED
    return s:reject(a:Result)
  endif
endfunction
function! s:_promise_finally(...) dict abort
  let parent = self
  let state = parent._state
  let child = s:new(s:NOOP)
  if a:0 == 0
    let l:CB = v:null
  else
    let l:CB = funcref('s:_on_finally', [a:1, parent])
  endif
  if state != s:PENDING
    call s:Later.call(funcref('s:_invoke_callback', [state, child, CB, parent._result]))
  else
    call s:_subscribe(parent, child, CB, CB)
  endif
  return child
endfunction
let s:PROMISE.finally = funcref('s:_promise_finally')

" vim:set et ts=2 sts=2 sw=2 tw=0:


================================================
FILE: autoload/vital/_fzf_preview/VS/Event/Emitter.vim
================================================
" ___vital___
" NOTE: lines between '" ___vital___' is generated by :Vitalize.
" Do not modify the code nor insert new lines before '" ___vital___'
function! s:_SID() abort
  return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze__SID$')
endfunction
execute join(['function! vital#_fzf_preview#VS#Event#Emitter#import() abort', printf("return map({'new': ''}, \"vital#_fzf_preview#function('<SNR>%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n")
delfunction s:_SID
" ___vital___
"
" new
"
function! s:new() abort
  return s:Emitter.new()
endfunction

"
" Emitter
"
let s:Emitter = {}

"
" new
"
function! s:Emitter.new() abort
  return extend(deepcopy(s:Emitter), {
  \   'events': {}
  \ })
endfunction

"
" emit
"
function! s:Emitter.emit(event_name, ...) abort
  for l:Listener in get(self.events, a:event_name, [])
    call call(l:Listener, a:000)
  endfor
endfunction

"
" on
"
function! s:Emitter.on(event_name, Listener) abort
  let self.events[a:event_name] = get(self.events, a:event_name, [])
  call add(self.events[a:event_name], a:Listener)
endfunction

"
" listener_count
"
function! s:Emitter.listener_count(event_name) abort
  return len(get(self.events, a:event_name, []))
endfunction

"
" off
"
function! s:Emitter.off(event_name, ...) abort
  let self.events[a:event_name] = get(self.events, a:event_name, [])

  let l:Listener = get(a:000, 0, v:null)

  let l:i = len(self.events[a:event_name]) - 1
  while l:i >= 0
    if self.events[a:event_name][l:i] ==# l:Listener || l:Listener is# v:null
      call remove(self.events[a:event_name], l:i)
    endif
    let l:i -= 1
  endwhile
endfunction



================================================
FILE: autoload/vital/_fzf_preview/VS/RPC/JSON.vim
================================================
" ___vital___
" NOTE: lines between '" ___vital___' is generated by :Vitalize.
" Do not modify the code nor insert new lines before '" ___vital___'
function! s:_SID() abort
  return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze__SID$')
endfunction
execute join(['function! vital#_fzf_preview#VS#RPC#JSON#import() abort', printf("return map({'_vital_depends': '', 'new': '', '_vital_loaded': ''}, \"vital#_fzf_preview#function('<SNR>%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n")
delfunction s:_SID
" ___vital___
"
" _vital_loaded
"
function! s:_vital_loaded(V) abort
  let s:Promise = a:V.import('Async.Promise')
  let s:Job = a:V.import('VS.System.Job')
  let s:Emitter = a:V.import('VS.Event.Emitter')
endfunction

"
" _vital_depends
"
function! s:_vital_depends() abort
  return ['Async.Promise', 'VS.Event.Emitter', 'VS.System.Job']
endfunction

"
" new
"
function! s:new() abort
  return s:Connection.new()
endfunction

"
" s:Connection
"
let s:Connection = {}

"
" new
"
function! s:Connection.new() abort
  return extend(deepcopy(s:Connection), {
  \   'job': s:Job.new(),
  \   'events': s:Emitter.new(),
  \   'buffer':  '',
  \   'header_length': -1,
  \   'message_length': -1,
  \   'request_map': {},
  \ })
endfunction

"
" start
"
function! s:Connection.start(args) abort
  if !self.job.is_running()
    call self.job.events.on('stdout', self.on_stdout)
    call self.job.events.on('stderr', self.on_stderr)
    call self.job.events.on('exit', self.on_exit)
    call self.job.start(a:args)
  endif
endfunction

"
" stop
"
function! s:Connection.stop() abort
  if self.job.is_running()
    call self.job.events.off('stdout', self.on_stdout)
    call self.job.events.off('stderr', self.on_stderr)
    call self.job.events.off('exit', self.on_exit)
    call self.job.stop()
  endif
endfunction

"
" is_running
"
function! s:Connection.is_running() abort
  return self.job.is_running()
endfunction

"
" request
"
function! s:Connection.request(id, method, params) abort
  let l:ctx = {}
  function! l:ctx.callback(id, method, params, resolve, reject) abort
    let self.request_map[a:id] = { 'resolve': a:resolve, 'reject': a:reject }
    let l:message = { 'id': a:id, 'method': a:method }
    if a:params isnot# v:null
      let l:message.params = a:params
    endif
    call self.job.send(self.to_message(l:message))
  endfunction
  return s:Promise.new(function(l:ctx.callback, [a:id, a:method, a:params], self))
endfunction

"
" response
"
function! s:Connection.response(id, ...) abort
  let l:message = { 'id': a:id }
  let l:message = extend(l:message, len(a:000) > 0 ? a:000[0] : {})
  call self.job.send(self.to_message(l:message))
endfunction

"
" notify
"
function! s:Connection.notify(method, params) abort
  let l:message = { 'method': a:method }
  if a:params isnot# v:null
    let l:message.params = a:params
  endif
  call self.job.send(self.to_message(l:message))
endfunction

"
" cancel
"
function! s:Connection.cancel(id) abort
  if has_key(self.request_map, a:id)
    call remove(self.request_map, a:id)
  endif
endfunction

"
" to_message
"
function! s:Connection.to_message(message) abort
  let a:message.jsonrpc = '2.0'
  let l:message = json_encode(a:message)
  return 'Content-Length: ' . strlen(l:message) . "\r\n\r\n" . l:message
endfunction

"
" on_message
"
function! s:Connection.on_message(message) abort
  if has_key(a:message, 'id')
    " Request from server.
    if has_key(a:message, 'method')
      call self.events.emit('request', a:message)

    " Response from server.
    else
      if has_key(self.request_map, a:message.id)
        let l:request = remove(self.request_map, a:message.id)
        if has_key(a:message, 'error')
          call l:request.reject(a:message.error)
        else
          call l:request.resolve(get(a:message, 'result', v:null))
        endif
      endif
    endif

  " Notify from server.
  elseif has_key(a:message, 'method')
    call self.events.emit('notify', a:message)
  endif
endfunction

"
" flush
"
function! s:Connection.flush(data) abort
  let self.buffer .= a:data

  while self.buffer !=# ''
    " header check.
    if self.header_length == -1
      let l:header_length = stridx(self.buffer, "\r\n\r\n") + 4
      if l:header_length < 4
        return
      endif
      let self.header_length = l:header_length
      let self.message_length = self.header_length + str2nr(get(matchlist(self.buffer, '\ccontent-length:\s*\(\d\+\)'), 1, '-1'))
    endif

    " content check.
    let l:buffer_len = strlen(self.buffer)
    if l:buffer_len < self.message_length
      return
    endif

    let l:content = strpart(self.buffer, self.header_length, self.message_length - self.header_length)
    try
      call self.on_message(json_decode(l:content))
    catch /.*/
    endtry
    let self.buffer = strpart(self.buffer, self.message_length)
    let self.header_length = -1
  endwhile
endfunction

"
" on_stdout
"
function! s:Connection.on_stdout(data) abort
  call self.flush(a:data)
endfunction

"
" on_stderr
"
function! s:Connection.on_stderr(data) abort
  call self.events.emit('stderr', a:data)
endfunction

"
" on_exit
"
function! s:Connection.on_exit(code) abort
  call self.events.emit('exit', a:code)
endfunction



================================================
FILE: autoload/vital/_fzf_preview/VS/System/Job.vim
================================================
" ___vital___
" NOTE: lines between '" ___vital___' is generated by :Vitalize.
" Do not modify the code nor insert new lines before '" ___vital___'
function! s:_SID() abort
  return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze__SID$')
endfunction
execute join(['function! vital#_fzf_preview#VS#System#Job#import() abort', printf("return map({'_vital_depends': '', 'new': '', '_vital_loaded': ''}, \"vital#_fzf_preview#function('<SNR>%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n")
delfunction s:_SID
" ___vital___
"
" _vital_loaded
"
function! s:_vital_loaded(V) abort
  let s:Emitter = a:V.import('VS.Event.Emitter')
endfunction

"
" _vital_depends
"
function! s:_vital_depends() abort
  return ['VS.Event.Emitter']
endfunction

"
" new
"
function! s:new() abort
  return s:Job.new()
endfunction

let s:chunk_size = 2048

let s:Job = {}

"
" new
"
function! s:Job.new() abort
  let l:job = extend(deepcopy(s:Job), {
  \   'events': s:Emitter.new(),
  \   'write_buffer': '',
  \   'write_timer': -1,
  \   'job': v:null,
  \ })
  let l:job.write = function(l:job.write, [], l:job)
  return l:job
endfunction

"
" start
"
function! s:Job.start(args) abort
  if self.is_running()
    return
  endif

  let l:option = {}
  for l:key in ['cwd', 'env']
    if has_key(a:args, l:key)
      let l:option[l:key] = a:args[l:key]
    endif
  endfor

  let self.job = s:_create(
  \   a:args.cmd,
  \   l:option,
  \   function(self.on_stdout, [], self),
  \   function(self.on_stderr, [], self),
  \   function(self.on_exit, [], self)
  \ )
endfunction

"
" stop
"
function! s:Job.stop() abort
  if !self.is_running()
    return
  endif
  call self.job.stop()
  let self.job = v:null
endfunction

"
" is_running
"
function! s:Job.is_running() abort
  return !empty(self.job)
endfunction

"
" send
"
function! s:Job.send(data) abort
  if !self.is_running()
    return
  endif
  let self.write_buffer .= a:data
  if self.write_timer != -1
    return
  endif
  call self.write()
endfunction

"
" write
"
function! s:Job.write(...) abort
  let self.write_timer = -1
  if self.write_buffer ==# ''
    return
  endif
  call self.job.send(strpart(self.write_buffer, 0, s:chunk_size))
  let self.write_buffer = strpart(self.write_buffer, s:chunk_size)
  if self.write_buffer !=# ''
    let self.write_timer = timer_start(0, self.write)
  endif
endfunction

"
" on_stdout
"
function! s:Job.on_stdout(data) abort
  call self.events.emit('stdout', a:data)
endfunction

"
" on_stderr
"
function! s:Job.on_stderr(data) abort
  call self.events.emit('stderr', a:data)
endfunction

"
" on_exit
"
function! s:Job.on_exit(code) abort
  call self.events.emit('exit', a:code)
endfunction

"
" create job instance
"
if has('nvim')
  function! s:_create(cmd, option, out, err, exit) abort
    let a:option.on_stdout = { id, data, event -> a:out(join(data, "\n")) }
    let a:option.on_stderr = { id, data, event -> a:err(join(data, "\n")) }
    let a:option.on_exit = { id, data, code -> a:exit(code) }
    let l:job = jobstart(a:cmd, a:option)
    return {
    \   'stop': { -> jobstop(l:job) },
    \   'send': { data -> jobsend(l:job, data) }
    \ }
  endfunction
else
  function! s:_create(cmd, option, out, err, exit) abort
    let a:option.noblock = v:true
    let a:option.in_io = 'pipe'
    let a:option.in_mode = 'raw'
    let a:option.out_io = 'pipe'
    let a:option.out_mode = 'raw'
    let a:option.err_io = 'pipe'
    let a:option.err_mode = 'raw'
    let a:option.out_cb = { job, data -> a:out(data) }
    let a:option.err_cb = { job, data -> a:err(data) }
    let a:option.exit_cb = { job, code -> a:exit(code) }
    let l:job = job_start(a:cmd, a:option)
    return {
    \   'stop': { ->  ch_close(l:job) },
    \   'send': { data -> ch_sendraw(l:job, data) }
    \ }
  endfunction
endif



================================================
FILE: autoload/vital/_fzf_preview.vim
================================================
let s:_plugin_name = expand('<sfile>:t:r')

function! vital#{s:_plugin_name}#new() abort
  return vital#{s:_plugin_name[1:]}#new()
endfunction

function! vital#{s:_plugin_name}#function(funcname) abort
  silent! return function(a:funcname)
endfunction


================================================
FILE: autoload/vital/fzf_preview.vim
================================================
let s:plugin_name = expand('<sfile>:t:r')
let s:vital_base_dir = expand('<sfile>:h')
let s:project_root = expand('<sfile>:h:h:h')
let s:is_vital_vim = s:plugin_name is# 'vital'

let s:loaded = {}
let s:cache_sid = {}

function! vital#{s:plugin_name}#new() abort
  return s:new(s:plugin_name)
endfunction

function! vital#{s:plugin_name}#import(...) abort
  if !exists('s:V')
    let s:V = s:new(s:plugin_name)
  endif
  return call(s:V.import, a:000, s:V)
endfunction

let s:Vital = {}

function! s:new(plugin_name) abort
  let base = deepcopy(s:Vital)
  let base._plugin_name = a:plugin_name
  return base
endfunction

function! s:vital_files() abort
  if !exists('s:vital_files')
    let s:vital_files = map(
    \   s:is_vital_vim ? s:_global_vital_files() : s:_self_vital_files(),
    \   'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")')
  endif
  return copy(s:vital_files)
endfunction
let s:Vital.vital_files = function('s:vital_files')

function! s:import(name, ...) abort dict
  let target = {}
  let functions = []
  for a in a:000
    if type(a) == type({})
      let target = a
    elseif type(a) == type([])
      let functions = a
    endif
    unlet a
  endfor
  let module = self._import(a:name)
  if empty(functions)
    call extend(target, module, 'keep')
  else
    for f in functions
      if has_key(module, f) && !has_key(target, f)
        let target[f] = module[f]
      endif
    endfor
  endif
  return target
endfunction
let s:Vital.import = function('s:import')

function! s:load(...) abort dict
  for arg in a:000
    let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg]
    let target = split(join(as, ''), '\W\+')
    let dict = self
    let dict_type = type({})
    while !empty(target)
      let ns = remove(target, 0)
      if !has_key(dict, ns)
        let dict[ns] = {}
      endif
      if type(dict[ns]) == dict_type
        let dict = dict[ns]
      else
        unlet dict
        break
      endif
    endwhile
    if exists('dict')
      call extend(dict, self._import(name))
    endif
    unlet arg
  endfor
  return self
endfunction
let s:Vital.load = function('s:load')

function! s:unload() abort dict
  let s:loaded = {}
  let s:cache_sid = {}
  unlet! s:vital_files
endfunction
let s:Vital.unload = function('s:unload')

function! s:exists(name) abort dict
  if a:name !~# '\v^\u\w*%(\.\u\w*)*$'
    throw 'vital: Invalid module name: ' . a:name
  endif
  return s:_module_path(a:name) isnot# ''
endfunction
let s:Vital.exists = function('s:exists')

function! s:search(pattern) abort dict
  let paths = s:_extract_files(a:pattern, self.vital_files())
  let modules = sort(map(paths, 's:_file2module(v:val)'))
  return uniq(modules)
endfunction
let s:Vital.search = function('s:search')

function! s:plugin_name() abort dict
  return self._plugin_name
endfunction
let s:Vital.plugin_name = function('s:plugin_name')

function! s:_self_vital_files() abort
  let builtin = printf('%s/__%s__/', s:vital_base_dir, s:plugin_name)
  let installed = printf('%s/_%s/', s:vital_base_dir, s:plugin_name)
  let base = builtin . ',' . installed
  return split(globpath(base, '**/*.vim', 1), "\n")
endfunction

function! s:_global_vital_files() abort
  let pattern = 'autoload/vital/__*__/**/*.vim'
  return split(globpath(&runtimepath, pattern, 1), "\n")
endfunction

function! s:_extract_files(pattern, files) abort
  let tr = {'.': '/', '*': '[^/]*', '**': '.*'}
  let target = substitute(a:pattern, '\.\|\*\*\?', '\=tr[submatch(0)]', 'g')
  let regexp = printf('autoload/vital/[^/]\+/%s.vim$', target)
  return filter(a:files, 'v:val =~# regexp')
endfunction

function! s:_file2module(file) abort
  let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?')
  let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$')
  return join(split(tail, '[\\/]\+'), '.')
endfunction

" @param {string} name e.g. Data.List
function! s:_import(name) abort dict
  if has_key(s:loaded, a:name)
    return copy(s:loaded[a:name])
  endif
  let module = self._get_module(a:name)
  if has_key(module, '_vital_created')
    call module._vital_created(module)
  endif
  let export_module = filter(copy(module), 'v:key =~# "^\\a"')
  " Cache module before calling module._vital_loaded() to avoid cyclic
  " dependences but remove the cache if module._vital_loaded() fails.
  " let s:loaded[a:name] = export_module
  let s:loaded[a:name] = export_module
  if has_key(module, '_vital_loaded')
    try
      call module._vital_loaded(vital#{s:plugin_name}#new())
    catch
      unlet s:loaded[a:name]
      throw 'vital: fail to call ._vital_loaded(): ' . v:exception . " from:\n" . s:_format_throwpoint(v:throwpoint)
    endtry
  endif
  return copy(s:loaded[a:name])
endfunction
let s:Vital._import = function('s:_import')

function! s:_format_throwpoint(throwpoint) abort
  let funcs = []
  let stack = matchstr(a:throwpoint, '^function \zs.*, .\{-} \d\+$')
  for line in split(stack, '\.\.')
    let m = matchlist(line, '^\(.\+\)\%(\[\(\d\+\)\]\|, .\{-} \(\d\+\)\)$')
    if !empty(m)
      let [name, lnum, lnum2] = m[1:3]
      if empty(lnum)
        let lnum = lnum2
      endif
      let info = s:_get_func_info(name)
      if !empty(info)
        let attrs = empty(info.attrs) ? '' : join([''] + info.attrs)
        let flnum = info.lnum == 0 ? '' : printf(' Line:%d', info.lnum + lnum)
        call add(funcs, printf('function %s(...)%s Line:%d (%s%s)',
        \        info.funcname, attrs, lnum, info.filename, flnum))
        continue
      endif
    endif
    " fallback when function information cannot be detected
    call add(funcs, line)
  endfor
  return join(funcs, "\n")
endfunction

function! s:_get_func_info(name) abort
  let name = a:name
  if a:name =~# '^\d\+$'  " is anonymous-function
    let name = printf('{%s}', a:name)
  elseif a:name =~# '^<lambda>\d\+$'  " is lambda-function
    let name = printf("{'%s'}", a:name)
  endif
  if !exists('*' . name)
    return {}
  endif
  let body = execute(printf('verbose function %s', name))
  let lines = split(body, "\n")
  let signature = matchstr(lines[0], '^\s*\zs.*')
  let [_, file, lnum; __] = matchlist(lines[1],
  \   '^\t\%(Last set from\|.\{-}:\)\s*\zs\(.\{-}\)\%( \S\+ \(\d\+\)\)\?$')
  return {
  \   'filename': substitute(file, '[/\\]\+', '/', 'g'),
  \   'lnum': 0 + lnum,
  \   'funcname': a:name,
  \   'arguments': split(matchstr(signature, '(\zs.*\ze)'), '\s*,\s*'),
  \   'attrs': filter(['dict', 'abort', 'range', 'closure'], 'signature =~# (").*" . v:val)'),
  \ }
endfunction

" s:_get_module() returns module object wihch has all script local functions.
function! s:_get_module(name) abort dict
  let funcname = s:_import_func_name(self.plugin_name(), a:name)
  try
    return call(funcname, [])
  catch /^Vim\%((\a\+)\)\?:E117:/
    return s:_get_builtin_module(a:name)
  endtry
endfunction

function! s:_get_builtin_module(name) abort
 return s:sid2sfuncs(s:_module_sid(a:name))
endfunction

if s:is_vital_vim
  " For vital.vim, we can use s:_get_builtin_module directly
  let s:Vital._get_module = function('s:_get_builtin_module')
else
  let s:Vital._get_module = function('s:_get_module')
endif

function! s:_import_func_name(plugin_name, module_name) abort
  return printf('vital#_%s#%s#import', a:plugin_name, s:_dot_to_sharp(a:module_name))
endfunction

function! s:_module_sid(name) abort
  let path = s:_module_path(a:name)
  if !filereadable(path)
    throw 'vital: module not found: ' . a:name
  endif
  let vital_dir = s:is_vital_vim ? '__\w\+__' : printf('_\{1,2}%s\%%(__\)\?', s:plugin_name)
  let base = join([vital_dir, ''], '[/\\]\+')
  let p = base . substitute('' . a:name, '\.', '[/\\\\]\\+', 'g')
  let sid = s:_sid(path, p)
  if !sid
    call s:_source(path)
    let sid = s:_sid(path, p)
    if !sid
      throw printf('vital: cannot get <SID> from path: %s', path)
    endif
  endif
  return sid
endfunction

function! s:_module_path(name) abort
  return get(s:_extract_files(a:name, s:vital_files()), 0, '')
endfunction

function! s:_module_sid_base_dir() abort
  return s:is_vital_vim ? &rtp : s:project_root
endfunction

function! s:_dot_to_sharp(name) abort
  return substitute(a:name, '\.', '#', 'g')
endfunction

function! s:_source(path) abort
  execute 'source' fnameescape(a:path)
endfunction

" @vimlint(EVL102, 1, l:_)
" @vimlint(EVL102, 1, l:__)
function! s:_sid(path, filter_pattern) abort
  let unified_path = s:_unify_path(a:path)
  if has_key(s:cache_sid, unified_path)
    return s:cache_sid[unified_path]
  endif
  for line in filter(split(execute(':scriptnames'), "\n"), 'v:val =~# a:filter_pattern')
    let [_, sid, path; __] = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$')
    if s:_unify_path(path) is# unified_path
      let s:cache_sid[unified_path] = sid
      return s:cache_sid[unified_path]
    endif
  endfor
  return 0
endfunction

if filereadable(expand('<sfile>:r') . '.VIM') " is case-insensitive or not
  let s:_unify_path_cache = {}
  " resolve() is slow, so we cache results.
  " Note: On windows, vim can't expand path names from 8.3 formats.
  " So if getting full path via <sfile> and $HOME was set as 8.3 format,
  " vital load duplicated scripts. Below's :~ avoid this issue.
  function! s:_unify_path(path) abort
    if has_key(s:_unify_path_cache, a:path)
      return s:_unify_path_cache[a:path]
    endif
    let value = tolower(fnamemodify(resolve(fnamemodify(
    \                   a:path, ':p')), ':~:gs?[\\/]?/?'))
    let s:_unify_path_cache[a:path] = value
    return value
  endfunction
else
  function! s:_unify_path(path) abort
    return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?'))
  endfunction
endif

" copied and modified from Vim.ScriptLocal
let s:SNR = join(map(range(len("\<SNR>")), '"[\\x" . printf("%0x", char2nr("\<SNR>"[v:val])) . "]"'), '')
function! s:sid2sfuncs(sid) abort
  let fs = split(execute(printf(':function /^%s%s_', s:SNR, a:sid)), "\n")
  let r = {}
  let pattern = printf('\m^function\s<SNR>%d_\zs\w\{-}\ze(', a:sid)
  for fname in map(fs, 'matchstr(v:val, pattern)')
    let r[fname] = function(s:_sfuncname(a:sid, fname))
  endfor
  return r
endfunction

"" Return funcname of script local functions with SID
function! s:_sfuncname(sid, funcname) abort
  return printf('<SNR>%s_%s', a:sid, a:funcname)
endfunction


================================================
FILE: autoload/vital/fzf_preview.vital
================================================
fzf_preview
8e269699b0b993fc68599ed94571db5d3e933bcf

VS.RPC.JSON
Async.Promise
VS.System.Job
VS.Event.Emitter


================================================
FILE: bin/git_actions_preview
================================================
#!/usr/bin/env bash

if [[ $1 == 'status' ]]; then
	git -c color.status=always status
elif [[ $1 == 'branch' ]]; then
	git for-each-ref --sort=-committerdate --count=10 --color=always --format="Date: %(color:red)%(authordate:iso)%(color:reset)  %(color:green)[%(authorname)]%(color:reset)  Ref: %(color:yellow)%(refname:short)%(color:reset)
Subject: %(subject)
"
elif [[ $1 =~ ^(log|push|fetch|pull) ]]; then
	git log --decorate --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=iso --graph --color=always
elif [[ $1 =~ ^current-log ]]; then
	file=$(echo "$1" | awk -F':' '{print $2}')
	if [[ $file != '' ]]; then
		git log --decorate --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=iso --graph --color=always -- "$file"
	fi
elif [[ $1 =~ ^commit ]]; then
	git diff --cached --color=always
fi


================================================
FILE: bin/git_blame_pr
================================================
#! /usr/bin/perl
#
# Written in 2017 by Kazuho Oku
#
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

use strict;
use warnings;

my $git_blame_pid = open(my $fh, "-|", "git", "blame", "--first-parent", @ARGV)
    or die "failed to invoke git-blame:$!";

my %cached; # commit-id -> substitution string

while (my $line = <$fh>) {
    my ($commit, $src) = split / .*?\) /, $line, 2;
    $cached{$commit} = lookup($commit)
        unless $cached{$commit};
    print $cached{$commit}, ' ', $src;
}

while (waitpid($git_blame_pid, 0) != $git_blame_pid) {}
exit $?;

sub lookup {
    my $commit = shift;
    my $message = `git show --oneline $commit`;
    if ($message =~ /Merge\s+(?:pull\s+request|pr)\s+\#?(\d+)\s/i) {
        return sprintf '%-9s', "PR #$1";
    }
    return $commit;
}


================================================
FILE: bin/preview_yankround_register
================================================
#!/usr/bin/env bash

if which gsed > /dev/null && which gcut > /dev/null; then
  gsed -n "$2,$2p" "$1" | gcut -f 2 | gsed -e "s/\x0/\n/g"
else
  sed -n "$2,$2p" "$1" | cut -f 2 | sed -e "s/\x0/\n/g"
fi


================================================
FILE: doc/fzf_preview_vim.txt
================================================
*fzf-preview-vim.txt*

Author:  yuki-yano
License: MIT
Version: 0.1


==============================================================================
CONTENTS                                   *fzf-preview-contents*
    Introduction                           |fzf-preview-introduction|
    Installation                           |fzf-preview-installation|
    Mappings                               |fzf-preview-mappings|
    Commands                               |fzf-preview-commands|
    Keymap                                 |fzf-preview-keymap|

==============================================================================
INTRODUCTION                              *fzf-preview-introduction*

*fzf-preview* is Vim script RPC, coc extensions or Neovim remote plugin to
provide some fzf sources with preview.

Requirements:
- Neovim (Remote Plugin)
    https://neovim.io/

- coc.nvim (coc extensions)
    https://github.com/neoclide/coc.nvim

- Node
    https://nodejs.org/

- git
    https://git-scm.com/

- fzf
    https://github.com/junegunn/fzf

- ripgrep (Require some preview)
    https://github.com/BurntSushi/ripgrep

Optional:
- bat (Add color to the preview)
    https://github.com/sharkdp/bat

- vim-devicons (Use devicons)
    https://github.com/ryanoasis/vim-devicons

- Fugitive (Require git integration)
    https://github.com/tpope/vim-fugitive

- Gina (Require git integration)
    https://github.com/lambdalisue/gina.vim

- universal-ctags (Requre FzfPreviewCtags and FzfPreviewBufferTags)
    https://github.com/universal-ctags/ctags

- vista.vim (Require FzfPreviewVistaCtags and FzfPreviewVistaBufferCtags)
    https://github.com/liuchengxu/vista.vim

- vim-bookmarks (Require FzfPreviewBookmarks)
    https://github.com/MattesGroeger/vim-bookmarks

- yankround.vim (Require FzfPreviewYankround)
    https://github.com/LeafCage/yankround.vim

- memolist.vim (Require FzfPreviewMemoList and FzfPreviewMemoListGrep)
    https://github.com/glidenote/memolist.vim

- todo-comments.nvim (Require FzfPreviewTodoComments)
    https://github.com/folke/todo-comments.nvim

- GitHub cli (Require integrate with GitHub)
    https://github.com/cli/cli

- Yarn (Build latest remote plugin)
    https://classic.yarnpkg.com/

Latest version:
https://github.com/yuki-yano/fzf-preview.vim

==============================================================================
VIM SCRIPT RPC PLUGIN INSTALLATION        *fzf-preview-vim-rpc-installation*

Use Dein, vim-plug or any Vim plugin manager of your choice.
Install release/rpc branch.

>
    Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
    Plug 'yuki-yano/fzf-preview.vim', { 'branch': 'release/rpc' }
<

or

>
    call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
    call dein#add('yuki-yano/fzf-preview.vim', { 'rev': 'release/rpc' })
<

==============================================================================
REMOTE PLUGIN INSTALLATION                *fzf-preview-remote-installation*

Install the npm package [neovim](https://www.npmjs.com/package/neovim)
to get the remote plugin working.

>
    $ npm install -g neovim
<

Use Dein, vim-plug or any Vim plugin manager of your choice.
Install release/remote branch and `:UpdateRemotePlugins`
when after installed plugin.

>
    Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
    Plug 'yuki-yano/fzf-preview.vim', { 'branch': 'release/remote', 'do': ':UpdateRemotePlugins' }
<

or

>
    call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
    call dein#add('yuki-yano/fzf-preview.vim', { 'rev': 'release/remote' })
<

==============================================================================
COC EXTENSION INSTALLATION                   *fzf-preview-coc-installation*

Install the [coc.nvim](https://github.com/neoclide/coc.nvim)
Install coc extensions fzf-preview.


use vim-plug:
>
    Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
    Plug 'neoclide/coc.nvim', { 'branch': 'release' }
<

use dein:

>
    call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
    call dein#add('neoclide/coc.nvim', { 'rev': 'release', 'merged': 0 })
<

execute after

:CocInstall coc-fzf-preview

==============================================================================
COMMANDS                                        *fzf-preview-commands*

Vim script RPC, Remote Plugin, and coc extensions, in that order.

                                                *:FzfPreviewProjectFiles*
:FzfPreviewProjectFilesRpc
:FzfPreviewProjectFiles
:CocCommand fzf-preview.ProjectFiles
     Select and open git repository files from project. 

                                                *:FzfPreviewGitFiles*
:FzfPreviewGitFilesRpc
:FzfPreviewGitFiles
:CocCommand fzf-preview.GitFiles
     Select and open git repository files from git ls-files.

                                                *:FzfPreviewDirectoryFiles*
:FzfPreviewDirectoryFilesRpc {path or none}
:FzfPreviewDirectoryFiles {path or none}
:CocCommand fzf-preview.DirectoryFiles {path or none}
     Select and open directory files from ripgrep with fzf interface.
     Default to current working directory.

                                                *:FzfPreviewBuffers*
:FzfPreviewBuffersRpc
:FzfPreviewBuffers
:CocCommand fzf-preview.Buffers
     Select and open file buffers.
     Use open-buffer processes.

                                                *:FzfPreviewAllBuffers*
:FzfPreviewAllBuffersRpc
:FzfPreviewAllBuffers
:CocCommand fzf-preview.AllBuffers
     Select and open all buffers(include not file).
     Use open-bufnr processes.

                                                *:FzfPreviewProjectOldFiles*

:FzfPreviewProjectOldFilesRpc
:FzfPreviewProjectOldFiles
:CocCommand fzf-preview.ProjectOldFiles
     Select and open the past open files in the project using fzf.
     The target file is selected from  |v:oldfiles|.

                                                *:FzfPreviewProjectMruFiles*
:FzfPreviewProjectMruFilesRpc
:FzfPreviewProjectMruFiles
:CocCommand fzf-preview.ProjectMruFiles
     Select and open the past open files in the project using fzf.
     The target file is selected from most recently used.

                                                *:FzfPreviewProjectMrwFiles*
:FzfPreviewMrwFilesRpc
:FzfPreviewMrwFiles
:CocCommand fzf-preview.MrwFiles
     Select and open the past open files in the project using fzf.
     The target file is selected from most recently written.

                                                *:FzfPreviewProjectGrep*
:FzfPreviewProjectGrepRpc
:FzfPreviewProjectGrep
:CocCommand fzf-preview.ProjectGrep
     Search text from the project.
     The retrieved result is displayed in file name, number of lines, preview
     and can be opened with fzf interface.

                                                *:FzfPreviewProjectGrepRecall*
:FzfPreviewProjectGrepRecallRpc
:FzfPreviewProjectGrepRecall
:CocCommand fzf-preview.ProjectGrepRecall
     Run FzfPreviewProjectGrep with the same arguments as before.

                                                *:FzfPreviewCTags*
:FzfPreviewCtagsRpc
:FzfPreviewCtags
:CocCommand fzf-preview.Ctags
     Select tags from tags file
     The same script as FzfPreviewProjectGrep is used for preview.
     Required: |universal-ctags|

     Cautions:
       Set --excmd=number or --excmd=combine to universal-ctags option

                                                *:FzfPreviewBufferTags*
:FzfPreviewBufferTagsRpc
:FzfPreviewBufferTags
:CocCommand fzf-preview.BufferTags
     Select from tags of currently open buffer
     The same script as FzfPreviewProjectGrep is used for preview.
     Required: |universal-ctags|

                                                *:FzfPreviewOldFiles*
:FzfPreviewOldFilesRpc
:FzfPreviewOldFiles
:CocCommand fzf-preview.OldFiles
     Select and open the opened file.
     For the target file, see |v:oldfiles|.

                                                *:FzfPreviewMruFiles*
:FzfPreviewMruFilesRpc
:FzfPreviewMruFiles
:CocCommand fzf-preview.MruFiles
     Select and open the opened file.
     For the target file, most recently used.

                                                *:FzfPreviewMrwFiles*
:FzfPreviewMrwFilesRpc
:FzfPreviewMrwFiles
:CocCommand fzf-preview.MrwFiles
     Select and open the opened file.
     For the target file, most recently written.

                                                *:FzfPreviewQuickFix*
:FzfPreviewQuickFixRpc
:FzfPreviewQuickFix
:CocCommand fzf-preview.QuickFix
     Select and open the QuickFix item.

                                                *:FzfPreviewLocationList*
:FzfPreviewLocationListRpc
:FzfPreviewLocationList
:CocCommand fzf-preview.LocationList
     Select and open the LocationList item.

                                                *:FzfPreviewLines*
:FzfPreviewLinesRpc
:FzfPreviewLines
:CocCommand fzf-preview.Lines
     Select line from current buffer.

                                                *:FzfPreviewBufferLines*
:FzfPreviewBufferLinesRpc
:FzfPreviewBufferLines
:CocCommand fzf-preview.BufferLines
     Select line from all buffer

                                                *:FzfPreviewJumps*
:FzfPreviewJumpsRpc
:FzfPreviewJumps
:CocCommand fzf-preview.Jumps
     Select and open the jumplist

                                                *:FzfPreviewChanges*
:FzfPreviewChangesRpc
:FzfPreviewChanges
:CocCommand fzf-preview.Changes
     Select and open the changelist

                                                *:FzfPreviewMarks*
:FzfPreviewMarksRpc
:FzfPreviewMarks
:CocCommand fzf-preview.Marks
     List marks from the project.
     The retrieved result is displayed in file name, number of lines.
     The same script as FzfPreviewProjectGrep is used for preview.

                                                *:FzfPreviewFromResources*
:FzfPreviewFromResourcesRpc
:FzfPreviewFromResources
:CocCommand fzf-preview.FromResources
     Select a resource and generate a file list.
     From there, select the file using the fzf interface.

     Resources: [project, git, directory, buffer, project_old,
                 project_mru, project_mrw, old, mru, mrw]

                                                *:FzfPreviewCommandPalette*
:FzfPreviewCommandPaletteRpc
:FzfPreviewCommandPalette
:CocCommand fzf-preview.CommandPalette
     Execute and edit command history

                                                *:FzfPreviewGrepHelp*
:FzfPreviewGrepHelpRpc
:FzfPreviewGrepHelp
:CocCommand fzf-preview.GrepHelp
     Grep vim help.

                                                *:FzfPreviewGitStatus*
:FzfPreviewGitStatusRpc
:FzfPreviewGitStatus
:CocCommand fzf-preview.GitStatus
     Git status integration.

                                                *:FzfPreviewGitActions*
:FzfPreviewGitActionsRpc
:FzfPreviewGitActions
:CocCommand fzf-preview.GitActions
     Interactive git integration.
     Select resource and action.

                                                *:FzfPreviewVistaCtags*
:FzfPreviewVistaCtagsRpc
:FzfPreviewVistaCtags
:CocCommand fzf-preview.VistaCtags
     Select tags from vista.vim.
     Required: vista.vim

                                                *:FzfPreviewVistaBufferCtags*
:FzfPreviewVistaBufferCtagsRpc
:FzfPreviewVistaBufferCtags
:CocCommand fzf-preview.VistaBufferCtags
     Select current buffer tags from vista.vim.
     Required: vista.vim

                                                *:FzfPreviewNvimLspReferences*
:FzfPreviewNvimLspReferencesRpc
:FzfPreviewNvimLspReferences
     Select and open the references from nvim-lsp.

                                                *:FzfPreviewNvimLspDiagnostics*
:FzfPreviewNvimLspDiagnosticsRpc
:FzfPreviewNvimLspDiagnostics
     Select and open the diagnostics from nvim-lsp.

                                                *:FzfPreviewNvimLspCurrentDiagnostics*
:FzfPreviewNvimLspCurrentDiagnosticsRpc
:FzfPreviewNvimLspCurrentDiagnostics
     Select and open the current file diagnostics from nvim-lsp.

                                                *:FzfPreviewNvimLspDefinitions*
:FzfPreviewNvimLspDefinitionRpc
:FzfPreviewNvimLspDefinition
     Select and open the definitions from nvim-lsp.

                                                *:FzfPreviewNvimLspTypeDefinitions*
:FzfPreviewNvimLspTypeDefinitionsRpc
:FzfPreviewNvimLspTypeDefinition
     Select and open the type definitions from nvim-lsp.

                                                *:FzfPreviewNvimLspImplementations*
:FzfPreviewNvimLspImplementationsRpc
:FzfPreviewNvimLspImplementations
     Select and open the implementations from nvim-lsp.

                                                *:FzfPreviewVimLspReferences*
:FzfPreviewVimLspReferencesRpc
:FzfPreviewVimLspReferences
     Select and open the references from vim-lsp.

                                                *:FzfPreviewVimLspDiagnostics*
:FzfPreviewVimLspDiagnosticsRpc
:FzfPreviewVimLspDiagnostics
     Select and open the diagnostics from vim-lsp.

                                                *:FzfPreviewVimLspCurrentDiagnostics*
:FzfPreviewVimLspCurrentDiagnosticsRpc
:FzfPreviewVimLspCurrentDiagnostics
     Select and open the current file diagnostics from vim-lsp.

                                                *:FzfPreviewVimLspDefinitions*
:FzfPreviewVimLspDefinitionRpc
:FzfPreviewVimLspDefinition
     Select and open the definitions from vim-lsp.

                                                *:FzfPreviewVimLspTypeDefinitions*
:FzfPreviewVimLspTypeDefinitionsRpc
:FzfPreviewVimLspTypeDefinition
     Select and open the type definitions from vim-lsp.

                                                *:FzfPreviewVimLspImplementations*
:FzfPreviewVimLspImplementationsRpc
:FzfPreviewVimLspImplementations
     Select and open the implementations from vim-lsp.

                                                *:FzfPreviewBookmarks*
:FzfPreviewBookmarksRpc
:FzfPreviewBookmarks
:CocCommand fzf-preview.Bookmarks
     Select and open the bookmarks from vim-bookmarks

                                                *:FzfPreviewYankround*
:FzfPreviewYankroundRpc
:FzfPreviewYankround
:CocCommand fzf-preview.Yankround
     Select register history and insert " register from yankround.vim
     Use register processes.

                                                *:FzfPreviewMemoList*
:FzfPreviewMemoListRpc
:FzfPreviewMemoList
:CocCommand fzf-preview.MemoList
     Select memolist and open from memolist.vim.

                                                *:FzfPreviewMemoListGrep*
:FzfPreviewMemoListGrepRpc
:FzfPreviewMemoListGrep
:CocCommand fzf-preview.MemoListGrep
     Grep memolist and open from memolist.vim.

                                                *:FzfPreviewTodoComments*
:FzfPreviewTodoCommentsRpc
:FzfPreviewTodoComments
:CocCommand fzf-preview.TodoComments
     Search TodoComments from todo-comments.nvim

                                                *:FzfPreviewBlamePR*
:FzfPreviewBlamePRRpc
:FzfPreviewBlamePR
:CocCommand fzf-preview.BlamePR
     The PR corresponding to each line is displayed and
     the selected PR is opened in the browser.
     Use open-pr processes.

                                                *:FzfPreviewCocReferences*
:CocCommand fzf-preview.CocReferences
     Select and open the references from coc.nvim.
     Only coc extensions.

                                                *:FzfPreviewCocDiagnostics*
:CocCommand fzf-preview.CocDiagnostics
     Select and open the diagnostics from coc.nvim.
     Only coc extensions.

                                                *:FzfPreviewCocCurrentDiagnostics*
:CocCommand fzf-preview.CocCurrentDiagnostics
     Select and open the current file diagnostics from coc.nvim.
     Only coc extensions.

                                                *:FzfPreviewCocDefinition*
:CocCommand fzf-preview.CocDefinition
     Select and open the definitions from coc.nvim.
     Only coc extensions.

                                                *:FzfPreviewCocTypeDefinition*
:CocCommand fzf-preview.CocTypeDefinition
     Select and open the type definitions from coc.nvim.
     Only coc extensions.

                                                *:FzfPreviewCocImplementations*
:CocCommand fzf-preview.CocImplementations
     Select and open the implementations from coc.nvim.
     Only coc extensions.

                                                *:FzfPreviewCocOutline*
:CocCommand fzf-preview.CocOutline
     Select and open the outline from coc.nvim.
     Only coc extensions.

==============================================================================
COMMAND OPTIONS                                 *fzf-preview-command-options*

--processes
    Set process when selecting element with fzf started by this command.
    Value must be a global variable name.
    Variable is dictionary and format is
    same as get from |fzf_preview#remote#process#get_default_processes|.

    Most command pass a file paths to the process.
    FzfPreviewAllBuffers will be passed “buffer {bufnr}”

    Value example: let g:foo_processes = {
                   \ 'enter':  'FzfPreviewOpenFileEnter',
                   \ 'ctrl-x': get(function('s:foo_function'), 'name'),
                   \ }

--add-fzf-arg
    Set the arguments to be passed when executing fzf.
    This value is added to the default options.
    Value must be a string without spaces.

    Usage example: Exclude filename with FzfPreviewProjectGrep
>
    nnoremap <Leader>g :<C-u>FzfPreviewProjectGrep --add-fzf-arg=--nth=3<Space>
    " nnoremap <Leader>g :<C-u>CocCommand fzf-preview.ProjectGrep --add-fzf-arg=--nth=3<Space>
<

--resume
    Reuse the input that was last used to select the element with fzf.
    Do not need to pass a value for this option.

    Usage example: Reuse last query for project grep.
>
    nnoremap <Leader>G :<C-u>FzfPreviewProjectGrep . --resume<Space>
    " nnoremap <Leader>G :<C-u>CocCommand fzf-preview.ProjectGrep . --resume<Space>
<

==============================================================================
OPTIONS                                         *fzf-preview-options*

*g:fzf_preview_floating_window_rate*
    This value is used for the size of the floating window.
    The size of the floating window is the size of the vim multiplied
    by this value.
    Set between 0 and 1.

    Default value is 0.9


*g:fzf_preview_direct_window_option*
    This value is used to position the window.
    It is passed to the window option of |fzf#run|, and
    |g:fzf_preview_floating_window_rate| is disabled.

    Default value is ''


*g:fzf_preview_default_fzf_options*
    It is used as the default option when starting fzf.
    Set a dictionary variable whose option name is key.
    The string you pass to value is automatically enclosed in double quotes.
    If the value to be passed to the option is empty, set v:true.

    Default value is  { '--reverse': v:true, '--preview-window': 'wrap' }


*g:fzf_preview_quit_map*
    If this value is 1, mapping that will safely quit
    in fzf's normal mode and visual mode is added

    Default value is 1


*g:fzf_preview_command*
    Shell command used for fzf preview. The head command is used by default.
    If the bat command is installed, the bat is used by default and
    the preview is syntax highlighted.

    Not installed bat:
        Default value is 'cat'

    Installed bat:
        Default value is 'bat --color=always --plain {-1}'


*g:fzf_preview_if_binary_command*
    g:fzf_binary_preview_command is executed if this command succeeds,
    and g:fzf_preview_command is executed if it fails

    Default value is '[[ "$(file --mime {})" =~ binary ]]'


*g:fzf_binary_preview_command*
    Shell command used for binary file preview.
    Since it is heavy to display in text, if there is no particular reason,
    echo etc. substitute.

    Default value is 'echo "{} is a binary file"'


*g:fzf_preview_filelist_command*
    This is the command used to search for files in the project.
    If ripgrep is not included, git ls-files will be used.

    Installed ripgrep:
        Default value is 'rg --files --hidden --follow --no-messages --glob "!.git/*" --glob \!"* *"'

    Not installed ripgrep:
        Default value is 'git ls-files --exclude-standard'

*g:fzf_preview_git_files_command*
    This is the command used to search for files in the git repository.

    Default value is 'git ls-files --exclude-standard'


*g:fzf_preview_directory_files_command*
    This is the command used to search for files in the current directory.

    Default value is 'rg --files --hidden --follow --no-messages -g \!"* *"'

    Keep in mind a path can be append at the end of the command.


*g:fzf_preview_git_status_command*
    This is the command used to git status files

    Default value is 'git -c color.status=always status --short --untracked-files=all'


*g:fzf_preview_git_status_preview_command*
    This is the command used to git status preview

    Default value is  "[[ $(git diff --cached -- {-1}) != \"\" ]] && git diff --cached --color=always -- {-1} || " .
                    \ "[[ $(git diff -- {-1}) != \"\" ]] && git diff --color=always -- {-1} || " .
                    \ g:fzf_preview_command


*g:fzf_preview_grep_cmd*
    This command is used for project grep.
    Recommend using a fast grep command such as ripgrep or ag.
    Interactively grep the specified directory.

    Installed ripgrep:
        Default value is 'rg --line-number --no-heading --color=never --hidden'

    Not installed ripgrep:
        :ProjectGrepPreview is disabled.


*g:fzf_preview_cache_directory*
    Specify the directory to store the MRU and MRW cache files.

    Default value is 'expand('~/.cache/vim/fzf_preview')'


*g:fzf_preview_disable_mru*
    If this value is not 0, disable mru and mrw.

    Default value is 0


*g:fzf_preview_mru_limit*
    Limit of the number of files to be saved by mru.

    Default value is 1000


*g:fzf_preview_lines_command*
    This command is used for get current file lines.

    Installed bat:
        Default value is 'bat --color=always --plain --number'

    Not installed bat:
        Default value is 'cat -n'


*g:fzf_preview_grep_preview_cmd*
    This command is used for :ProjectGrepPreview. bin/preview.rb is used by default.

    Default value is 'expand("<sfile>:h:h") . "/bin/preview.rb"'


*g:fzf_preview_preview_key_bindings*
    This command determines keyboard shortcuts during an interactive FZF
    session. Options are a string passed directly to fzf's "--bind" option.

    Default value is ''


*g:fzf_preview_fzf_color_option*
    Specify the color option to be passed to the fzf command.
    Options are a string passed directly to fzf's "--color" option.

    Default value is ''


*g:fzf_preview_custom_processes*
    Set the custom processes.
    Dictionary format is { '{processes_name}': { '{input_key}': |String|(Global function name) } }
    Default child value can be get with |fzf_preview#remote#process#get_default_processes|

    Default value is {}

    Example:  {
                'open-file': {
                  'ctrl-o': 'FzfPreviewOpenFileCtrlO',
                  'ctrl-q': 'FzfPreviewOpenFileCtrlQ',
                  'ctrl-t': 'FzfPreviewOpenFileCtrlT',
                  'ctrl-v': 'FzfPreviewOpenFileCtrlV',
                  'ctrl-x': 'FzfPreviewOpenFileCtrlX',
                  'enter': 'FzfPreviewOpenFileEnter'
                },
                'register': {
                  'enter': 'FzfPreviewRegisterEnter'
                }
              }


*g:fzf_preview_fzf_preview_window_option*
    Used as fzf preview-window option

    For example, 'up:30%'

    Default value is ''


*g:fzf_preview_use_dev_icons*
    If this value is 1, devicons is used as fzf candidate.

    Default value is 0


*g:fzf_preview_history_dir*
    If this value is directory path, use the files in the target directory
    and the fzf history option will be enabled.

    For example, '~/.fzf'

    Default value is false


*g:fzf_preview_dev_icon_prefix_string_length*
    Set how many string length devicon is represented.

    Default value is 3


*g:fzf_preview_dev_icons_limit*
    Devicons can make fzf-preview slow when the number of results is high.
    By default icons are disable when number of results is higher this value.

    Default value is 5000


*g:fzf_preview_yankround_preview_command*
    Command to preview yankround history.

    Defaul value is expand('<sfile>:h:h') . '/bin/preview_yankround_register'

*g:fzf_preview_blame_pr_command*
    Command to FzfPreviewBlamePR source.

    Defaul value is expand('<sfile>:h:h') . '/bin/git_blame_pr'

*g:fzf_preview_update_statusline*
    If true, statusline is updated during fzf-preview startup.

    Defaul value is true

*$FZF_PREVIEW_PREVIEW_BAT_THEME*
    The theme used in the bat preview.
    Default value is 'OneHalfDark'

*$FZF_PREVIEW_PLUGIN_HELP_ROOT_DIR*
    The root directory to be searched by GrepHelp.
    Default value is ''


==============================================================================
FUNCTIONS                                       *fzf-preview-functions*

*fzf_preview#remote#process#get_default_processes*
    Get the initial value of the processes.
    Args is {process_name} and {plugin_type (optional)}.
    processes_name is 'open-file', 'open-buffer' and 'open-bufnr'.
    plugin_type is 'remote', 'coc' or 'rpc'. Default value is 'remote'.

    value from 'open-file' (and 'remote') is
      {
        'ctrl-o': 'FzfPreviewOpenFileCtrlO',
        'ctrl-q': 'FzfPreviewOpenFileCtrlQ',
        'ctrl-t': 'FzfPreviewOpenFileCtrlT',
        'ctrl-v': 'FzfPreviewOpenFileCtrlV',
        'ctrl-x': 'FzfPreviewOpenFileCtrlX',
        'enter': 'FzfPreviewOpenFileEnter'
      }

    value from 'open-file' and 'coc' is
      {
        'ctrl-o': 'OpenFileCtrlO',
        'ctrl-q': 'OpenFileCtrlQ',
        'ctrl-t': 'OpenFileCtrlT',
        'ctrl-v': 'OpenFileCtrlV',
        'ctrl-x': 'OpenFileCtrlX',
        'enter': 'OpenFileEnter'
      }

    value from 'open-file' and 'rpc' is
      {
        'ctrl-o': 'FzfPreviewOpenFileCtrlO',
        'ctrl-q': 'FzfPreviewOpenFileCtrlQ',
        'ctrl-t': 'FzfPreviewOpenFileCtrlT',
        'ctrl-v': 'FzfPreviewOpenFileCtrlV',
        'ctrl-x': 'FzfPreviewOpenFileCtrlX',
        'enter': 'FzfPreviewOpenFileEnter'
      }

==============================================================================
USER AUTOCMD EVENTS                        *fzf-preview-user-autocmd-events*

*fzf_preview#remote#initialized*
    Runs when initialization of the Remote Plugin is complete.

*fzf_preview#rpc#initialized*
    Runs when initialization of the Vim script RPC is complete.

*fzf_preview#coc#initialized*
    Runs when initialization of the coc extensions is complete.

Deprecated
*fzf_preview#initialized*
    Runs when initialization of the Remote Plugin, coc extensions and
    Vim script RPC is complete.

==============================================================================
BASE DEFAULT KEYMAP                             *fzf-preview-keymap*

<C-g>, <Esc>
  - Cancel fzf

<C-x>
  - Open split

<C-v>
  - Open vsplit

<C-t>
  - Open tabedit

<C-o>
  - Open drop

<C-q>
  - Build QuickFix from open-file processes.
  - Execute :bdelete! command from open-buffer and open-bufnr processes.

<C-d>
  - Preview page down

<C-u>
  - Preview page up

?
  - Toggle Preview

==============================================================================
EXAMPLE                                         *fzf-preview-mappings*

Here is mapping example.
>
    nnoremap <silent> <Leader>p :<C-u>FzfPreviewProjectFiles<CR>
    nnoremap <silent> <Leader>b :<C-u>FzfPreviewBuffers<CR>
    nnoremap <silent> <Leader>m :<C-u>FzfPreviewProjectOldFiles<CR>
    nnoremap <silent> <Leader>M :<C-u>FzfPreviewOldFiles<CR>
<
vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap:


================================================
FILE: jest.config.ts
================================================
import type { Config } from "@jest/types"

const config: Config.InitialOptions = {
  verbose: true,
  preset: "ts-jest/presets/js-with-ts",
  transform: {
    "^.+\\.ts$": "ts-jest",
  },
  moduleNameMapper: {
    "^@/(.*)$": "<rootDir>/src/$1",
  },
  testMatch: ["**/*.test.ts"],
  restoreMocks: true,
  clearMocks: true,
  resetMocks: true,
}

export default config


================================================
FILE: lua/fzf-preview/init.lua
================================================
local M = {}

local lsp = vim.lsp

function M.nvim_lsp_references()
  vim.g.fzf_preview_nvim_lsp_references = nil

  local method = 'textDocument/references'
  ---@diagnostic disable-next-line: missing-parameter
  local params = lsp.util.make_position_params()
  params.context = { includeDeclaration = false }
  local response = lsp.buf_request_sync(0, method, params, 1000)

  if response == nil or vim.tbl_isempty(response) then
    print('No location found: ' .. method)
    return
  end

  local result = {}
  for _, v in pairs(response) do
    vim.list_extend(result, v.result)
  end
  vim.g.fzf_preview_nvim_lsp_references = result
end

function M.nvim_lsp_diagnostics()
  vim.g.fzf_preview_nvim_lsp_diagnostics = vim.diagnostic.get()
end

function M.nvim_lsp_current_diagnostics()
  vim.g.fzf_preview_nvim_lsp_current_diagnostics = vim.diagnostic.get(0)
end

function M.nvim_lsp_definition()
  vim.g.fzf_preview_nvim_lsp_definition = nil

  local method = 'textDocument/definition'
  ---@diagnostic disable-next-line: missing-parameter
  local params = lsp.util.make_position_params()
  local response = lsp.buf_request_sync(0, method, params, 1000)

  if response == nil or vim.tbl_isempty(response) then
    print('No location found: ' .. method)
    return
  end

  local result = {}
  for _, v in pairs(response) do
    vim.list_extend(result, v.result)
  end
  vim.g.fzf_preview_nvim_lsp_definition = result
end

function M.nvim_lsp_type_definition()
  vim.g.fzf_preview_nvim_lsp_type_definition = nil

  local method = 'textDocument/typeDefinition'
  ---@diagnostic disable-next-line: missing-parameter
  local params = lsp.util.make_position_params()
  local response = lsp.buf_request_sync(0, method, params, 1000)

  if response == nil or vim.tbl_isempty(response) then
    print('No location found: ' .. method)
    return
  end

  local result = {}
  for _, v in pairs(response) do
    vim.list_extend(result, v.result)
  end
  vim.g.fzf_preview_nvim_lsp_type_definition = result
end

function M.nvim_lsp_implementations()
  vim.g.fzf_preview_nvim_lsp_implementations = nil

  local method = 'textDocument/implementation'
  ---@diagnostic disable-next-line: missing-parameter
  local params = lsp.util.make_position_params()
  local response = lsp.buf_request_sync(0, method, params, 1000)

  if response == nil or vim.tbl_isempty(response) then
    print('No location found: ' .. method)
    return
  end

  local result = {}
  for _, v in pairs(response) do
    vim.list_extend(result, v.result)
  end
  vim.g.fzf_preview_nvim_lsp_implementations = result
end

return M


================================================
FILE: package.json
================================================
{
  "name": "coc-fzf-preview",
  "version": "2.16.6",
  "description": "The plugin that powerfully integrates fzf and (Neo)vim. It is also possible to integrate with coc.nvim.",
  "author": "yuki-yano",
  "license": "MIT",
  "repository": {
    "url": "git@github.com:yuki-yano/fzf-preview.vim"
  },
  "main": "./lib/coc.js",
  "files": [
    "lib/coc.js",
    "autoload",
    "plugin",
    "bin"
  ],
  "keywords": [
    "coc.nvim",
    "fzf"
  ],
  "engines": {
    "coc": "^0.0.80",
    "node": ">=12.0.0"
  },
  "activationEvents": [
    "*"
  ],
  "scripts": {
    "build": "npm-run-all --parallel build:*",
    "build:remote": "yarn run webpack --config webpack.remote.ts",
    "build:coc": "yarn run webpack --config webpack.coc.ts",
    "build:rpc": "yarn run webpack --config webpack.rpc.ts",
    "build:preview-script": "yarn run webpack --config webpack.preview.ts",
    "dev": "npm-run-all --parallel dev:*",
    "dev:remote": "yarn run webpack --watch --config webpack.remote.ts",
    "dev:coc": "yarn run webpack --watch --config webpack.coc.ts",
    "dev:rpc": "yarn run webpack --watch --config webpack.rpc.ts",
    "release-build:remote": "yarn run clean && yarn run build:remote --mode=production",
    "release-build:coc": "yarn run clean && yarn run build:coc --mode=production",
    "release-build:rpc": "yarn run clean && yarn run build:rpc --mode=production",
    "typecheck": "tsc --noEmit",
    "typecheck:watch": "tsc --noEmit --watch",
    "lint": "eslint --ext .ts src",
    "lint:fix": "eslint --ext .ts --fix src",
    "lint:watch": "esw --watch --color --clear --ext .ts src",
    "prettier": "prettier --check src/**/*.ts",
    "prettier:fix": "prettier --write src/**/*.ts",
    "test": "jest",
    "test:watch": "jest --watch",
    "cli": "ts-node --files -r tsconfig-paths/register",
    "clean": "rimraf lib rplugin/node/fzf-preview.vim/index.js",
    "print-version": "cat package.json | yarn run --silent json version"
  },
  "dependencies": {
    "@reduxjs/toolkit": "^1.8.5",
    "camelcase": "^6.3.0",
    "chalk": "^5.0.1",
    "coc.nvim": "^0.0.82",
    "expand-tilde": "^2.0.2",
    "immer": "^9.0.15",
    "lodash": "^4.17.20",
    "neovim": "^4.10.1",
    "printf": "^0.6.0",
    "redux": "^4.2.0",
    "strip-ansi": "^7.0.1",
    "type-fest": "^2.19.0",
    "uuid": "^9.0.0",
    "vscode-jsonrpc": "^8.0.2",
    "vscode-languageserver-types": "^3.17.2",
    "yargs": "^17.5.1"
  },
  "devDependencies": {
    "@jest/types": "^29.0.3",
    "@types/eslint": "^8.4.6",
    "@types/expand-tilde": "^2.0.0",
    "@types/jest": "^29.0.1",
    "@types/lodash": "^4.14.185",
    "@types/node": "^18.7.16",
    "@types/prettier": "^2.7.0",
    "@types/rimraf": "^3.0.2",
    "@types/uuid": "^8.3.4",
    "@types/webpack": "^5.28.0",
    "@types/webpack-merge": "^5.0.0",
    "@types/yargs": "^17.0.12",
    "@typescript-eslint/eslint-plugin": "^5.36.2",
    "@typescript-eslint/parser": "^5.36.2",
    "can-npm-publish": "^1.3.6",
    "eslint": "^8.23.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-import-resolver-typescript": "^3.5.1",
    "eslint-plugin-eslint-comments": "^3.2.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jest": "^27.0.4",
    "eslint-plugin-n": "^15.2.5",
    "eslint-plugin-simple-import-sort": "^8.0.0",
    "eslint-watch": "^8.0.0",
    "jest": "^29.0.3",
    "json": "^11.0.0",
    "npm-run-all": "^4.1.5",
    "prettier": "^2.7.1",
    "rimraf": "^3.0.2",
    "ts-jest": "^29.0.0",
    "ts-loader": "^9.3.1",
    "ts-node": "^10.9.1",
    "tsconfig-paths": "^4.1.0",
    "typescript": "^4.8.3",
    "webpack": "^5.74.0",
    "webpack-cli": "^4.10.0",
    "webpack-merge": "^5.8.0"
  }
}


================================================
FILE: plugin/fzf_preview.vim
================================================
scriptencoding utf-8

if exists('s:loaded')
  finish
endif
let s:loaded = 1

if !exists('$FZF_PREVIEW_PREVIEW_BAT_THEME')
  let $FZF_PREVIEW_PREVIEW_BAT_THEME = 'OneHalfDark'
endif

let s:bat_theme_option = '--theme=' . $FZF_PREVIEW_PREVIEW_BAT_THEME

if !exists('g:fzf_preview_floating_window_rate')
  let g:fzf_preview_floating_window_rate = 0.9
endif

if !exists('g:fzf_preview_direct_window_option')
  let g:fzf_preview_direct_window_option = ''
endif

if !exists('g:fzf_preview_default_fzf_options')
  let g:fzf_preview_default_fzf_options = {
  \ '--reverse': v:true,
  \ '--preview-window': 'wrap',
  \ }
endif

if !exists('g:fzf_preview_quit_map')
  let g:fzf_preview_quit_map = 1
endif

if !exists('g:fzf_preview_command')
  if executable('bat')
    let g:fzf_preview_command = 'bat ' . s:bat_theme_option . ' --color=always --plain --number {-1}'
  else
    let g:fzf_preview_command = 'head -100 {-1}'
  endif
endif

if !exists('g:fzf_preview_if_binary_command')
  let g:fzf_preview_if_binary_command = '[[ "$(file --mime {})" =~ binary ]]'
endif

if !exists('g:fzf_binary_preview_command')
  let g:fzf_binary_preview_command = 'echo "{} is a binary file"'
endif

if !exists('g:fzf_preview_filelist_command')
  if executable('rg')
    let g:fzf_preview_filelist_command = "rg --files --hidden --no-messages --glob '!.git/*' --glob \!'* *'"
  else
    let g:fzf_preview_filelist_command = 'git ls-files --exclude-standard'
  endif
endif

if !exists('g:fzf_preview_git_files_command')
  let g:fzf_preview_git_files_command = 'git ls-files --exclude-standard'
endif

if !exists('g:fzf_preview_directory_files_command')
  let g:fzf_preview_directory_files_command = 'rg --files --hidden --no-messages -g \!"* *"'
endif

if !exists('g:fzf_preview_git_status_command')
  let g:fzf_preview_git_status_command = 'git -c color.status=always status --short --untracked-files=all'
endif

if !exists('g:fzf_preview_git_status_preview_command')
  let g:fzf_preview_git_status_preview_command =  '[[ $(git diff --cached -- {-1}) != "" ]] && git diff --cached --color=always -- {-1} || ' .
  \ '[[ $(git diff -- {-1}) != "" ]] && git diff --color=always -- {-1} || ' .
  \ g:fzf_preview_command
endif

if !exists('g:fzf_preview_grep_cmd')
  let g:fzf_preview_grep_cmd = 'rg --line-number --no-heading --color=never --hidden'
endif

if !exists('g:fzf_preview_lines_command')
  if executable('bat')
    let g:fzf_preview_lines_command = 'bat ' . s:bat_theme_option . ' --color=always --plain --number'
  else
    let g:fzf_preview_lines_command = 'cat -n'
  endif
endif

if !exists('g:fzf_preview_grep_preview_cmd')
  let g:fzf_preview_grep_preview_cmd = expand('<sfile>:h:h') . '/bin/preview_fzf_grep'
endif

if !exists('g:fzf_preview_disable_mru')
  let g:fzf_preview_disable_mru = 0
endif

if !exists('g:fzf_preview_mru_limit')
  let g:fzf_preview_mru_limit = 1000
endif

if !exists('g:fzf_preview_cache_directory')
  let g:fzf_preview_cache_directory = expand('~/.cache/vim/fzf_preview')
endif

if !exists('g:fzf_preview_fzf_color_option')
  let g:fzf_preview_fzf_color_option = ''
endif

if !exists('g:fzf_preview_custom_processes')
  let g:fzf_preview_custom_processes = {}
endif

if !exists('g:fzf_preview_fzf_preview_window_option')
  let g:fzf_preview_fzf_preview_window_option = ''
endif

if !exists('g:fzf_preview_preview_key_bindings')
  let g:fzf_preview_preview_key_bindings = ''
endif

if !exists('g:fzf_preview_history_dir')
  let g:fzf_preview_history_dir = v:false
endif

if !exists('g:fzf_preview_buffers_jump')
  let g:fzf_preview_buffers_jump = 0
endif

if !exists('g:fzf_preview_use_dev_icons')
  let g:fzf_preview_use_dev_icons = 0
endif

if !exists('g:fzf_preview_dev_icon_prefix_string_length')
  let g:fzf_preview_dev_icon_prefix_string_length = 3
endif

if !exists('g:fzf_preview_dev_icons_limit')
  let g:fzf_preview_dev_icons_limit = 5000
endif

if !exists('g:fzf_preview_yankround_preview_command')
  let g:fzf_preview_yankround_preview_command = expand('<sfile>:h:h') . '/bin/preview_yankround_register'
endif

if !exists('g:fzf_preview_blame_pr_command')
  let g:fzf_preview_blame_pr_command = expand('<sfile>:h:h') . '/bin/git_blame_pr'
endif

if !exists('g:fzf_preview_update_statusline')
  let g:fzf_preview_update_statusline = v:true
endif

let g:fzf_preview_script_dir = expand('<sfile>:h:h') . '/bin'

let s:save_cpo = &cpoptions
set cpoptions&vim

command! FzfPreviewInstall :call fzf_preview#install()

augroup fzf_preview_buffers
  autocmd!
  if g:fzf_preview_quit_map
    autocmd FileType fzf tnoremap <silent> <buffer> <Esc> <C-g>
    autocmd FileType fzf nnoremap <silent> <buffer> <C-g> i<C-g>
    autocmd FileType fzf vnoremap <silent> <buffer> <C-g> <Esc>i<C-g>
  endif
augroup END

augroup fzf_preview_mr
  autocmd!

  if g:fzf_preview_disable_mru == 0
    autocmd BufEnter,VimEnter,BufWinEnter,BufWritePost * call s:mru_append(expand('<amatch>'))
    autocmd BufWritePost * call s:mrw_append(expand('<amatch>'))
  endif
augroup END

function! s:mru_append(path) abort
  if s:enable_file(a:path)
    call fzf_preview#remote#mr#append(a:path, fzf_preview#remote#mr#mru_file_path())
  endif
endfunction

function! s:mrw_append(path) abort
  if s:enable_file(a:path)
    call fzf_preview#remote#mr#append(a:path, fzf_preview#remote#mr#mrw_file_path())
  endif
endfunction

function! s:enable_file(path) abort
  if bufnr('%') != expand('<abuf>') || a:path == ''
    return v:false
  else
    return v:true
  endif
endfunction

augroup fzf_preview_initialized
  autocmd!
  autocmd VimEnter *       call s:doautocmd_from_remote()
  autocmd User CocNvimInit call s:doautocmd_from_coc()
  autocmd VimEnter *       call s:doautocmd_from_rpc()

  autocmd FileType fzf call fzf_preview#remote#window#set_fzf_last_query()

  autocmd FileType fzf call fzf_preview#remote#window#set_status_line(v:false)
augroup END

function! s:doautocmd_from_remote() abort
  if exists(':FzfPreviewRemoteEnvironment')
    let g:fzf_preview_has_remote = v:true
    silent doautocmd User fzf_preview#initialized
    silent doautocmd User fzf_preview#remote#initialized
  endif
endfunction

function! s:doautocmd_from_coc() abort
  silent doautocmd User fzf_preview#initialized
  silent doautocmd User fzf_preview#coc#initialized
endfunction

function! s:doautocmd_from_rpc() abort
  call fzf_preview#rpc#initialize()
endfunction

command! -nargs=? FzfPreviewProjectFilesRpc call fzf_preview#rpc#command('FzfPreviewProjectFiles', <f-args>)
command! -nargs=? FzfPreviewGitFilesRpc call fzf_preview#rpc#command('FzfPreviewGitFiles', <f-args>)
command! -nargs=? FzfPreviewDirectoryFilesRpc call fzf_preview#rpc#command('FzfPreviewDirectoryFiles', <f-args>)
command! -nargs=? FzfPreviewBuffersRpc call fzf_preview#rpc#command('FzfPreviewBuffers', <f-args>)
command! -nargs=? FzfPreviewAllBuffersRpc call fzf_preview#rpc#command('FzfPreviewAllBuffers', <f-args>)
command! -nargs=? FzfPreviewProjectOldFilesRpc call fzf_preview#rpc#command('FzfPreviewProjectOldFiles', <f-args>)
command! -nargs=? FzfPreviewProjectMruFilesRpc call fzf_preview#rpc#command('FzfPreviewProjectMruFiles', <f-args>)
command! -nargs=? FzfPreviewProjectMrwFilesRpc call fzf_preview#rpc#command('FzfPreviewProjectMrwFiles', <f-args>)
command! -nargs=? FzfPreviewLinesRpc call fzf_preview#rpc#command('FzfPreviewLines', <f-args>)
command! -nargs=? FzfPreviewBufferLinesRpc call fzf_preview#rpc#command('FzfPreviewBufferLines', <f-args>)
command! -nargs=? FzfPreviewCtagsRpc call fzf_preview#rpc#command('FzfPreviewCtags', <f-args>)
command! -nargs=? FzfPreviewBufferTagsRpc call fzf_preview#rpc#command('FzfPreviewBufferTags', <f-args>)
command! -nargs=? FzfPreviewOldFilesRpc call fzf_preview#rpc#command('FzfPreviewOldFiles', <f-args>)
command! -nargs=? FzfPreviewMruFilesRpc call fzf_preview#rpc#command('FzfPreviewMruFiles', <f-args>)
command! -nargs=? FzfPreviewMrwFilesRpc call fzf_preview#rpc#command('FzfPreviewMrwFiles', <f-args>)
command! -nargs=? FzfPreviewQuickFixRpc call fzf_preview#rpc#command('FzfPreviewQuickFix', <f-args>)
command! -nargs=? FzfPreviewLocationListRpc call fzf_preview#rpc#command('FzfPreviewLocationList', <f-args>)
command! -nargs=? FzfPreviewJumpsRpc call fzf_preview#rpc#command('FzfPreviewJumps', <f-args>)
command! -nargs=? FzfPreviewChangesRpc call fzf_preview#rpc#command('FzfPreviewChanges', <f-args>)
command! -nargs=? FzfPreviewMarksRpc call fzf_preview#rpc#command('FzfPreviewMarks', <f-args>)
command! -nargs=? FzfPreviewProjectGrepRpc call fzf_preview#rpc#command('FzfPreviewProjectGrep', <f-args>)
command! -nargs=? FzfPreviewProjectGrepRecallRpc call fzf_preview#rpc#command('FzfPreviewProjectGrepRecall', <f-args>)
command! -nargs=? FzfPreviewFromResourcesRpc call fzf_preview#rpc#command('FzfPreviewFromResources', <f-args>)
command! -nargs=? FzfPreviewCommandPaletteRpc call fzf_preview#rpc#command('FzfPreviewCommandPalette', <f-args>)
command! -nargs=1 FzfPreviewGrepHelpRpc call fzf_preview#rpc#command('FzfPreviewGrepHelp', <f-args>)
command! -nargs=? FzfPreviewGitActionsRpc call fzf_preview#rpc#command('FzfPreviewGitActions', <f-args>)
command! -nargs=? FzfPreviewGitStatusRpc call fzf_preview#rpc#command('FzfPreviewGitStatus', <f-args>)
command! -nargs=? FzfPreviewGitStatusActionsRpc call fzf_preview#rpc#command('FzfPreviewGitStatusActions', <f-args>)
command! -nargs=? FzfPreviewGitBranchesRpc call fzf_preview#rpc#command('FzfPreviewGitBranches', <f-args>)
command! -nargs=? FzfPreviewGitBranchActionsRpc call fzf_preview#rpc#command('FzfPreviewGitBranchActions', <f-args>)
command! -nargs=? FzfPreviewGitLogsRpc call fzf_preview#rpc#command('FzfPreviewGitLogs', <f-args>)
command! -nargs=? FzfPreviewGitCurrentLogsRpc call fzf_preview#rpc#command('FzfPreviewGitCurrentLogs', <f-args>)
command! -nargs=? FzfPreviewGitLogActionsRpc call fzf_preview#rpc#command('FzfPreviewGitLogActions', <f-args>)
command! -nargs=? FzfPreviewGitStashesRpc call fzf_preview#rpc#command('FzfPreviewGitStashes', <f-args>)
command! -nargs=? FzfPreviewGitStashActionsRpc call fzf_preview#rpc#command('FzfPreviewGitStashActions', <f-args>)
command! -nargs=? FzfPreviewGitReflogsRpc call fzf_preview#rpc#command('FzfPreviewGitReflogs', <f-args>)
command! -nargs=? FzfPreviewGitReflogActionsRpc call fzf_preview#rpc#command('FzfPreviewGitReflogActions', <f-args>)
command! -nargs=? FzfPreviewVimLspReferencesRpc call fzf_preview#rpc#command('FzfPreviewVimLspReferences', <f-args>)
command! -nargs=? FzfPreviewVimLspDiagnosticsRpc call fzf_preview#rpc#command('FzfPreviewVimLspDiagnostics', <f-args>)
command! -nargs=? FzfPreviewVimLspCurrentDiagnosticsRpc call fzf_preview#rpc#command('FzfPreviewVimLspCurrentDiagnostics', <f-args>)
command! -nargs=? FzfPreviewVimLspDefinitionRpc call fzf_preview#rpc#command('FzfPreviewVimLspDefinition', <f-args>)
command! -nargs=? FzfPreviewVimLspTypeDefinitionRpc call fzf_preview#rpc#command('FzfPreviewVimLspTypeDefinition', <f-args>)
command! -nargs=? FzfPreviewVimLspImplementationRpc call fzf_preview#rpc#command('FzfPreviewVimLspImplementation', <f-args>)
command! -nargs=? FzfPreviewNvimLspReferencesRpc call fzf_preview#rpc#command('FzfPreviewNvimLspReferences', <f-args>)
command! -nargs=? FzfPreviewNvimLspDiagnosticsRpc call fzf_preview#rpc#command('FzfPreviewNvimLspDiagnostics', <f-args>)
command! -nargs=? FzfPreviewNvimLspCurrentDiagnosticsRpc call fzf_preview#rpc#command('FzfPreviewNvimLspCurrentDiagnostics', <f-args>)
command! -nargs=? FzfPreviewNvimLspDefinitionRpc call fzf_preview#rpc#command('FzfPreviewNvimLspDefinition', <f-args>)
command! -nargs=? FzfPreviewNvimLspTypeDefinitionRpc call fzf_preview#rpc#command('FzfPreviewNvimLspTypeDefinition', <f-args>)
command! -nargs=? FzfPreviewNvimLspImplementationRpc call fzf_preview#rpc#command('FzfPreviewNvimLspImplementation', <f-args>)
command! -nargs=? FzfPreviewBookmarksRpc call fzf_preview#rpc#command('FzfPreviewBookmarks', <f-args>)
command! -nargs=? FzfPreviewYankroundRpc call fzf_preview#rpc#command('FzfPreviewYankround', <f-args>)
command! -nargs=? FzfPreviewMemoListRpc call fzf_preview#rpc#command('FzfPreviewMemoList', <f-args>)
command! -nargs=? FzfPreviewMemoListGrepRpc call fzf_preview#rpc#command('FzfPreviewMemoListGrep', <f-args>)
command! -nargs=? FzfPreviewTodoCommentsRpc call fzf_preview#rpc#command('FzfPreviewTodoComments', <f-args>)
command! -nargs=? FzfPreviewVistaCtagsRpc call fzf_preview#rpc#command('FzfPreviewVistaCtags', <f-args>)
command! -nargs=? FzfPreviewVistaBufferCtagsRpc call fzf_preview#rpc#command('FzfPreviewVistaBufferCtags', <f-args>)
command! -nargs=? FzfPreviewBlamePRRpc call fzf_preview#rpc#command('FzfPreviewBlamePR', <f-args>)

let &cpoptions = s:save_cpo
unlet s:save_cpo

" vim:set expandtab shiftwidth=2 softtabstop=2 tabstop=2 foldenable foldmethod=marker:


================================================
FILE: rplugin/node/fzf-preview.vim/.keep
================================================


================================================
FILE: scripts/preview.js
================================================
const { execSync } = require("child_process")
const path = require("path")
const { existsSync } = require("fs")
const util = require("util")
const glob = util.promisify(require("glob"))

const MAX_BUFFER_SIZE = 1024 * 1024 * 1000
const BAT_THEME = process.env.FZF_PREVIEW_PREVIEW_BAT_THEME || "OneHalfDark"
const VIM_RUNTIME_DIR = process.env.VIMRUNTIME || ""
const HELP_ROOT_DIR = process.env.FZF_PREVIEW_PLUGIN_HELP_ROOT_DIR || ""

const GREP_OUTPUT_REGEX = /^(?<devIcon>.\s\s)?(?<fileName>[^:]+):(?<lineNum>\d+)(:(?<col>\d+))?(:(?<match>.*))?/

const expandHome = (filePath) => {
  if (filePath.startsWith("~")) {
    return path.join(process.env.HOME, filePath.slice(1))
  }

  return filePath
}

const isInstalled = (command) => {
  try {
    execSync(`which ${command.split(" ")[0]}`, { encoding: "utf-8" })
    return true
  } catch (_) {
    return false
  }
}

const main = async () => {
  const match = GREP_OUTPUT_REGEX.exec(process.argv[2])

  if (match == null) {
    console.log(
      "Cannot process the entry :(\n",
      "Please open an issue and describe what happened\n",
      "including information such as file name and g:fzf_preview_grep_cmd"
    )

    process.exit(1)
  }

  let fileName = match.groups["fileName"]
  const lineNum = Number(match.groups["lineNum"])

  if (!existsSync(fileName)) {
    let helpFileList = []
    if (VIM_RUNTIME_DIR != "") {
      helpFileList = await glob(`${VIM_RUNTIME_DIR}/doc/*`)
    }

    if (HELP_ROOT_DIR != "") {
      helpFileList = [...helpFileList, ...(await glob(`${expandHome(HELP_ROOT_DIR)}/**/doc/*`))]
    }

    const matchHelpFile = helpFileList.find((file) => file.split("/").slice(-1)[0] === fileName)
    if (matchHelpFile == null) {
      process.exit(1)
    } else {
      fileName = matchHelpFile
    }
  }

  const cats = [`bat --highlight-line="${lineNum}" --color=always --theme="${BAT_THEME}" --plain --number`, "cat"]
  const cat = cats.find((cat) => isInstalled(cat))

  const result = execSync(`${cat} ${fileName}`, { encoding: "utf-8", maxBuffer: MAX_BUFFER_SIZE })

  if (cat === "cat") {
    for (const [index, line] of result.split("\n").entries()) {
      if (lineNum - 1 === index) {
        console.log(`\x1b[1m\x1b[4m\x1b[31m${line}\x1b[0m`)
      } else {
        console.log(line)
      }
    }
  } else {
    console.log(result)
  }
}

main()


================================================
FILE: src/@types/index.d.ts
================================================
declare namespace NodeJS {
  interface ProcessEnv {
    readonly VIMRUNTIME: string
    readonly FZF_PREVIEW_PLUGIN_HELP_ROOT_DIR?: string
  }
}

declare const PLUGIN: {
  ENV: "remote" | "coc" | "rpc"
}


================================================
FILE: src/args/add-fzf-arg-parser.test.ts
================================================
import { parseAddFzfArg } from "@/args/add-fzf-arg-parser"

describe("parseAddFzfArgs", () => {
  it('parseAddFzfArgs("--add-fzf-arg=-a")', () => {
    expect(parseAddFzfArg("--add-fzf-arg=-a")).toEqual([
      {
        optionName: "-a",
      },
    ])
  })

  it('parseAddFzfArgs("--add-fzf-arg=--foo")', () => {
    expect(parseAddFzfArg("--add-fzf-arg=--foo")).toEqual([
      {
        optionName: "--foo",
      },
    ])
  })

  it('parseAddFzfArgs("--add-fzf-arg=--foo --add-fzf-arg=--bar")', () => {
    expect(parseAddFzfArg("--add-fzf-arg=--foo --add-fzf-arg=--bar")).toEqual([
      {
        optionName: "--foo",
      },
      {
        optionName: "--bar",
      },
    ])
  })

  it('parseAddFzfArgs("--add-fzf-arg=--foo=bar")', () => {
    expect(parseAddFzfArg("--add-fzf-arg=--foo=bar")).toEqual([
      {
        optionName: "--foo",
        value: "bar",
      },
    ])
  })

  it('parseAddFzfArgs("--add-fzf-arg=--foo --add-fzf-arg=--foobar="hoge fuga"")', () => {
    expect(parseAddFzfArg('--add-fzf-arg=--foo --add-fzf-arg=--foobar="hoge fuga"')).toEqual([
      {
        optionName: "--foo",
      },
      {
        optionName: "--foobar",
        value: '"hoge fuga"',
      },
    ])
  })
})


================================================
FILE: src/args/add-fzf-arg-parser.ts
================================================
import { argsParser } from "@/args/parser"
import type { AddFzfArg, ArgsOptions } from "@/type"

const optionsToAddFzfArg = (options: ArgsOptions): ReadonlyArray<string> => {
  if (options["add-fzf-arg"] != null && Array.isArray(options["add-fzf-arg"])) {
    return options["add-fzf-arg"] as ReadonlyArray<string>
  }
  if (options["add-fzf-arg"] != null && typeof options["add-fzf-arg"] === "string") {
    return [options["add-fzf-arg"]]
  }

  return []
}

const parseOptions = (options: ArgsOptions) => {
  const addFzfArg = optionsToAddFzfArg(options)

  const notExistsValueOptions: ReadonlyArray<AddFzfArg> = addFzfArg
    .map((arg) => /(.+)$/.exec(arg))
    .filter((match): match is RegExpExecArray => match != null && !match[0].includes("="))
    .map((match) => {
      return { optionName: match[1] }
    })

  const existsValueOptions: ReadonlyArray<AddFzfArg> = addFzfArg
    .map((arg) => /(.+)=(.+)$/.exec(arg))
    .filter((match): match is RegExpExecArray => match != null)
    .map((match) => ({ optionName: match[1], value: match[2] }))

  return [...notExistsValueOptions, ...existsValueOptions]
}

export const parseAddFzfArg = (args: string): ReadonlyArray<AddFzfArg> => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  return parseOptions(options)
}


================================================
FILE: src/args/directory-files-args-parser.ts
================================================
import { argsParser } from "@/args/parser"
import type { SourceFuncArgs } from "@/type"

export const parseDictionaryFilesArgs = (args: string): SourceFuncArgs => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  const directories = options._.map((resource) => (typeof resource === "number" ? resource.toString() : resource))

  return {
    args: directories.length > 0 ? [directories[0]] : [],
  }
}


================================================
FILE: src/args/empty-source-func-args-parser.ts
================================================
import type { SourceFuncArgs } from "@/type"

export const parseEmptySourceFuncArgs = (_args: string): SourceFuncArgs => {
  return {
    args: [],
  }
}


================================================
FILE: src/args/experimental-parser.ts
================================================
import { argsParser } from "@/args/parser"

type Experimental = {
  fast: boolean
}

export const parseExperimental = (args: string): Experimental => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  return {
    fast: options["experimental-fast"] != null,
  }
}


================================================
FILE: src/args/files-from-resources-parser.ts
================================================
import { argsParser } from "@/args/parser"
import { FILE_RESOURCES } from "@/const/fzf-option"
import type { SourceFuncArgs } from "@/type"

export const parseResources = (args: string): SourceFuncArgs => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  const resources = options._.map((resource) => (typeof resource === "number" ? resource.toString() : resource))

  if (resources.length === 0) {
    throw new Error("Select one or more resources")
  }

  if (!resources.every((resource) => (FILE_RESOURCES as ReadonlyArray<string>).includes(resource))) {
    throw new Error(`Invalid resource: "${resources.join(", ")}"`)
  }

  return {
    args: resources,
  }
}


================================================
FILE: src/args/grep-args-parser.ts
================================================
import { argsParser } from "@/args/parser"
import type { SourceFuncArgs } from "@/type"

export const parseGrepArgs = (args: string): SourceFuncArgs => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  const grepArgs = options._.map((resource) => (typeof resource === "number" ? resource.toString() : resource))

  return {
    args: grepArgs,
  }
}


================================================
FILE: src/args/index.ts
================================================
export * from "@/args/add-fzf-arg-parser"
export * from "@/args/directory-files-args-parser"
export * from "@/args/empty-source-func-args-parser"
export * from "@/args/grep-args-parser"
export * from "@/args/processes-parser"
export * from "@/args/resume-parser"


================================================
FILE: src/args/parser.ts
================================================
import yargs from "yargs"

export const argsParser = () => {
  return yargs
    .options("add-fzf-arg", { type: "string" })
    .options("processes", { type: "string" })
    .options("resume", { type: "boolean" })
    .options("session", { type: "string" })
    .options("experimental-fast", { type: "boolean" })
    .parserConfiguration({
      "camel-case-expansion": false,
      "unknown-options-as-args": true,
    })
}


================================================
FILE: src/args/processes-parser.test.ts
================================================
import { parseProcesses } from "@/args/processes-parser"

describe("parseProcesses", () => {
  it('parseProcesses("foo")', () => {
    expect(parseProcesses("open-file", "foo")).toBeUndefined()
  })

  it('parseProcesses("--foo --processes=foo_processes")', () => {
    expect(parseProcesses("open-file", "--processes=foo_processes")).toEqual({
      type: "global_variable",
      value: "foo_processes",
    })
  })

  it('parseProcesses("--processes=foo_processes --processes=bar_processes")', () => {
    expect(() => {
      parseProcesses("open-file", "--processes=foo_processes --processes=bar_processes")
    }).toThrow()
  })
})


================================================
FILE: src/args/processes-parser.ts
================================================
import { isObject } from "lodash"

import { argsParser } from "@/args/parser"
import { globalVariableSelector } from "@/module/selector/vim-variable"
import type { ArgsOptions, CustomProcessesVimVariable, ProcessesName, UserProcesses } from "@/type"

const parseOptions = (options: ArgsOptions): UserProcesses | null => {
  const processesArgs = options.processes

  if (processesArgs == null) {
    return null
  }

  if (typeof processesArgs === "string") {
    return { type: "global_variable", value: processesArgs }
  }

  throw new Error("--processes option can only be used once")
}

export const parseProcesses = (defaultProcessesName: ProcessesName, args: string): UserProcesses | undefined => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  const parsedOptions = parseOptions(options)
  if (parsedOptions != null) {
    return parsedOptions
  }

  const customProcessesDictionary = globalVariableSelector("fzfPreviewCustomProcesses")
  if (
    isObject(customProcessesDictionary) &&
    isObject((customProcessesDictionary as CustomProcessesVimVariable)[defaultProcessesName])
  ) {
    return { type: "custom_processes_variable", value: defaultProcessesName }
  }

  return undefined
}


================================================
FILE: src/args/resume-parser.ts
================================================
import { argsParser } from "@/args/parser"
import { resumeSelector } from "@/module/selector/resume"
import type { FzfCommandName, ResumeQuery } from "@/type"

export const parseResume = (commandName: FzfCommandName, args: string): ResumeQuery => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  if (options.resume == null) {
    return null
  }

  const resumeQuery = resumeSelector(commandName)

  return resumeQuery != null ? resumeQuery : null
}


================================================
FILE: src/args/session-parser.ts
================================================
import { argsParser } from "@/args/parser"
import { sessionSelector } from "@/module/selector/session"
import type { Session } from "@/type"

export const parseSession = (args: string): Session | null => {
  const parser = argsParser()
  const options = parser.parseSync(args)

  if (options.session == null) {
    return null
  }

  const sessionToken = options.session
  const currentSession = sessionSelector(sessionToken)

  if (currentSession == null) {
    throw new Error(`Invalid session token: ${sessionToken}`)
  }

  return currentSession
}


================================================
FILE: src/association/coc-command.ts
================================================
import { parseEmptySourceFuncArgs } from "@/args"
import { commandDefinition, vimCommandOptions } from "@/association/command"
import {
  cocCurrentDiagnostics,
  cocCurrentDiagnosticsDefaultOptions,
  cocDiagnostics,
  cocDiagnosticsDefaultOptions,
  cocImplementations,
  cocImplementationsDefaultOptions,
  cocReferences,
  cocReferencesDefaultOptions,
  cocTypeDefinitions,
  cocTypeDefinitionsDefaultOptions,
} from "@/fzf/resource/coc"
import { cocDefinitions, cocDefinitionsDefaultOptions } from "@/fzf/resource/coc/coc-definitions"
import { cocOutline, cocOutlineDefaultOptions } from "@/fzf/resource/coc/coc-outline"
import {
  cocTsServerSourceDefinition,
  cocTsServerSourceDefinitionsDefaultOptions,
} from "@/fzf/resource/coc/coc-tsserver-source-definition"
import type { FzfCommand } from "@/type"

export const cocCommandDefinition: ReadonlyArray<FzfCommand> = [
  ...commandDefinition,
  {
    commandName: "FzfPreviewCocReferences",
    sourceFunc: cocReferences,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocReferencesDefaultOptions,
    defaultProcessesName: "open-file-with-tag-stack",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCocDiagnostics",
    sourceFunc: cocDiagnostics,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocDiagnosticsDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCocCurrentDiagnostics",
    sourceFunc: cocCurrentDiagnostics,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocCurrentDiagnosticsDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCocDefinition",
    sourceFunc: cocDefinitions,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocDefinitionsDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCocTypeDefinition",
    sourceFunc: cocTypeDefinitions,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocTypeDefinitionsDefaultOptions,
    defaultProcessesName: "open-file-with-tag-stack",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCocImplementations",
    sourceFunc: cocImplementations,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocImplementationsDefaultOptions,
    defaultProcessesName: "open-file-with-tag-stack",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCocOutline",
    sourceFunc: cocOutline,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocOutlineDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCocTsServerSourceDefinition",
    sourceFunc: cocTsServerSourceDefinition,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: cocTsServerSourceDefinitionsDefaultOptions,
    defaultProcessesName: "open-file-with-tag-stack",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
]


================================================
FILE: src/association/command.ts
================================================
import { parseDictionaryFilesArgs, parseEmptySourceFuncArgs, parseGrepArgs } from "@/args"
import { parseResources } from "@/args/files-from-resources-parser"
import {
  allBuffers,
  allBuffersDefaultOptions,
  blamePr,
  blamePrDefaultOptions,
  bookmarks,
  bookmarksDefaultOptions,
  bufferLines,
  bufferLinesDefaultOptions,
  buffers,
  buffersDefaultOptions,
  bufferTags,
  bufferTagsDefaultOptions,
  changes,
  changesDefaultOptions,
  commandPalette,
  commandPaletteDefaultOptions,
  ctags,
  ctagsDefaultOptions,
  directoryFiles,
  directoryFilesDefaultOptions,
  filesFromResources,
  filesFromResourcesDefaultOptions,
  gitActions,
  gitActionsDefaultOptions,
  gitBranchActions,
  gitBranchActionsDefaultOptions,
  gitBranches,
  gitBranchesDefaultOptions,
  gitCurrentLogs,
  gitCurrentLogsDefaultOptions,
  gitFiles,
  gitFilesDefaultOptions,
  gitLogActions,
  gitLogActionsDefaultOptions,
  gitLogs,
  gitLogsDefaultOptions,
  gitReflogActions,
  gitReflogActionsDefaultOptions,
  gitReflogs,
  gitReflogsDefaultOptions,
  gitStashActions,
  gitStashActionsDefaultOptions,
  gitStashes,
  gitStashesDefaultOptions,
  gitStatus,
  gitStatusActions,
  gitStatusActionsDefaultOptions,
  gitStatusDefaultOptions,
  jumps,
  jumpsDefaultOptions,
  lines,
  linesDefaultOptions,
  locationList,
  locationListDefaultOptions,
  marks,
  marksDefaultOptions,
  memoList,
  memoListDefaultOptions,
  memoListGrep,
  memoListGrepDefaultOptions,
  mruFiles,
  mruFilesDefaultOptions,
  mrwFiles,
  mrwFilesDefaultOptions,
  oldFiles,
  oldFilesDefaultOptions,
  projectFiles,
  projectFilesDefaultOptions,
  projectGrep,
  projectGrepDefaultOptions,
  projectMruFiles,
  projectMruFilesDefaultOptions,
  projectMrwFiles,
  projectMrwFilesDefaultOptions,
  projectOldFiles,
  projectOldFilesDefaultOptions,
  quickFix,
  quickFixDefaultOptions,
  vistaBufferCtags,
  vistaBufferCtagsDefaultOptions,
  vistaCtags,
  vistaCtagsDefaultOptions,
  yankround,
  yankroundDefaultOptions,
} from "@/fzf/resource"
import {
  nvimLspCurrentDiagnostics,
  nvimLspCurrentDiagnosticsDefaultOptions,
} from "@/fzf/resource/nvim-lsp-current-diagnostics"
import { nvimLspDefinition, nvimLspDefinitionDefaultOptions } from "@/fzf/resource/nvim-lsp-definition"
import { nvimLspDiagnostics, nvimLspDiagnosticsDefaultOptions } from "@/fzf/resource/nvim-lsp-diagnostics"
import { nvimLspImplementation, nvimLspImplementationDefaultOptions } from "@/fzf/resource/nvim-lsp-implementation"
import { nvimLspReferences, nvimLspReferencesDefaultOptions } from "@/fzf/resource/nvim-lsp-references"
import { nvimLspTypeDefinition, nvimLspTypeDefinitionDefaultOptions } from "@/fzf/resource/nvim-lsp-type-definition"
import { todoComments, todoCommentsDefaultOptions } from "@/fzf/resource/todo-comments"
import { grepHelp, grepHelpDefaultOptions } from "@/fzf/resource/vim-help"
import {
  vimLspCurrentDiagnostics,
  vimLspCurrentDiagnosticsDefaultOptions,
} from "@/fzf/resource/vim-lsp-current-diagnostics"
import { vimLspDefinition, vimLspDefinitionDefaultOptions } from "@/fzf/resource/vim-lsp-definition"
import { vimLspDiagnostics, vimLspDiagnosticsDefaultOptions } from "@/fzf/resource/vim-lsp-diagnostics"
import { vimLspImplementation, vimLspImplementationDefaultOptions } from "@/fzf/resource/vim-lsp-implementation"
import { vimLspReferences, vimLspReferencesDefaultOptions } from "@/fzf/resource/vim-lsp-references"
import { vimLspTypeDefinition, vimLspTypeDefinitionDefaultOptions } from "@/fzf/resource/vim-lsp-type-definition"
import type { BaseFzfCommand } from "@/type"

export const vimCommandOptions = {
  nargs: "?",
  sync: true,
} as const

export const commandDefinition: ReadonlyArray<BaseFzfCommand> = [
  {
    commandName: "FzfPreviewProjectFiles",
    sourceFunc: projectFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: projectFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
    addGitStatus: true,
  },
  {
    commandName: "FzfPreviewGitFiles",
    sourceFunc: gitFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: gitFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewDirectoryFiles",
    sourceFunc: directoryFiles,
    sourceFuncArgsParser: parseDictionaryFilesArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: directoryFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewBuffers",
    sourceFunc: buffers,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: buffersDefaultOptions,
    defaultProcessesName: "open-buffer",
    enableConvertForFzf: true,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewAllBuffers",
    sourceFunc: allBuffers,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: allBuffersDefaultOptions,
    defaultProcessesName: "open-bufnr",
    enableConvertForFzf: true,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewProjectOldFiles",
    sourceFunc: projectOldFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: projectOldFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
    addGitStatus: true,
  },
  {
    commandName: "FzfPreviewProjectMruFiles",
    sourceFunc: projectMruFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: projectMruFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
    addGitStatus: true,
  },
  {
    commandName: "FzfPreviewProjectMrwFiles",
    sourceFunc: projectMrwFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: projectMrwFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
    addGitStatus: true,
  },
  {
    commandName: "FzfPreviewLines",
    sourceFunc: lines,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: linesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: false,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewBufferLines",
    sourceFunc: bufferLines,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: bufferLinesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewCtags",
    sourceFunc: ctags,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: ctagsDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: false,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewBufferTags",
    sourceFunc: bufferTags,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: bufferTagsDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: false,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewOldFiles",
    sourceFunc: oldFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: oldFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewMruFiles",
    sourceFunc: mruFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: mruFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewMrwFiles",
    sourceFunc: mrwFiles,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: mrwFilesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewQuickFix",
    sourceFunc: quickFix,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: quickFixDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewLocationList",
    sourceFunc: locationList,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: locationListDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewJumps",
    sourceFunc: jumps,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: jumpsDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewChanges",
    sourceFunc: changes,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: changesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: false,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewMarks",
    sourceFunc: marks,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: marksDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewProjectGrep",
    sourceFunc: projectGrep,
    sourceFuncArgsParser: parseGrepArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: projectGrepDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewProjectGrepRecall",
    sourceFunc: projectGrep,
    sourceFuncArgsParser: parseGrepArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: projectGrepDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
  },
  {
    commandName: "FzfPreviewFromResources",
    sourceFunc: filesFromResources,
    sourceFuncArgsParser: parseResources,
    vimCommandOptions,
    defaultFzfOptionFunc: filesFromResourcesDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: true,
    addGitStatus: true,
  },
  {
    commandName: "FzfPreviewCommandPalette",
    sourceFunc: commandPalette,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: commandPaletteDefaultOptions,
    defaultProcessesName: "command-palette",
    enableConvertForFzf: false,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewGrepHelp",
    sourceFunc: grepHelp,
    sourceFuncArgsParser: parseGrepArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: grepHelpDefaultOptions,
    defaultProcessesName: "open-file",
    enableConvertForFzf: true,
    enableDevIcons: false,
  },
  {
    commandName: "FzfPreviewGitActions",
    sourceFunc: gitActions,
    sourceFuncArgsParser: parseEmptySourceFuncArgs,
    vimCommandOptions,
    defaultFzfOptionFunc: gitActionsDefaultOptions,
    defaultProcessesName: "git-action",
    enableConvertForFzf: false,
    enableDevIcons: false,
  },
  {
  
Download .txt
gitextract_mlnhz3k1/

├── .eslintignore
├── .eslintrc.js
├── .github/
│   ├── ISSUE_TEMPLATE.md
│   ├── issue_example/
│   │   └── Dockerfile
│   └── workflows/
│       ├── build.yml
│       ├── can-release.yml
│       ├── release-coc.yml
│       ├── release-remote.yml
│       └── release-rpc.yml
├── .gitignore
├── .luarc.json
├── .markdownlint.json
├── .prettierrc.json
├── LICENSE
├── README.md
├── autoload/
│   ├── fzf_preview/
│   │   ├── remote/
│   │   │   ├── consumer/
│   │   │   │   ├── git.vim
│   │   │   │   └── register.vim
│   │   │   ├── exec_fzf.vim
│   │   │   ├── handler_to_process.vim
│   │   │   ├── mr.vim
│   │   │   ├── process.vim
│   │   │   ├── resource/
│   │   │   │   ├── all_buffers.vim
│   │   │   │   ├── bookmarks.vim
│   │   │   │   ├── buffers.vim
│   │   │   │   ├── changes.vim
│   │   │   │   ├── directory_files.vim
│   │   │   │   ├── git_files.vim
│   │   │   │   ├── git_status.vim
│   │   │   │   ├── grep.vim
│   │   │   │   ├── jumps.vim
│   │   │   │   ├── lines.vim
│   │   │   │   ├── marks.vim
│   │   │   │   ├── memolist.vim
│   │   │   │   ├── project_files.vim
│   │   │   │   ├── quickfix_and_locationlist.vim
│   │   │   │   ├── tags.vim
│   │   │   │   ├── todo_comments.vim
│   │   │   │   ├── util.vim
│   │   │   │   ├── vim_command.vim
│   │   │   │   ├── vim_lsp.vim
│   │   │   │   ├── vista.vim
│   │   │   │   └── yankround.vim
│   │   │   ├── runner.vim
│   │   │   ├── tagstack.vim
│   │   │   ├── util.vim
│   │   │   ├── variable.vim
│   │   │   └── window.vim
│   │   ├── rpc/
│   │   │   └── server.vim
│   │   └── rpc.vim
│   ├── fzf_preview.vim
│   └── vital/
│       ├── _fzf_preview/
│       │   ├── Async/
│       │   │   ├── Later.vim
│       │   │   └── Promise.vim
│       │   └── VS/
│       │       ├── Event/
│       │       │   └── Emitter.vim
│       │       ├── RPC/
│       │       │   └── JSON.vim
│       │       └── System/
│       │           └── Job.vim
│       ├── _fzf_preview.vim
│       ├── fzf_preview.vim
│       └── fzf_preview.vital
├── bin/
│   ├── git_actions_preview
│   ├── git_blame_pr
│   └── preview_yankround_register
├── doc/
│   └── fzf_preview_vim.txt
├── jest.config.ts
├── lua/
│   └── fzf-preview/
│       └── init.lua
├── package.json
├── plugin/
│   └── fzf_preview.vim
├── rplugin/
│   └── node/
│       └── fzf-preview.vim/
│           └── .keep
├── scripts/
│   └── preview.js
├── src/
│   ├── @types/
│   │   └── index.d.ts
│   ├── args/
│   │   ├── add-fzf-arg-parser.test.ts
│   │   ├── add-fzf-arg-parser.ts
│   │   ├── directory-files-args-parser.ts
│   │   ├── empty-source-func-args-parser.ts
│   │   ├── experimental-parser.ts
│   │   ├── files-from-resources-parser.ts
│   │   ├── grep-args-parser.ts
│   │   ├── index.ts
│   │   ├── parser.ts
│   │   ├── processes-parser.test.ts
│   │   ├── processes-parser.ts
│   │   ├── resume-parser.ts
│   │   └── session-parser.ts
│   ├── association/
│   │   ├── coc-command.ts
│   │   ├── command.ts
│   │   └── vim-variable.ts
│   ├── coc.ts
│   ├── connector/
│   │   ├── bookmarks.ts
│   │   ├── buffers.ts
│   │   ├── changes.ts
│   │   ├── coc.ts
│   │   ├── convert-for-fzf.ts
│   │   ├── directory-files.ts
│   │   ├── fzf.ts
│   │   ├── git.ts
│   │   ├── grep.ts
│   │   ├── jumps.ts
│   │   ├── lines.ts
│   │   ├── lsp.ts
│   │   ├── marks.ts
│   │   ├── memolist.ts
│   │   ├── nvim-lsp.ts
│   │   ├── old-files.ts
│   │   ├── open-bufnr.ts
│   │   ├── open-file.ts
│   │   ├── project-files.ts
│   │   ├── quickfix-and-locationlist.ts
│   │   ├── register.ts
│   │   ├── resume.ts
│   │   ├── tags.ts
│   │   ├── todo-comments.ts
│   │   ├── util.ts
│   │   ├── vim-command.ts
│   │   ├── vim-help.ts
│   │   ├── vim-lsp.ts
│   │   ├── vista.ts
│   │   └── yankround.ts
│   ├── const/
│   │   ├── fzf-handler.ts
│   │   ├── fzf-option.ts
│   │   ├── fzf-processes.ts
│   │   ├── fzf-resource.ts
│   │   ├── fzf-runner.ts
│   │   ├── git.ts
│   │   ├── module.ts
│   │   └── system.ts
│   ├── fzf/
│   │   ├── command/
│   │   │   ├── execute-fast.ts
│   │   │   ├── execute-normal.ts
│   │   │   ├── index.ts
│   │   │   └── util.ts
│   │   ├── function/
│   │   │   └── index.ts
│   │   ├── handler/
│   │   │   └── index.ts
│   │   ├── option/
│   │   │   ├── convert.test.ts
│   │   │   ├── convert.ts
│   │   │   ├── generator.test.ts
│   │   │   └── generator.ts
│   │   ├── process/
│   │   │   ├── command-palette.ts
│   │   │   ├── consumer/
│   │   │   │   ├── command-palette.ts
│   │   │   │   ├── git-action.ts
│   │   │   │   ├── git-branch-action.ts
│   │   │   │   ├── git-branch.ts
│   │   │   │   ├── git-log-action.ts
│   │   │   │   ├── git-log.ts
│   │   │   │   ├── git-reflog-action.ts
│   │   │   │   ├── git-reflog.ts
│   │   │   │   ├── git-stash-action.ts
│   │   │   │   ├── git-stash.ts
│   │   │   │   ├── git-status-action.ts
│   │   │   │   ├── git-status.ts
│   │   │   │   ├── git.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── open-buffer.ts
│   │   │   │   ├── open-bufnr.ts
│   │   │   │   ├── open-file.test.ts
│   │   │   │   ├── open-file.ts
│   │   │   │   ├── open-pr.ts
│   │   │   │   └── register.ts
│   │   │   ├── git-action.ts
│   │   │   ├── git-branch-action.ts
│   │   │   ├── git-branch.ts
│   │   │   ├── git-log-action.ts
│   │   │   ├── git-log.ts
│   │   │   ├── git-reflog-action.ts
│   │   │   ├── git-reflog.ts
│   │   │   ├── git-stash-action.ts
│   │   │   ├── git-stash.ts
│   │   │   ├── git-status-action.ts
│   │   │   ├── git-status.ts
│   │   │   ├── index.ts
│   │   │   ├── open-buffer.ts
│   │   │   ├── open-bufnr.ts
│   │   │   ├── open-file.ts
│   │   │   ├── open-pr.ts
│   │   │   ├── process.ts
│   │   │   └── register.ts
│   │   ├── resource/
│   │   │   ├── all-buffers.ts
│   │   │   ├── blame-pr.ts
│   │   │   ├── bookmarks.ts
│   │   │   ├── buffer-lines.ts
│   │   │   ├── buffer-tags.ts
│   │   │   ├── buffer-vista.ts
│   │   │   ├── buffers.ts
│   │   │   ├── changes.ts
│   │   │   ├── coc/
│   │   │   │   ├── coc-current-diagnostics.ts
│   │   │   │   ├── coc-definitions.ts
│   │   │   │   ├── coc-diagnostics.ts
│   │   │   │   ├── coc-implementations.ts
│   │   │   │   ├── coc-outline.ts
│   │   │   │   ├── coc-references.ts
│   │   │   │   ├── coc-tsserver-source-definition.ts
│   │   │   │   ├── coc-type-definitions.ts
│   │   │   │   └── index.ts
│   │   │   ├── command-palette.ts
│   │   │   ├── ctags.ts
│   │   │   ├── directory-files.ts
│   │   │   ├── files-from-resources.ts
│   │   │   ├── git-actions.ts
│   │   │   ├── git-branch-actions.ts
│   │   │   ├── git-branches.ts
│   │   │   ├── git-files.ts
│   │   │   ├── git-log-actions.ts
│   │   │   ├── git-logs.ts
│   │   │   ├── git-reflog-actions.ts
│   │   │   ├── git-reflogs.ts
│   │   │   ├── git-stash-actions.ts
│   │   │   ├── git-stashes.ts
│   │   │   ├── git-status-actions.ts
│   │   │   ├── git-status.ts
│   │   │   ├── grep.ts
│   │   │   ├── index.ts
│   │   │   ├── jumps.ts
│   │   │   ├── lines.ts
│   │   │   ├── locationlist.ts
│   │   │   ├── marks.ts
│   │   │   ├── memolist-grep.ts
│   │   │   ├── memolist.ts
│   │   │   ├── mru.ts
│   │   │   ├── mrw.ts
│   │   │   ├── nvim-lsp-current-diagnostics.ts
│   │   │   ├── nvim-lsp-definition.ts
│   │   │   ├── nvim-lsp-diagnostics.ts
│   │   │   ├── nvim-lsp-implementation.ts
│   │   │   ├── nvim-lsp-references.ts
│   │   │   ├── nvim-lsp-type-definition.ts
│   │   │   ├── oldfiles.ts
│   │   │   ├── project-files.ts
│   │   │   ├── project-mru.ts
│   │   │   ├── project-mrw.ts
│   │   │   ├── project-oldfiles.ts
│   │   │   ├── quickfix.ts
│   │   │   ├── todo-comments.ts
│   │   │   ├── vim-help.ts
│   │   │   ├── vim-lsp-current-diagnostics.ts
│   │   │   ├── vim-lsp-definition.ts
│   │   │   ├── vim-lsp-diagnostics.ts
│   │   │   ├── vim-lsp-implementation.ts
│   │   │   ├── vim-lsp-references.ts
│   │   │   ├── vim-lsp-type-definition.ts
│   │   │   ├── vista.ts
│   │   │   └── yankround.ts
│   │   ├── syntax/
│   │   │   └── colorize.ts
│   │   └── util.ts
│   ├── module/
│   │   ├── execute-command.ts
│   │   ├── file-path.ts
│   │   ├── git-config.ts
│   │   ├── recall.ts
│   │   ├── resume.ts
│   │   ├── selector/
│   │   │   ├── execute-command.ts
│   │   │   ├── file-path.ts
│   │   │   ├── git-config.ts
│   │   │   ├── recall.ts
│   │   │   ├── resume.ts
│   │   │   ├── session.ts
│   │   │   └── vim-variable.ts
│   │   ├── session.ts
│   │   └── vim-variable.ts
│   ├── plugin/
│   │   ├── fzf-runner.ts
│   │   ├── index.ts
│   │   ├── process-runner.ts
│   │   └── sync-vim-variable.ts
│   ├── register/
│   │   ├── coc/
│   │   │   └── index.ts
│   │   └── remote/
│   │       └── index.ts
│   ├── remote.ts
│   ├── rpc.ts
│   ├── store/
│   │   └── index.ts
│   ├── system/
│   │   ├── command.ts
│   │   ├── file.ts
│   │   ├── mr.ts
│   │   ├── project.ts
│   │   └── tags.ts
│   ├── type/
│   │   ├── args.ts
│   │   ├── command.ts
│   │   ├── connector.ts
│   │   ├── fzf.ts
│   │   ├── git.ts
│   │   ├── index.ts
│   │   ├── lsp.ts
│   │   ├── process.ts
│   │   ├── resource.ts
│   │   ├── rpc.ts
│   │   ├── syntax.ts
│   │   ├── system.ts
│   │   ├── vim-variable.ts
│   │   └── vim.ts
│   └── util/
│       ├── align.test.ts
│       ├── align.ts
│       ├── array.ts
│       ├── type.ts
│       └── uniq-with.ts
├── stylua.toml
├── tsconfig.json
├── tsconfig.webpack-jest.json
├── webpack.coc.ts
├── webpack.common.ts
├── webpack.preview.ts
├── webpack.remote.ts
└── webpack.rpc.ts
Download .txt
SYMBOL INDEX (169 symbols across 62 files)

FILE: scripts/preview.js
  constant MAX_BUFFER_SIZE (line 7) | const MAX_BUFFER_SIZE = 1024 * 1024 * 1000
  constant BAT_THEME (line 8) | const BAT_THEME = process.env.FZF_PREVIEW_PREVIEW_BAT_THEME || "OneHalfD...
  constant VIM_RUNTIME_DIR (line 9) | const VIM_RUNTIME_DIR = process.env.VIMRUNTIME || ""
  constant HELP_ROOT_DIR (line 10) | const HELP_ROOT_DIR = process.env.FZF_PREVIEW_PLUGIN_HELP_ROOT_DIR || ""
  constant GREP_OUTPUT_REGEX (line 12) | const GREP_OUTPUT_REGEX = /^(?<devIcon>.\s\s)?(?<fileName>[^:]+):(?<line...

FILE: src/@types/index.d.ts
  type ProcessEnv (line 2) | interface ProcessEnv {

FILE: src/args/experimental-parser.ts
  type Experimental (line 3) | type Experimental = {

FILE: src/coc.ts
  function activate (line 12) | async function activate(context: ExtensionContext): Promise<void> {

FILE: src/connector/bookmarks.ts
  type Bookmark (line 5) | type Bookmark = ReadonlyDeep<{

FILE: src/connector/coc.ts
  type ReferenceProviders (line 25) | type ReferenceProviders = ReadonlyArray<{
  type DefinitionProviders (line 29) | type DefinitionProviders = ReadonlyArray<{
  type TypeDefinitionProviders (line 33) | type TypeDefinitionProviders = ReadonlyArray<{
  type ImplementationProviders (line 37) | type ImplementationProviders = ReadonlyArray<{
  type CocOutlineItem (line 206) | type CocOutlineItem = {
  type OutlineItem (line 218) | type OutlineItem = {
  type TsServerSourceDefinitionServiceClient (line 264) | type TsServerSourceDefinitionServiceClient = {

FILE: src/connector/convert-for-fzf.ts
  type Options (line 10) | type Options = ReadonlyDeep<{

FILE: src/connector/fzf.ts
  type Options (line 6) | type Options = {

FILE: src/connector/git.ts
  type CommitOption (line 163) | type CommitOption =

FILE: src/connector/jumps.ts
  type Jump (line 5) | type Jump = ReadonlyDeep<{

FILE: src/connector/lsp.ts
  type LocationOrLocationLink (line 35) | type LocationOrLocationLink =

FILE: src/connector/marks.ts
  type Mark (line 5) | type Mark = ReadonlyDeep<{

FILE: src/connector/nvim-lsp.ts
  type NvimLspDiagnostic (line 17) | type NvimLspDiagnostic = {

FILE: src/connector/open-file.ts
  type Option (line 21) | type Option = {

FILE: src/connector/tags.ts
  type Tag (line 5) | type Tag = ReadonlyDeep<{

FILE: src/connector/vim-command.ts
  type VimCommand (line 5) | type VimCommand = ReadonlyDeep<{

FILE: src/connector/vim-lsp.ts
  type VimLspDiagnostic (line 10) | type VimLspDiagnostic = {

FILE: src/connector/vista.ts
  type VistaTag (line 5) | type VistaTag = ReadonlyDeep<{
  type VistaBufferTag (line 12) | type VistaBufferTag = ReadonlyDeep<{

FILE: src/connector/yankround.ts
  type YankHistory (line 5) | type YankHistory = ReadonlyDeep<{

FILE: src/const/fzf-handler.ts
  constant HANDLER_NAME (line 1) | const HANDLER_NAME = "FzfPreviewHandleResource"

FILE: src/const/fzf-option.ts
  constant DEFINED_FZF_OPTION_TYPES_IN_PLUGIN (line 1) | const DEFINED_FZF_OPTION_TYPES_IN_PLUGIN = ["--ansi", "--bind", "--expec...
  constant FILE_RESOURCES (line 2) | const FILE_RESOURCES = [
  constant PREVIEW_WINDOW_LAYOUT_CHANGE_SIZE (line 15) | const PREVIEW_WINDOW_LAYOUT_CHANGE_SIZE = 150

FILE: src/const/fzf-processes.ts
  constant PROCESSES_NAME (line 1) | const PROCESSES_NAME = [

FILE: src/const/fzf-resource.ts
  constant USE_DEV_ICONS_PATTERN_LIMIT (line 1) | const USE_DEV_ICONS_PATTERN_LIMIT = 3000

FILE: src/const/fzf-runner.ts
  constant TAIL_RESOURCE_FILE_COMMAND (line 3) | const TAIL_RESOURCE_FILE_COMMAND = `tail -n +1 -f ${TEMPORALLY_DATA_FILE...

FILE: src/const/git.ts
  constant GIT_ACTIONS (line 1) | const GIT_ACTIONS = [
  constant GIT_STATUS_ACTIONS (line 17) | const GIT_STATUS_ACTIONS = [
  constant GIT_BRANCH_ACTIONS (line 26) | const GIT_BRANCH_ACTIONS = [
  constant GIT_LOG_ACTIONS (line 41) | const GIT_LOG_ACTIONS = [
  constant GIT_STASH_ACTIONS (line 53) | const GIT_STASH_ACTIONS = ["show", "diff", "apply", "pop", "drop", "yank...
  constant GIT_REFLOG_ACTIONS (line 54) | const GIT_REFLOG_ACTIONS = ["show", "diff", "reset", "reset-hard", "rese...
  constant GIT_BRANCH_COMMAND (line 56) | const GIT_BRANCH_COMMAND =
  constant GIT_BRANCH_PREVIEW_COMMAND_OPTION (line 59) | const GIT_BRANCH_PREVIEW_COMMAND_OPTION =
  constant GIT_BRANCH_PREVIEW_COMMAND (line 61) | const GIT_BRANCH_PREVIEW_COMMAND = `[[ '{2}' != '*' ]] && git log {2} ${...
  constant GIT_LOG_PREVIEW_COMMAND (line 63) | const GIT_LOG_PREVIEW_COMMAND = "git show {2} --color=always"
  constant GIT_STASH_PREVIEW_COMMAND (line 64) | const GIT_STASH_PREVIEW_COMMAND = "git show {2} --color=always 2> /dev/n...
  constant GIT_REFLOG_PREVIEW_COMMAND (line 65) | const GIT_REFLOG_PREVIEW_COMMAND = "git show {2} --color=always"

FILE: src/const/module.ts
  constant VIM_VARIABLE (line 1) | const VIM_VARIABLE = "vim_variable"
  constant EXECUTE_COMMAND (line 2) | const EXECUTE_COMMAND = "execute_command"
  constant RESUME (line 3) | const RESUME = "resume"
  constant SESSION (line 4) | const SESSION = "session"
  constant GIT_CONFIG (line 5) | const GIT_CONFIG = "git_config"
  constant RECALL (line 6) | const RECALL = "recall"
  constant FILE_PATH (line 7) | const FILE_PATH = "file_path"

FILE: src/const/system.ts
  constant BUFFER_TAGS_COMMAND (line 1) | const BUFFER_TAGS_COMMAND = "ctags -f - --sort=yes --excmd=number"
  constant MAX_BUFFER_SIZE (line 4) | const MAX_BUFFER_SIZE = 1024 * 1024 * 1000
  constant TEMPORALLY_DATA_FILE_PATH (line 6) | const TEMPORALLY_DATA_FILE_PATH = "/tmp/fzf-preview"

FILE: src/fzf/option/generator.ts
  type OptionsArgs (line 149) | type OptionsArgs = {

FILE: src/fzf/resource/all-buffers.ts
  constant SPACER (line 7) | const SPACER = "  "

FILE: src/fzf/resource/buffer-tags.ts
  constant SPACER (line 7) | const SPACER = "  "

FILE: src/fzf/resource/buffer-vista.ts
  constant SPACER (line 8) | const SPACER = "  "

FILE: src/fzf/resource/changes.ts
  constant SPACER (line 7) | const SPACER = "  "

FILE: src/fzf/resource/files-from-resources.ts
  type ResourceFunctions (line 17) | type ResourceFunctions = {

FILE: src/fzf/resource/git-branches.ts
  constant SPACER (line 10) | const SPACER = "    "

FILE: src/fzf/resource/git-logs.ts
  constant SPACER (line 9) | const SPACER = "    "

FILE: src/fzf/resource/git-reflogs.ts
  constant SPACER (line 9) | const SPACER = "    "

FILE: src/fzf/resource/git-stashes.ts
  constant SPACER (line 10) | const SPACER = "    "

FILE: src/fzf/resource/vista.ts
  constant SPACER (line 7) | const SPACER = "  "

FILE: src/fzf/syntax/colorize.ts
  type Options (line 7) | type Options = {

FILE: src/fzf/util.ts
  type ParsedQuickFix (line 34) | type ParsedQuickFix = ReadonlyDeep<{

FILE: src/module/execute-command.ts
  type State (line 8) | type State = {

FILE: src/module/file-path.ts
  type State (line 6) | type State = {

FILE: src/module/git-config.ts
  type State (line 6) | type State = {

FILE: src/module/recall.ts
  type State (line 6) | type State = {

FILE: src/module/resume.ts
  type State (line 7) | type State = {

FILE: src/module/session.ts
  type State (line 8) | type State = {

FILE: src/module/vim-variable.ts
  type State (line 10) | type State = {
  type GlobalVariable (line 19) | type GlobalVariable = {
  type VimOption (line 24) | type VimOption = {
  type CustomProcesses (line 67) | type CustomProcesses = {

FILE: src/plugin/fzf-runner.ts
  constant PREFIX_SPACE (line 5) | const PREFIX_SPACE = "   "
  type Parameter (line 7) | type Parameter = {

FILE: src/plugin/process-runner.ts
  type Args (line 4) | type Args = {

FILE: src/type/args.ts
  type ArgsOptions (line 5) | type ArgsOptions = ReadonlyDeep<ReturnType<ReturnType<typeof argsParser>...

FILE: src/type/command.ts
  type FzfPreviewCommandList (line 13) | type FzfPreviewCommandList = typeof cocCommandDefinition[number]["comman...
  type ExecuteArgs (line 14) | type ExecuteArgs = {

FILE: src/type/connector.ts
  type OpenFile (line 3) | type OpenFile = {
  type ExportQuickFix (line 10) | type ExportQuickFix =

FILE: src/type/fzf.ts
  type FzfCommandDynamicOption (line 14) | type FzfCommandDynamicOption = ReadonlyDeep<{
  type SelectedLine (line 19) | type SelectedLine = string
  type SelectedLines (line 20) | type SelectedLines = ReadonlyArray<SelectedLine>
  type ExpectKeyAndSelectedLines (line 22) | type ExpectKeyAndSelectedLines = ReadonlyArray<string>
  type BaseFzfCommandName (line 24) | type BaseFzfCommandName =
  type CocFzfCommandName (line 83) | type CocFzfCommandName =
  type FzfCommandName (line 93) | type FzfCommandName = BaseFzfCommandName | CocFzfCommandName
  type SourceFuncArgs (line 95) | type SourceFuncArgs = ReadonlyDeep<{
  type FzfCommandBase (line 99) | type FzfCommandBase = ReadonlyDeep<{
  type BaseFzfCommand (line 113) | type BaseFzfCommand = ReadonlyDeep<
  type CocFzfCommand (line 122) | type CocFzfCommand = ReadonlyDeep<
  type FzfCommand (line 131) | type FzfCommand = BaseFzfCommand | CocFzfCommand
  type FzfOptions (line 133) | type FzfOptions = ReadonlyDeep<{
  type FzfCommandDefinitionDefaultOption (line 147) | type FzfCommandDefinitionDefaultOption = ReadonlyDeep<{
  type AddFzfArg (line 164) | type AddFzfArg = ReadonlyDeep<{
  type ResumeQuery (line 169) | type ResumeQuery = string | null
  type Session (line 171) | type Session = {
  type SessionToken (line 179) | type SessionToken = string

FILE: src/type/git.ts
  type GitAction (line 12) | type GitAction = typeof GIT_ACTIONS[number] | "header"
  type GitStatusAction (line 13) | type GitStatusAction = typeof GIT_STATUS_ACTIONS[number] | "header"
  type GitBranchAction (line 14) | type GitBranchAction = typeof GIT_BRANCH_ACTIONS[number] | "header"
  type GitLogAction (line 15) | type GitLogAction = typeof GIT_LOG_ACTIONS[number] | "header"
  type GitStashAction (line 16) | type GitStashAction = typeof GIT_STASH_ACTIONS[number] | "header"
  type GitReflogAction (line 17) | type GitReflogAction = typeof GIT_REFLOG_ACTIONS[number] | "header"
  type GitBranch (line 19) | type GitBranch = ReadonlyDeep<{
  type GitLog (line 26) | type GitLog = ReadonlyDeep<{
  type GitStash (line 34) | type GitStash = ReadonlyDeep<{
  type GitReflog (line 43) | type GitReflog = ReadonlyDeep<{
  type ParsedGitStatus (line 52) | type ParsedGitStatus = ReadonlyDeep<{

FILE: src/type/lsp.ts
  type Location (line 3) | type Location = ReadonlyDeep<{
  type DiagnosticLevel (line 9) | type DiagnosticLevel = "Error" | "Warning" | "Information" | "Hint" | ""
  type Diagnostic (line 11) | type Diagnostic = ReadonlyDeep<{
  type DiagnosticItem (line 18) | type DiagnosticItem = ReadonlyDeep<{

FILE: src/type/process.ts
  type CallbackLine (line 6) | type CallbackLine = string
  type CallbackLines (line 7) | type CallbackLines = ReadonlyArray<CallbackLine>
  type Process (line 9) | type Process = ReadonlyDeep<{
  type Processes (line 15) | type Processes = ReadonlyDeep<ReadonlyArray<Process>>
  type ProcessesName (line 17) | type ProcessesName = typeof PROCESSES_NAME[number]
  type ProcessesDefinition (line 19) | type ProcessesDefinition = ReadonlyDeep<
  type UserProcesses (line 26) | type UserProcesses =
  type CustomProcessesVimVariable (line 36) | type CustomProcessesVimVariable = ReadonlyDeep<{
  type SingleLineConsumer (line 42) | type SingleLineConsumer = ReadonlyDeep<{
  type BulkLineConsumer (line 47) | type BulkLineConsumer = ReadonlyDeep<{
  type LineConsumer (line 52) | type LineConsumer = SingleLineConsumer | BulkLineConsumer
  type CreateProcessCreator (line 54) | type CreateProcessCreator = (
  type OpenCommand (line 58) | type OpenCommand = "edit" | "split" | "vsplit" | "tabedit" | "drop"

FILE: src/type/resource.ts
  type FileData (line 14) | type FileData = ReadonlyDeep<{
  type LineData (line 21) | type LineData = ReadonlyDeep<{
  type BufferData (line 29) | type BufferData = ReadonlyDeep<{
  type CommandPaletteData (line 37) | type CommandPaletteData = ReadonlyDeep<{
  type GitActionData (line 44) | type GitActionData = ReadonlyDeep<{
  type GitStatusData (line 51) | type GitStatusData = ReadonlyDeep<{
  type GitStatusActionData (line 60) | type GitStatusActionData = ReadonlyDeep<{
  type GitBranchData (line 68) | type GitBranchData = ReadonlyDeep<{
  type GitBranchActionData (line 78) | type GitBranchActionData = ReadonlyDeep<{
  type GitLogData (line 86) | type GitLogData = ReadonlyDeep<{
  type GitLogActionData (line 97) | type GitLogActionData = ReadonlyDeep<{
  type GitStashData (line 106) | type GitStashData = ReadonlyDeep<{
  type GitStashActionData (line 118) | type GitStashActionData = ReadonlyDeep<{
  type GitReflogData (line 127) | type GitReflogData = ReadonlyDeep<{
  type GitReflogActionData (line 138) | type GitReflogActionData = ReadonlyDeep<{
  type RegisterData (line 147) | type RegisterData = ReadonlyDeep<{
  type GitPrData (line 155) | type GitPrData = ReadonlyDeep<{
  type ResourceData (line 162) | type ResourceData =
  type ResourceLine (line 181) | type ResourceLine = ReadonlyDeep<{
  type ResourceLines (line 186) | type ResourceLines = ReadonlyArray<ResourceLine>
  type JsonResource (line 188) | type JsonResource = ReadonlyDeep<{
  type TextResource (line 194) | type TextResource = ReadonlyDeep<{
  type Resource (line 200) | type Resource = JsonResource | TextResource

FILE: src/type/rpc.ts
  type RpcExecCommandParams (line 3) | type RpcExecCommandParams = {
  type RpcCallProcessParams (line 8) | type RpcCallProcessParams = {
  type RpcExecProcessCallbackParams (line 12) | type RpcExecProcessCallbackParams = {
  type DispatchResumeQueryParams (line 17) | type DispatchResumeQueryParams = {

FILE: src/type/syntax.ts
  type Color (line 1) | type Color = "black" | "red" | "green" | "yellow" | "blue" | "magenta" |...

FILE: src/type/system.ts
  type CommandResult (line 3) | type CommandResult = ReadonlyDeep<{

FILE: src/type/vim-variable.ts
  type GlobalVariableName (line 6) | type GlobalVariableName = keyof typeof vimVariableAssociation
  type GlobalVariables (line 7) | type GlobalVariables = ReadonlyDeep<{ [key in GlobalVariableName]: VimVa...
  type VimOptionName (line 8) | type VimOptionName = typeof vimOptions[number]

FILE: src/type/vim.ts
  type VimBuffer (line 3) | type VimBuffer = ReadonlyDeep<{
Condensed preview — 295 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (520K chars).
[
  {
    "path": ".eslintignore",
    "chars": 13,
    "preview": ".eslintrc.js\n"
  },
  {
    "path": ".eslintrc.js",
    "chars": 3051,
    "preview": "module.exports = {\n  parser: \"@typescript-eslint/parser\",\n  extends: [\n    \"airbnb-base\",\n    \"plugin:@typescript-eslint"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "chars": 583,
    "preview": "## Problems summary\n\n\n### Expected\n\n\n### Environment Information\n\n- fzf-preview version (package.json):\n\n- OS:\n\n- Vim/Ne"
  },
  {
    "path": ".github/issue_example/Dockerfile",
    "chars": 1364,
    "preview": "FROM ubuntu:focal\n\nENV DEBIAN_FRONTEND=noninteractive\n\n# Neovim\nRUN apt update && apt install -y ninja-build gettext lib"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 936,
    "preview": "name: Build\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps"
  },
  {
    "path": ".github/workflows/can-release.yml",
    "chars": 347,
    "preview": "name: Can release\n\non:\n  repository_dispatch:\n    types: \n      - can-release\n\njobs:\n  can_release:\n    runs-on: ubuntu-"
  },
  {
    "path": ".github/workflows/release-coc.yml",
    "chars": 1036,
    "preview": "name: Release coc extensions\n\non:\n  workflow_run:\n    workflows:\n      - Can release\n    branches:\n      - main\n    type"
  },
  {
    "path": ".github/workflows/release-remote.yml",
    "chars": 973,
    "preview": "name: Release remote plugin\n\non:\n  workflow_run:\n    workflows:\n      - Can release\n    branches:\n      - main\n    types"
  },
  {
    "path": ".github/workflows/release-rpc.yml",
    "chars": 966,
    "preview": "name: Release Vim script RPC\n\non:\n  workflow_run:\n    workflows:\n      - Can release\n    branches:\n      - main\n    type"
  },
  {
    "path": ".gitignore",
    "chars": 92,
    "preview": "/node_modules\n\n/lib\n/rplugin/node/fzf-preview.vim/index.js\n/bin/preview_fzf_grep\n\n/doc/tags\n"
  },
  {
    "path": ".luarc.json",
    "chars": 221,
    "preview": "{\n    \"$schema\": \"https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json\",\n    \"Lua.diagnostics"
  },
  {
    "path": ".markdownlint.json",
    "chars": 119,
    "preview": "{\n  \"line-length\": false,\n  \"no-inline-html\": false,\n  \"no-duplicate-header\": false,\n  \"commands-show-output\": false\n}\n"
  },
  {
    "path": ".prettierrc.json",
    "chars": 41,
    "preview": "{\n  \"semi\": false,\n  \"printWidth\": 120\n}\n"
  },
  {
    "path": "LICENSE",
    "chars": 1066,
    "preview": "MIT License\n\nCopyright (c) 2018 Yuki Yano\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\n"
  },
  {
    "path": "README.md",
    "chars": 29891,
    "preview": "# ![logo](https://user-images.githubusercontent.com/5423775/104124691-7f8b4c00-5395-11eb-85d6-93b1c55cf0c8.png)\n\n[![Buil"
  },
  {
    "path": "autoload/fzf_preview/remote/consumer/git.vim",
    "chars": 8248,
    "preview": "\" using pseudo synchronous call in Vim8 because Vim8 asynchronous call is unstable\nfunction! s:execute(command) abort\n  "
  },
  {
    "path": "autoload/fzf_preview/remote/consumer/register.vim",
    "chars": 257,
    "preview": "function! fzf_preview#remote#consumer#register#set(str, options) abort\n  call setreg('\"', a:str, a:options)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/exec_fzf.vim",
    "chars": 710,
    "preview": "function! fzf_preview#remote#exec_fzf#exec(command, env, ...) abort\n  let session_token = get(a:, 1, '')\n\n  if a:env ==#"
  },
  {
    "path": "autoload/fzf_preview/remote/handler_to_process.vim",
    "chars": 2491,
    "preview": "function! fzf_preview#remote#handler_to_process#call_funcref_or_fallback_default_process(env, default_process_function_n"
  },
  {
    "path": "autoload/fzf_preview/remote/mr.vim",
    "chars": 776,
    "preview": "function! fzf_preview#remote#mr#append(path, cache_path) abort\n  let files = s:get_files_with_create_directory(a:cache_p"
  },
  {
    "path": "autoload/fzf_preview/remote/process.vim",
    "chars": 384,
    "preview": "function! fzf_preview#remote#process#get_default_processes(name, ...) abort\n  let env = get(a:, 1, 'remote')\n\n  if env ="
  },
  {
    "path": "autoload/fzf_preview/remote/resource/all_buffers.vim",
    "chars": 578,
    "preview": "function! fzf_preview#remote#resource#all_buffers#get() abort\n  let buffers = []\n  for bufinfo in copy(getbufinfo())\n   "
  },
  {
    "path": "autoload/fzf_preview/remote/resource/bookmarks.vim",
    "chars": 756,
    "preview": "function! fzf_preview#remote#resource#bookmarks#get() abort\n  return filter(map(bm#location_list(), {\n \\ _, b -> s:bookm"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/buffers.vim",
    "chars": 1325,
    "preview": "function! fzf_preview#remote#resource#buffers#get_other_buffers() abort\n  let list = filter(range(1, bufnr('$')),\n  \\ { "
  },
  {
    "path": "autoload/fzf_preview/remote/resource/changes.vim",
    "chars": 456,
    "preview": "function! fzf_preview#remote#resource#changes#get() abort\n  if !filereadable(expand('%'))\n    return []\n  endif\n\n  let l"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/directory_files.vim",
    "chars": 116,
    "preview": "function! fzf_preview#remote#resource#directory_files#get(command) abort\n  return systemlist(a:command)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/git_files.vim",
    "chars": 110,
    "preview": "function! fzf_preview#remote#resource#git_files#get(command) abort\n  return systemlist(a:command)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/git_status.vim",
    "chars": 111,
    "preview": "function! fzf_preview#remote#resource#git_status#get(command) abort\n  return systemlist(a:command)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/grep.vim",
    "chars": 105,
    "preview": "function! fzf_preview#remote#resource#grep#get(command) abort\n  return systemlist(a:command)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/jumps.vim",
    "chars": 429,
    "preview": "function! fzf_preview#remote#resource#jumps#get() abort\n  let splitted_project_path = split(fzf_preview#remote#util#proj"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/lines.vim",
    "chars": 106,
    "preview": "function! fzf_preview#remote#resource#lines#get(command) abort\n  return systemlist(a:command)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/marks.vim",
    "chars": 844,
    "preview": "function! fzf_preview#remote#resource#marks#get() abort\n  let splitted_project_path = split(fzf_preview#remote#util#proj"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/memolist.vim",
    "chars": 233,
    "preview": "function! fzf_preview#remote#resource#memolist#files() abort\n  return memolist#files()\nendfunction\n\nfunction! fzf_previe"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/project_files.vim",
    "chars": 114,
    "preview": "function! fzf_preview#remote#resource#project_files#get(command) abort\n  return systemlist(a:command)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/quickfix_and_locationlist.vim",
    "chars": 1220,
    "preview": "function! fzf_preview#remote#resource#quickfix_and_locationlist#get(type) abort\n  let lines = s:get_quickfix_or_location"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/tags.vim",
    "chars": 907,
    "preview": "function! fzf_preview#remote#resource#tags#ctags() abort\n  return s:read_tag_file()\nendfunction\n\nfunction! s:read_tag_fi"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/todo_comments.vim",
    "chars": 209,
    "preview": "function! fzf_preview#remote#resource#todo_comments#get() abort\n  lua vim.g.fzf_preview_todo_keywords = vim.fn.keys((req"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/util.vim",
    "chars": 114,
    "preview": "function! fzf_preview#remote#resource#util#exec_command(command) abort\n  return systemlist(a:command)\nendfunction\n"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/vim_command.vim",
    "chars": 787,
    "preview": "function! fzf_preview#remote#resource#vim_command#commands() abort\n  return map(getcompletion('', 'command'), {_, comman"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/vim_lsp.vim",
    "chars": 4085,
    "preview": "let s:references = {}\nlet s:definition = {}\nlet s:type_definition = {}\nlet s:implementation = {}\n\nfunction! fzf_preview#"
  },
  {
    "path": "autoload/fzf_preview/remote/resource/vista.vim",
    "chars": 971,
    "preview": "function! fzf_preview#remote#resource#vista#ctags() abort\n  let result = vista#executive#ctags#ProjectRun()\n  let keys ="
  },
  {
    "path": "autoload/fzf_preview/remote/resource/yankround.vim",
    "chars": 245,
    "preview": "function! fzf_preview#remote#resource#yankround#get() abort\n  let histories = map(copy(g:_yankround_cache), 'split(v:val"
  },
  {
    "path": "autoload/fzf_preview/remote/runner.vim",
    "chars": 1089,
    "preview": "function! fzf_preview#remote#runner#fzf_run(params) abort\n  let source = a:params['source']\n  let options = a:params['op"
  },
  {
    "path": "autoload/fzf_preview/remote/tagstack.vim",
    "chars": 339,
    "preview": "function! fzf_preview#remote#tagstack#push_tag_stack() abort\n  let from = [bufnr('%'), line('.'), col('.'), 0]\n  let tag"
  },
  {
    "path": "autoload/fzf_preview/remote/util.vim",
    "chars": 2108,
    "preview": "function! fzf_preview#remote#util#is_git_directory() abort\n  let git_root = system('git rev-parse --show-toplevel 2>/dev"
  },
  {
    "path": "autoload/fzf_preview/remote/variable.vim",
    "chars": 2337,
    "preview": "function! fzf_preview#remote#variable#get_global_variables() abort\n  return {\n  \\   'fzfPreviewDefaultFzfOptions': g:fzf"
  },
  {
    "path": "autoload/fzf_preview/remote/window.vim",
    "chars": 1785,
    "preview": "\" TODO: Command other than fzf-preview saves wrong resumes\nlet s:resource_command_name = ''\n\nfunction! fzf_preview#remot"
  },
  {
    "path": "autoload/fzf_preview/rpc/server.vim",
    "chars": 776,
    "preview": "let s:JSON = vital#fzf_preview#import('VS.RPC.JSON')\nlet s:Server = {}\n\nfunction! fzf_preview#rpc#server#import() abort\n"
  },
  {
    "path": "autoload/fzf_preview/rpc.vim",
    "chars": 3628,
    "preview": "let s:Promise = vital#fzf_preview#import('Async.Promise')\nlet s:Server = fzf_preview#rpc#server#import()\n\nlet s:root_dir"
  },
  {
    "path": "autoload/fzf_preview.vim",
    "chars": 88,
    "preview": "function! fzf_preview#install() abort\n  !yarn install\n  UpdateRemotePlugins\nendfunction\n"
  },
  {
    "path": "autoload/vital/_fzf_preview/Async/Later.vim",
    "chars": 1970,
    "preview": "\" ___vital___\n\" NOTE: lines between '\" ___vital___' is generated by :Vitalize.\n\" Do not modify the code nor insert new l"
  },
  {
    "path": "autoload/vital/_fzf_preview/Async/Promise.vim",
    "chars": 9969,
    "preview": "\" ___vital___\n\" NOTE: lines between '\" ___vital___' is generated by :Vitalize.\n\" Do not modify the code nor insert new l"
  },
  {
    "path": "autoload/vital/_fzf_preview/VS/Event/Emitter.vim",
    "chars": 1613,
    "preview": "\" ___vital___\n\" NOTE: lines between '\" ___vital___' is generated by :Vitalize.\n\" Do not modify the code nor insert new l"
  },
  {
    "path": "autoload/vital/_fzf_preview/VS/RPC/JSON.vim",
    "chars": 5212,
    "preview": "\" ___vital___\n\" NOTE: lines between '\" ___vital___' is generated by :Vitalize.\n\" Do not modify the code nor insert new l"
  },
  {
    "path": "autoload/vital/_fzf_preview/VS/System/Job.vim",
    "chars": 3782,
    "preview": "\" ___vital___\n\" NOTE: lines between '\" ___vital___' is generated by :Vitalize.\n\" Do not modify the code nor insert new l"
  },
  {
    "path": "autoload/vital/_fzf_preview.vim",
    "chars": 252,
    "preview": "let s:_plugin_name = expand('<sfile>:t:r')\n\nfunction! vital#{s:_plugin_name}#new() abort\n  return vital#{s:_plugin_name["
  },
  {
    "path": "autoload/vital/fzf_preview.vim",
    "chars": 10251,
    "preview": "let s:plugin_name = expand('<sfile>:t:r')\nlet s:vital_base_dir = expand('<sfile>:h')\nlet s:project_root = expand('<sfile"
  },
  {
    "path": "autoload/vital/fzf_preview.vital",
    "chars": 111,
    "preview": "fzf_preview\n8e269699b0b993fc68599ed94571db5d3e933bcf\n\nVS.RPC.JSON\nAsync.Promise\nVS.System.Job\nVS.Event.Emitter\n"
  },
  {
    "path": "bin/git_actions_preview",
    "chars": 869,
    "preview": "#!/usr/bin/env bash\n\nif [[ $1 == 'status' ]]; then\n\tgit -c color.status=always status\nelif [[ $1 == 'branch' ]]; then\n\tg"
  },
  {
    "path": "bin/git_blame_pr",
    "chars": 1111,
    "preview": "#! /usr/bin/perl\n#\n# Written in 2017 by Kazuho Oku\n#\n# To the extent possible under law, the author(s) have dedicated al"
  },
  {
    "path": "bin/preview_yankround_register",
    "chars": 202,
    "preview": "#!/usr/bin/env bash\n\nif which gsed > /dev/null && which gcut > /dev/null; then\n  gsed -n \"$2,$2p\" \"$1\" | gcut -f 2 | gse"
  },
  {
    "path": "doc/fzf_preview_vim.txt",
    "chars": 28033,
    "preview": "*fzf-preview-vim.txt*\n\nAuthor:  yuki-yano\nLicense: MIT\nVersion: 0.1\n\n\n=================================================="
  },
  {
    "path": "jest.config.ts",
    "chars": 369,
    "preview": "import type { Config } from \"@jest/types\"\n\nconst config: Config.InitialOptions = {\n  verbose: true,\n  preset: \"ts-jest/p"
  },
  {
    "path": "lua/fzf-preview/init.lua",
    "chars": 2591,
    "preview": "local M = {}\n\nlocal lsp = vim.lsp\n\nfunction M.nvim_lsp_references()\n  vim.g.fzf_preview_nvim_lsp_references = nil\n\n  loc"
  },
  {
    "path": "package.json",
    "chars": 3722,
    "preview": "{\n  \"name\": \"coc-fzf-preview\",\n  \"version\": \"2.16.6\",\n  \"description\": \"The plugin that powerfully integrates fzf and (N"
  },
  {
    "path": "plugin/fzf_preview.vim",
    "chars": 12746,
    "preview": "scriptencoding utf-8\n\nif exists('s:loaded')\n  finish\nendif\nlet s:loaded = 1\n\nif !exists('$FZF_PREVIEW_PREVIEW_BAT_THEME'"
  },
  {
    "path": "rplugin/node/fzf-preview.vim/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "scripts/preview.js",
    "chars": 2344,
    "preview": "const { execSync } = require(\"child_process\")\nconst path = require(\"path\")\nconst { existsSync } = require(\"fs\")\nconst ut"
  },
  {
    "path": "src/@types/index.d.ts",
    "chars": 204,
    "preview": "declare namespace NodeJS {\n  interface ProcessEnv {\n    readonly VIMRUNTIME: string\n    readonly FZF_PREVIEW_PLUGIN_HELP"
  },
  {
    "path": "src/args/add-fzf-arg-parser.test.ts",
    "chars": 1224,
    "preview": "import { parseAddFzfArg } from \"@/args/add-fzf-arg-parser\"\n\ndescribe(\"parseAddFzfArgs\", () => {\n  it('parseAddFzfArgs(\"-"
  },
  {
    "path": "src/args/add-fzf-arg-parser.ts",
    "chars": 1303,
    "preview": "import { argsParser } from \"@/args/parser\"\nimport type { AddFzfArg, ArgsOptions } from \"@/type\"\n\nconst optionsToAddFzfAr"
  },
  {
    "path": "src/args/directory-files-args-parser.ts",
    "chars": 428,
    "preview": "import { argsParser } from \"@/args/parser\"\nimport type { SourceFuncArgs } from \"@/type\"\n\nexport const parseDictionaryFil"
  },
  {
    "path": "src/args/empty-source-func-args-parser.ts",
    "chars": 154,
    "preview": "import type { SourceFuncArgs } from \"@/type\"\n\nexport const parseEmptySourceFuncArgs = (_args: string): SourceFuncArgs =>"
  },
  {
    "path": "src/args/experimental-parser.ts",
    "chars": 289,
    "preview": "import { argsParser } from \"@/args/parser\"\n\ntype Experimental = {\n  fast: boolean\n}\n\nexport const parseExperimental = (a"
  },
  {
    "path": "src/args/files-from-resources-parser.ts",
    "chars": 694,
    "preview": "import { argsParser } from \"@/args/parser\"\nimport { FILE_RESOURCES } from \"@/const/fzf-option\"\nimport type { SourceFuncA"
  },
  {
    "path": "src/args/grep-args-parser.ts",
    "chars": 376,
    "preview": "import { argsParser } from \"@/args/parser\"\nimport type { SourceFuncArgs } from \"@/type\"\n\nexport const parseGrepArgs = (a"
  },
  {
    "path": "src/args/index.ts",
    "chars": 263,
    "preview": "export * from \"@/args/add-fzf-arg-parser\"\nexport * from \"@/args/directory-files-args-parser\"\nexport * from \"@/args/empty"
  },
  {
    "path": "src/args/parser.ts",
    "chars": 425,
    "preview": "import yargs from \"yargs\"\n\nexport const argsParser = () => {\n  return yargs\n    .options(\"add-fzf-arg\", { type: \"string\""
  },
  {
    "path": "src/args/processes-parser.test.ts",
    "chars": 638,
    "preview": "import { parseProcesses } from \"@/args/processes-parser\"\n\ndescribe(\"parseProcesses\", () => {\n  it('parseProcesses(\"foo\")"
  },
  {
    "path": "src/args/processes-parser.ts",
    "chars": 1226,
    "preview": "import { isObject } from \"lodash\"\n\nimport { argsParser } from \"@/args/parser\"\nimport { globalVariableSelector } from \"@/"
  },
  {
    "path": "src/args/resume-parser.ts",
    "chars": 477,
    "preview": "import { argsParser } from \"@/args/parser\"\nimport { resumeSelector } from \"@/module/selector/resume\"\nimport type { FzfCo"
  },
  {
    "path": "src/args/session-parser.ts",
    "chars": 552,
    "preview": "import { argsParser } from \"@/args/parser\"\nimport { sessionSelector } from \"@/module/selector/session\"\nimport type { Ses"
  },
  {
    "path": "src/association/coc-command.ts",
    "chars": 3536,
    "preview": "import { parseEmptySourceFuncArgs } from \"@/args\"\nimport { commandDefinition, vimCommandOptions } from \"@/association/co"
  },
  {
    "path": "src/association/command.ts",
    "chars": 21571,
    "preview": "import { parseDictionaryFilesArgs, parseEmptySourceFuncArgs, parseGrepArgs } from \"@/args\"\nimport { parseResources } fro"
  },
  {
    "path": "src/association/vim-variable.ts",
    "chars": 2095,
    "preview": "export const vimVariableAssociation = {\n  fzfPreviewDefaultFzfOptions: \"fzf_preview_default_fzf_options\",\n  fzfPreviewUs"
  },
  {
    "path": "src/coc.ts",
    "chars": 503,
    "preview": "import type { ExtensionContext } from \"coc.nvim\"\nimport { commands } from \"coc.nvim\"\n\nimport {\n  initializeExtension,\n  "
  },
  {
    "path": "src/connector/bookmarks.ts",
    "chars": 351,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall } from \"@/plugin\"\n\ntype Bookmark = ReadonlyDeep<{\n  f"
  },
  {
    "path": "src/connector/buffers.ts",
    "chars": 1245,
    "preview": "import { pluginCall, pluginCommand } from \"@/plugin\"\nimport type { VimBuffer } from \"@/type\"\n\nexport const getBuffers = "
  },
  {
    "path": "src/connector/changes.ts",
    "chars": 198,
    "preview": "import { pluginCall } from \"@/plugin\"\n\nexport const getChanges = async (): Promise<ReadonlyArray<string>> =>\n  (await pl"
  },
  {
    "path": "src/connector/coc.ts",
    "chars": 9938,
    "preview": "import type {\n  CancellationToken,\n  DefinitionProvider,\n  DiagnosticItem,\n  ImplementationProvider,\n  Position,\n  Range"
  },
  {
    "path": "src/connector/convert-for-fzf.ts",
    "chars": 3455,
    "preview": "import stripAnsi from \"strip-ansi\"\nimport type { ReadonlyDeep } from \"type-fest\"\n\nimport { execGitStatus } from \"@/conne"
  },
  {
    "path": "src/connector/directory-files.ts",
    "chars": 522,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { pluginCall } from \"@/plugin\"\n\nexport co"
  },
  {
    "path": "src/connector/fzf.ts",
    "chars": 697,
    "preview": "import { sessionModule } from \"@/module/session\"\nimport { pluginCall } from \"@/plugin\"\nimport { dispatch } from \"@/store"
  },
  {
    "path": "src/connector/git.ts",
    "chars": 8501,
    "preview": "import stripAnsi from \"strip-ansi\"\n\nimport { GIT_BRANCH_COMMAND } from \"@/const/git\"\nimport {\n  createGitLogCommand,\n  g"
  },
  {
    "path": "src/connector/grep.ts",
    "chars": 424,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { pluginCall } from \"@/plugin\"\n\nexport co"
  },
  {
    "path": "src/connector/jumps.ts",
    "chars": 313,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall } from \"@/plugin\"\n\ntype Jump = ReadonlyDeep<{\n  file:"
  },
  {
    "path": "src/connector/lines.ts",
    "chars": 502,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { pluginCall } from \"@/plugin\"\n\nexport co"
  },
  {
    "path": "src/connector/lsp.ts",
    "chars": 2481,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\nimport type { Location as LspLocation, LocationLink } from \"vscode-languag"
  },
  {
    "path": "src/connector/marks.ts",
    "chars": 313,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall } from \"@/plugin\"\n\ntype Mark = ReadonlyDeep<{\n  file:"
  },
  {
    "path": "src/connector/memolist.ts",
    "chars": 607,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { pluginCall } from \"@/plugin\"\n\nexport co"
  },
  {
    "path": "src/connector/nvim-lsp.ts",
    "chars": 3142,
    "preview": "import type { LocationLink } from \"coc.nvim\"\nimport type { Location as LspLocation } from \"vscode-languageserver-types\"\n"
  },
  {
    "path": "src/connector/old-files.ts",
    "chars": 174,
    "preview": "import { pluginGetVvar } from \"@/plugin\"\n\nexport const getOldFiles = async (): Promise<ReadonlyArray<string>> =>\n  (awai"
  },
  {
    "path": "src/connector/open-bufnr.ts",
    "chars": 350,
    "preview": "import { pluginCommand } from \"@/plugin\"\nimport type { OpenCommand } from \"@/type\"\n\nexport const openBufnr = async (open"
  },
  {
    "path": "src/connector/open-file.ts",
    "chars": 833,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall, pluginCommand } from \"@/plugin\"\nimport type { Export"
  },
  {
    "path": "src/connector/project-files.ts",
    "chars": 487,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { pluginCall } from \"@/plugin\"\n\nexport co"
  },
  {
    "path": "src/connector/quickfix-and-locationlist.ts",
    "chars": 427,
    "preview": "import { pluginCall } from \"@/plugin\"\n\nexport const getQuickFix = async (): Promise<ReadonlyArray<string>> =>\n  (await p"
  },
  {
    "path": "src/connector/register.ts",
    "chars": 374,
    "preview": "import { pluginCall } from \"@/plugin\"\n\nexport const setRegister = async (str: string, options: string): Promise<void> =>"
  },
  {
    "path": "src/connector/resume.ts",
    "chars": 521,
    "preview": "import { resumeModule } from \"@/module/resume\"\nimport { pluginCall } from \"@/plugin\"\nimport { dispatch } from \"@/store\"\n"
  },
  {
    "path": "src/connector/tags.ts",
    "chars": 326,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall } from \"@/plugin\"\n\ntype Tag = ReadonlyDeep<{\n  name: "
  },
  {
    "path": "src/connector/todo-comments.ts",
    "chars": 667,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { pluginCall } from \"@/plugin\"\n\nexport co"
  },
  {
    "path": "src/connector/util.ts",
    "chars": 556,
    "preview": "import { pluginCall, pluginCommand } from \"@/plugin\"\nimport { execAsyncCommand } from \"@/system/command\"\n\nexport const v"
  },
  {
    "path": "src/connector/vim-command.ts",
    "chars": 918,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall } from \"@/plugin\"\n\ntype VimCommand = ReadonlyDeep<{\n "
  },
  {
    "path": "src/connector/vim-help.ts",
    "chars": 605,
    "preview": "import { pluginCall } from \"@/plugin\"\n\nexport const execHelpTags = async (args: string): Promise<ReadonlyArray<string>> "
  },
  {
    "path": "src/connector/vim-lsp.ts",
    "chars": 6938,
    "preview": "import { isEqual } from \"lodash\"\nimport type { Diagnostic as LspDiagnostic, Location as VimLspLocation, LocationLink } f"
  },
  {
    "path": "src/connector/vista.ts",
    "chars": 733,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall } from \"@/plugin\"\n\nexport type VistaTag = ReadonlyDee"
  },
  {
    "path": "src/connector/yankround.ts",
    "chars": 344,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { pluginCall } from \"@/plugin\"\n\ntype YankHistory = ReadonlyDeep<{\n"
  },
  {
    "path": "src/const/fzf-handler.ts",
    "chars": 55,
    "preview": "export const HANDLER_NAME = \"FzfPreviewHandleResource\"\n"
  },
  {
    "path": "src/const/fzf-option.ts",
    "chars": 316,
    "preview": "export const DEFINED_FZF_OPTION_TYPES_IN_PLUGIN = [\"--ansi\", \"--bind\", \"--expect\"] as const\nexport const FILE_RESOURCES "
  },
  {
    "path": "src/const/fzf-processes.ts",
    "chars": 377,
    "preview": "export const PROCESSES_NAME = [\n  \"open-file\",\n  \"open-file-with-tag-stack\",\n  \"open-buffer\",\n  \"open-bufnr\",\n  \"command"
  },
  {
    "path": "src/const/fzf-resource.ts",
    "chars": 48,
    "preview": "export const USE_DEV_ICONS_PATTERN_LIMIT = 3000\n"
  },
  {
    "path": "src/const/fzf-runner.ts",
    "chars": 147,
    "preview": "import { TEMPORALLY_DATA_FILE_PATH } from \"@/const/system\"\n\nexport const TAIL_RESOURCE_FILE_COMMAND = `tail -n +1 -f ${T"
  },
  {
    "path": "src/const/git.ts",
    "chars": 1965,
    "preview": "export const GIT_ACTIONS = [\n  \"status\",\n  \"branch\",\n  \"log\",\n  \"current-log\",\n  \"stash\",\n  \"reflog\",\n  \"commit\",\n  \"com"
  },
  {
    "path": "src/const/module.ts",
    "chars": 263,
    "preview": "export const VIM_VARIABLE = \"vim_variable\"\nexport const EXECUTE_COMMAND = \"execute_command\"\nexport const RESUME = \"resum"
  },
  {
    "path": "src/const/system.ts",
    "chars": 210,
    "preview": "export const BUFFER_TAGS_COMMAND = \"ctags -f - --sort=yes --excmd=number\"\n\n// Default: 1024 * 1024\nexport const MAX_BUFF"
  },
  {
    "path": "src/fzf/command/execute-fast.ts",
    "chars": 2342,
    "preview": "import fs from \"fs\"\n\nimport { convertForFzf } from \"@/connector/convert-for-fzf\"\nimport { setResourceCommandName } from "
  },
  {
    "path": "src/fzf/command/execute-normal.ts",
    "chars": 1765,
    "preview": "import { convertForFzf } from \"@/connector/convert-for-fzf\"\nimport { setResourceCommandName } from \"@/connector/resume\"\n"
  },
  {
    "path": "src/fzf/command/index.ts",
    "chars": 3559,
    "preview": "import { parseAddFzfArg, parseGrepArgs, parseProcesses, parseResume } from \"@/args\"\nimport { parseExperimental } from \"@"
  },
  {
    "path": "src/fzf/command/util.ts",
    "chars": 425,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport type { ResourceLines } from \"@/type\"\n\nexp"
  },
  {
    "path": "src/fzf/function/index.ts",
    "chars": 740,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { processesDefinition } from \"@/fzf/process\"\nimport { createProces"
  },
  {
    "path": "src/fzf/handler/index.ts",
    "chars": 1735,
    "preview": "import { createProcessFunctionName } from \"@/fzf/util\"\nimport type { State as ExecuteCommandState } from \"@/module/execu"
  },
  {
    "path": "src/fzf/option/convert.test.ts",
    "chars": 2417,
    "preview": "import { fzfOptionsToString, joinBind } from \"@/fzf/option/convert\"\nimport type { FzfOptions } from \"@/type\"\n\nconst defa"
  },
  {
    "path": "src/fzf/option/convert.ts",
    "chars": 1758,
    "preview": "import { DEFINED_FZF_OPTION_TYPES_IN_PLUGIN } from \"@/const/fzf-option\"\nimport type { FzfOptions } from \"@/type\"\n\nexport"
  },
  {
    "path": "src/fzf/option/generator.test.ts",
    "chars": 11691,
    "preview": "import { generateOptions } from \"@/fzf/option/generator\"\nimport { openFileProcesses as defaultProcesses } from \"@/fzf/pr"
  },
  {
    "path": "src/fzf/option/generator.ts",
    "chars": 5985,
    "preview": "import expandTilde from \"expand-tilde\"\nimport { isObject } from \"lodash\"\n\nimport { PREVIEW_WINDOW_LAYOUT_CHANGE_SIZE } f"
  },
  {
    "path": "src/fzf/process/command-palette.ts",
    "chars": 482,
    "preview": "import { editCommandPaletteConsumer, execCommandPaletteConsumer } from \"@/fzf/process/consumer/command-palette\"\nimport {"
  },
  {
    "path": "src/fzf/process/consumer/command-palette.ts",
    "chars": 593,
    "preview": "import { editVimCommand, execVimCommand } from \"@/connector/vim-command\"\nimport { createSingleLineConsumer } from \"@/fzf"
  },
  {
    "path": "src/fzf/process/consumer/git-action.ts",
    "chars": 1850,
    "preview": "import { gitCommit, gitFetch, gitPull, gitPush } from \"@/connector/git\"\nimport { chainFzfCommand, createSingleLineConsum"
  },
  {
    "path": "src/fzf/process/consumer/git-branch-action.ts",
    "chars": 3766,
    "preview": "import {\n  gitDeleteBranch,\n  gitDiff,\n  gitMerge,\n  gitRebase,\n  gitRebaseInteractive,\n  gitRenameBranch,\n  gitReset,\n "
  },
  {
    "path": "src/fzf/process/consumer/git-branch.ts",
    "chars": 406,
    "preview": "import { chainFzfCommand, createBulkLineConsumer } from \"@/fzf/process/consumer\"\nimport type { GitBranchData } from \"@/t"
  },
  {
    "path": "src/fzf/process/consumer/git-log-action.ts",
    "chars": 2886,
    "preview": "import { gitCommit, gitDiff, gitRebaseInteractive, gitReset, gitShow, gitSwitch, gitYank } from \"@/connector/git\"\nimport"
  },
  {
    "path": "src/fzf/process/consumer/git-log.ts",
    "chars": 778,
    "preview": "import { gitShow } from \"@/connector/git\"\nimport { vimEchoMessage } from \"@/connector/util\"\nimport { chainFzfCommand, cr"
  },
  {
    "path": "src/fzf/process/consumer/git-reflog-action.ts",
    "chars": 2156,
    "preview": "import { gitDiff, gitReset, gitShow, gitSwitch, gitYank } from \"@/connector/git\"\nimport { chainFzfCommand, createSingleL"
  },
  {
    "path": "src/fzf/process/consumer/git-reflog.ts",
    "chars": 405,
    "preview": "import { chainFzfCommand, createBulkLineConsumer } from \"@/fzf/process/consumer\"\nimport type { GitReflogData } from \"@/t"
  },
  {
    "path": "src/fzf/process/consumer/git-stash-action.ts",
    "chars": 1959,
    "preview": "import { gitDiff, gitShow, gitStashApply, gitStashDrop, gitStashPop, gitYank } from \"@/connector/git\"\nimport { chainFzfC"
  },
  {
    "path": "src/fzf/process/consumer/git-stash.ts",
    "chars": 1030,
    "preview": "import { gitShow, gitStashCreate } from \"@/connector/git\"\nimport { vimEchoMessage } from \"@/connector/util\"\nimport { cha"
  },
  {
    "path": "src/fzf/process/consumer/git-status-action.ts",
    "chars": 2187,
    "preview": "import {\n  gitAdd,\n  gitAddIntentToAdd,\n  gitChaperon,\n  gitPatch,\n  gitReset,\n  gitResetIntentToAdd,\n  gitRestore,\n} fr"
  },
  {
    "path": "src/fzf/process/consumer/git-status.ts",
    "chars": 1470,
    "preview": "import { gitAdd, gitCommit, gitReset } from \"@/connector/git\"\nimport { vimEchoMessage } from \"@/connector/util\"\nimport {"
  },
  {
    "path": "src/fzf/process/consumer/git.ts",
    "chars": 1931,
    "preview": "import { gitCreateBranch, gitSwitch } from \"@/connector/git\"\nimport { vimEchoMessage } from \"@/connector/util\"\nimport { "
  },
  {
    "path": "src/fzf/process/consumer/index.ts",
    "chars": 1109,
    "preview": "import { v4 as uuidv4 } from \"uuid\"\n\nimport { execFzfCommand } from \"@/connector/fzf\"\nimport { sessionModule } from \"@/m"
  },
  {
    "path": "src/fzf/process/consumer/open-buffer.ts",
    "chars": 1538,
    "preview": "import { deleteBuffer } from \"@/connector/buffers\"\nimport { openFile } from \"@/connector/open-file\"\nimport { createSingl"
  },
  {
    "path": "src/fzf/process/consumer/open-bufnr.ts",
    "chars": 845,
    "preview": "import { openBufnr } from \"@/connector/open-bufnr\"\nimport { createSingleLineConsumer } from \"@/fzf/process/consumer\"\nimp"
  },
  {
    "path": "src/fzf/process/consumer/open-file.test.ts",
    "chars": 3445,
    "preview": "import { exportQuickFix, openFile } from \"@/connector/open-file\"\nimport { editConsumer, exportQuickfixConsumer, splitCon"
  },
  {
    "path": "src/fzf/process/consumer/open-file.ts",
    "chars": 2804,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport { exportQuickFix, openFile } from \"@/connector/open-file\"\nimport {"
  },
  {
    "path": "src/fzf/process/consumer/open-pr.ts",
    "chars": 414,
    "preview": "import { createSingleLineConsumer } from \"@/fzf/process/consumer\"\nimport { execSyncCommand } from \"@/system/command\"\n\n//"
  },
  {
    "path": "src/fzf/process/consumer/register.ts",
    "chars": 609,
    "preview": "import { pasteRegister as pasteVimRegister,setRegister as setVimRegister } from \"@/connector/register\"\nimport { createSi"
  },
  {
    "path": "src/fzf/process/git-action.ts",
    "chars": 345,
    "preview": "import { execGitActionConsumer } from \"@/fzf/process/consumer/git-action\"\nimport { createProcessCreator } from \"@/fzf/pr"
  },
  {
    "path": "src/fzf/process/git-branch-action.ts",
    "chars": 528,
    "preview": "import { chainGitBranchesConsumer } from \"@/fzf/process/consumer/git\"\nimport { execGitBranchActionConsumer } from \"@/fzf"
  },
  {
    "path": "src/fzf/process/git-branch.ts",
    "chars": 644,
    "preview": "import { chainGitActionsConsumer, chainGitStatusConsumer, gitSwitchConsumer } from \"@/fzf/process/consumer/git\"\nimport {"
  },
  {
    "path": "src/fzf/process/git-log-action.ts",
    "chars": 496,
    "preview": "import { chainGitLogsConsumer } from \"@/fzf/process/consumer/git\"\nimport { execGitLogActionConsumer } from \"@/fzf/proces"
  },
  {
    "path": "src/fzf/process/git-log.ts",
    "chars": 610,
    "preview": "import { chainGitActionsConsumer, chainGitStatusConsumer } from \"@/fzf/process/consumer/git\"\nimport { chainGitLogActions"
  },
  {
    "path": "src/fzf/process/git-reflog-action.ts",
    "chars": 526,
    "preview": "import { chainGitReflogsConsumer } from \"@/fzf/process/consumer/git\"\nimport { execGitReflogActionConsumer } from \"@/fzf/"
  },
  {
    "path": "src/fzf/process/git-reflog.ts",
    "chars": 688,
    "preview": "import { chainGitActionsConsumer, chainGitStatusConsumer } from \"@/fzf/process/consumer/git\"\nimport { gitShowConsumer } "
  },
  {
    "path": "src/fzf/process/git-stash-action.ts",
    "chars": 518,
    "preview": "import { chainGitStashesConsumer } from \"@/fzf/process/consumer/git\"\nimport { execGitStashActionConsumer } from \"@/fzf/p"
  },
  {
    "path": "src/fzf/process/git-stash.ts",
    "chars": 646,
    "preview": "import { chainGitActionsConsumer, chainGitStatusConsumer } from \"@/fzf/process/consumer/git\"\nimport { chainGitStashActio"
  },
  {
    "path": "src/fzf/process/git-status-action.ts",
    "chars": 524,
    "preview": "import { chainGitStatusConsumer } from \"@/fzf/process/consumer/git\"\nimport { execGitStatusActionConsumer } from \"@/fzf/p"
  },
  {
    "path": "src/fzf/process/git-status.ts",
    "chars": 1102,
    "preview": "import { chainGitActionsConsumer } from \"@/fzf/process/consumer/git\"\nimport {\n  chainGitStatusActionsConsumer,\n  gitAddC"
  },
  {
    "path": "src/fzf/process/index.ts",
    "chars": 2876,
    "preview": "import { commandPaletteProcesses } from \"@/fzf/process/command-palette\"\nimport { decodeLine } from \"@/fzf/process/consum"
  },
  {
    "path": "src/fzf/process/open-buffer.ts",
    "chars": 703,
    "preview": "import {\n  deleteBufferConsumer,\n  dropConsumer,\n  editConsumer,\n  splitConsumer,\n  tabeditConsumer,\n  vsplitConsumer,\n}"
  },
  {
    "path": "src/fzf/process/open-bufnr.ts",
    "chars": 665,
    "preview": "import {\n  deleteBufnrConsumer,\n  editBufnrConsumer,\n  splitBufnrConsumer,\n  tabeditBufnrConsumer,\n  vsplitBufnrConsumer"
  },
  {
    "path": "src/fzf/process/open-file.ts",
    "chars": 1336,
    "preview": "import type { ReadonlyDeep } from \"type-fest\"\n\nimport {\n  dropConsumer,\n  editConsumer,\n  editWithTagStackConsumer,\n  ex"
  },
  {
    "path": "src/fzf/process/open-pr.ts",
    "chars": 300,
    "preview": "import { openPr } from \"@/fzf/process/consumer/open-pr\"\nimport { createProcessCreator } from \"@/fzf/process/process\"\nimp"
  },
  {
    "path": "src/fzf/process/process.ts",
    "chars": 799,
    "preview": "import { createProcessFunctionName } from \"@/fzf/util\"\nimport type { CreateProcessCreator, ResourceData } from \"@/type\"\n"
  },
  {
    "path": "src/fzf/process/register.ts",
    "chars": 388,
    "preview": "import { pasteRegister, setRegister } from \"@/fzf/process/consumer/register\"\nimport { createProcessCreator } from \"@/fzf"
  },
  {
    "path": "src/fzf/resource/all-buffers.ts",
    "chars": 1324,
    "preview": "import { getAllBuffers } from \"@/connector/buffers\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimpor"
  },
  {
    "path": "src/fzf/resource/blame-pr.ts",
    "chars": 1598,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { execSyncCommand } from \"@/system/comman"
  },
  {
    "path": "src/fzf/resource/bookmarks.ts",
    "chars": 1196,
    "preview": "import { getBookmarks } from \"@/connector/bookmarks\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimpo"
  },
  {
    "path": "src/fzf/resource/buffer-lines.ts",
    "chars": 1559,
    "preview": "import { getBuffers } from \"@/connector/buffers\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimport {"
  },
  {
    "path": "src/fzf/resource/buffer-tags.ts",
    "chars": 2034,
    "preview": "import { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimport { existsFileAsync, getCurrentFilePath } f"
  },
  {
    "path": "src/fzf/resource/buffer-vista.ts",
    "chars": 1722,
    "preview": "import type { VistaBufferTag } from \"@/connector/vista\"\nimport { getVistaBufferCtags } from \"@/connector/vista\"\nimport {"
  },
  {
    "path": "src/fzf/resource/buffers.ts",
    "chars": 4294,
    "preview": "import { getAlternateBuffer, getCurrentBuffer, getOtherBuffers } from \"@/connector/buffers\"\nimport { isGitDirectory } fr"
  },
  {
    "path": "src/fzf/resource/changes.ts",
    "chars": 1769,
    "preview": "import { getChanges } from \"@/connector/changes\"\nimport { globalVariableSelector } from \"@/module/selector/vim-variable\""
  },
  {
    "path": "src/fzf/resource/coc/coc-current-diagnostics.ts",
    "chars": 1043,
    "preview": "import { getCurrentDiagnostics } from \"@/connector/coc\"\nimport { diagnosticToResourceLine } from \"@/fzf/resource/coc/coc"
  },
  {
    "path": "src/fzf/resource/coc/coc-definitions.ts",
    "chars": 1262,
    "preview": "import { getDefinition } from \"@/connector/coc\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimport { "
  },
  {
    "path": "src/fzf/resource/coc/coc-diagnostics.ts",
    "chars": 1374,
    "preview": "import { getDiagnostics } from \"@/connector/coc\"\nimport { diagnosticToDisplayText } from \"@/fzf/syntax/colorize\"\nimport "
  },
  {
    "path": "src/fzf/resource/coc/coc-implementations.ts",
    "chars": 1295,
    "preview": "import { getImplementation } from \"@/connector/coc\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimpor"
  },
  {
    "path": "src/fzf/resource/coc/coc-outline.ts",
    "chars": 1652,
    "preview": "import { getOutline } from \"@/connector/coc\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimport { glo"
  },
  {
    "path": "src/fzf/resource/coc/coc-references.ts",
    "chars": 1257,
    "preview": "import { getReferences } from \"@/connector/coc\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimport { "
  },
  {
    "path": "src/fzf/resource/coc/coc-tsserver-source-definition.ts",
    "chars": 1350,
    "preview": "import { getTsServerSourceDefinition } from \"@/connector/coc\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/color"
  },
  {
    "path": "src/fzf/resource/coc/coc-type-definitions.ts",
    "chars": 1294,
    "preview": "import { getTypeDefinition } from \"@/connector/coc\"\nimport { colorize, colorizeFile } from \"@/fzf/syntax/colorize\"\nimpor"
  },
  {
    "path": "src/fzf/resource/coc/index.ts",
    "chars": 271,
    "preview": "export * from \"@/fzf/resource/coc/coc-current-diagnostics\"\nexport * from \"@/fzf/resource/coc/coc-diagnostics\"\nexport * f"
  },
  {
    "path": "src/fzf/resource/command-palette.ts",
    "chars": 1059,
    "preview": "import { getVimCommandHistory, getVimCommands } from \"@/connector/vim-command\"\nimport { colorize } from \"@/fzf/syntax/co"
  },
  {
    "path": "src/fzf/resource/ctags.ts",
    "chars": 1068,
    "preview": "import { getCtags } from \"@/connector/tags\"\nimport { globalVariableSelector } from \"@/module/selector/vim-variable\"\nimpo"
  },
  {
    "path": "src/fzf/resource/directory-files.ts",
    "chars": 1076,
    "preview": "import { execDirectoryFiles } from \"@/connector/directory-files\"\nimport { colorizeFile } from \"@/fzf/syntax/colorize\"\nim"
  },
  {
    "path": "src/fzf/resource/files-from-resources.ts",
    "chars": 2597,
    "preview": "import type { FILE_RESOURCES } from \"@/const/fzf-option\"\nimport { fileFormatBuffers } from \"@/fzf/resource/buffers\"\nimpo"
  },
  {
    "path": "src/fzf/resource/git-actions.ts",
    "chars": 1534,
    "preview": "import { isGitDirectory } from \"@/connector/util\"\nimport { GIT_ACTIONS } from \"@/const/git\"\nimport { gitConfigSelector }"
  },
  {
    "path": "src/fzf/resource/git-branch-actions.ts",
    "chars": 1798,
    "preview": "import { isGitDirectory } from \"@/connector/util\"\nimport { GIT_BRANCH_ACTIONS } from \"@/const/git\"\nimport { currentSessi"
  },
  {
    "path": "src/fzf/resource/git-branches.ts",
    "chars": 1860,
    "preview": "import stripAnsi from \"strip-ansi\"\n\nimport { execGitBranch } from \"@/connector/git\"\nimport { isGitDirectory } from \"@/co"
  },
  {
    "path": "src/fzf/resource/git-files.ts",
    "chars": 983,
    "preview": "import { execGitFiles } from \"@/connector/git\"\nimport { isGitDirectory } from \"@/connector/util\"\nimport { colorizeFile }"
  },
  {
    "path": "src/fzf/resource/git-log-actions.ts",
    "chars": 1825,
    "preview": "import { isGitDirectory } from \"@/connector/util\"\nimport { GIT_LOG_ACTIONS } from \"@/const/git\"\nimport { currentSessionS"
  },
  {
    "path": "src/fzf/resource/git-logs.ts",
    "chars": 2177,
    "preview": "import stripAnsi from \"strip-ansi\"\n\nimport { execGitLog } from \"@/connector/git\"\nimport { isGitDirectory } from \"@/conne"
  }
]

// ... and 95 more files (download for full content)

About this extraction

This page contains the full source code of the yuki-ycino/fzf-preview.vim GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 295 files (466.7 KB), approximately 134.8k tokens, and a symbol index with 169 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!