Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddu screenshots #10

Open
Shougo opened this issue Feb 19, 2022 · 17 comments
Open

ddu screenshots #10

Shougo opened this issue Feb 19, 2022 · 17 comments

Comments

@Shougo
Copy link
Owner

Shougo commented Feb 19, 2022

I want to add the screenshots link in README.
If you have good screenshots for ddu.vim, can you add it in this issue?

@Shougo
Copy link
Owner Author

Shougo commented Feb 19, 2022

スクリーンショット_2022-02-19_12-00-01

@Shougo Shougo changed the title ddu.vim screenshots ddu screenshots Feb 19, 2022
@Comamoca
Copy link

Comamoca commented Feb 20, 2022

ddu + colorscheme source
image

@Shougo
Copy link
Owner Author

Shougo commented Feb 21, 2022

Thank you!

@Dzzt
Copy link
Sponsor

Dzzt commented May 9, 2022

with ddu-source-buffer
2022-05-09 16_15_51

@Dzzt
Copy link
Sponsor

Dzzt commented May 9, 2022

with mr.vim + ddu-source-mr
2022-05-09 16_31_31

@matsui54
Copy link
Contributor

ddu-source-rg with 'autoAction': {'name': 'preview'} ui-ff's uiParams.

ddu_auto_preview

@matsui54
Copy link
Contributor

matsui54 commented Jun 1, 2022

ddu-vim-ui-select, which replaces Neovim's vim.ui.select with ddu.

ddu-vim-ui-select

@Shougo
Copy link
Owner Author

Shougo commented Jun 1, 2022

It is good.

Note: I think ddu-ui topic should be added instead of ddu-source.

Well, it uses other ddu ui instead?

@matsui54
Copy link
Contributor

matsui54 commented Jun 1, 2022

Yes, it does not implement new ui. It's intended to use with ui-ff.

@Shougo
Copy link
Owner Author

Shougo commented Jun 1, 2022

Oh, OK.

@mikanIchinose
Copy link

ddu-ui-filer
ddu-source-file
ddu-column-icon_filename

ddu-filer-demo

@matsui54
Copy link
Contributor

ddu-source-line
ddu-filter-kensaku
ddu-line-migemo

@yasunori0418
Copy link

ddu-ui-ff
ddu-source-rg

ddu-live-grep.mp4

@kuuote
Copy link
Contributor

kuuote commented Jun 19, 2023

Screenshot_20230618-152627
ddu-ui-ff
ddu-source-lsp
Code Action with Preview

@yasunori0418
Copy link

Built a ddu setup with several UIs and sources.

ddu-floating-split-view.mp4

ddu-ui-filer
ddu-source-file
ddu-ui-ff
ddu-source-rg
ddu-source-git_status

ddu-filter-converter_hl_dir
ddu-filter-converter_devicon

sample code
type DduUiSize = {
  winRow: number;
  winCol: number;
  winWidth: number;
  winHeight: number;
  previewFloating: boolean;
  previewSplit: "vertical" | "horizontal";
  previewRow: number;
  previewCol: number;
  previewHeight: number;
  previewWidth: number;
};

async function uiSize(
  args: ConfigArguments,
  splitRaitio: number,
  previewSplit: "horizontal" | "vertical",
): Promise<DduUiSize> {
  const denops = args.denops;
  const FRAME_SIZE = 2;
  const columns = await opt.columns.get(denops);
  const lines = await opt.lines.get(denops);
  const winRow = -1;
  const winCol = 0;

  let winHeight!: number;
  let winWidth!: number;
  let previewRow!: number;
  let previewCol!: number;
  let previewHeight!: number;
  let previewWidth!: number;

  if (previewSplit === "horizontal") {
    winHeight = Math.floor(lines / splitRaitio);
    winWidth = columns - FRAME_SIZE - 1;
    previewRow = lines - FRAME_SIZE;
    previewCol = 0;
    previewHeight = (lines - winHeight) - (FRAME_SIZE * 3);
    previewWidth = winWidth;
  } else if (previewSplit === "vertical") {
    winHeight = lines - FRAME_SIZE - 1;
    winWidth = Math.floor(columns / splitRaitio);
    previewRow = 0;
    previewCol = columns - FRAME_SIZE;
    previewHeight = winHeight;
    previewWidth = columns - winWidth - (FRAME_SIZE * 3);
  }

  return {
    winRow: winRow,
    winCol: winCol,
    winWidth: winWidth,
    winHeight: winHeight,
    previewFloating: true,
    previewSplit: previewSplit,
    previewRow: previewRow,
    previewCol: previewCol,
    previewHeight: previewHeight,
    previewWidth: previewWidth,
  };
}

// examples
export class Config extends BaseConfig {
  override async config(args: ConfigArguments): Promise<void> {

    args.contextBuilder.patchGlobal({
      uiParams: {
        filer: {
          ...{
            split: "floating",
            splitDirection: "topleft",
            floatingBorder: "single",
            sort: "filename",
            sortTreesFirst: true,
            displayRoot: false,
            previewFloatingBorder: "single",
            previewWindowOptions: [
              ["&signcolumn", "no"],
              ["&foldcolumn", 0],
              ["&foldenable", 0],
              ["&number", 0],
              ["&relativenumber", 0],
              ["&wrap", 0],
            ],
          },
          ...await uiSize(args, 5, "vertical"),
        },
      },
    })

    args.contextBuilder.patchLocal("ripgrep-ff", {
      ui: "ff",
      uiParams: {
        ff: {
          ...{
            startAutoAction: true,
            autoAction: {
              delay: 0,
              name: "preview",
            },
            autoResize: false,
            startFilter: true,
            filterFloatingPosition: "top",
          },
          ...await uiSize(args, 3, "horizontal"),
        }
      },
      sources: [
        {
          name: "rg",
          options: {
            matchers: [],
            volatile: true,
          },
        },
      ],
    });

    args.contextBuilder.patchLocal("git_status-ff", {
      ui: "ff",
      uiParams: {
        ff: {
          ...{
            startAutoAction: true,
            autoAction: {
              delay: 0,
              name: "preview",
            },
            autoResize: false,
            filterFloatingPosition: "bottom",
          },
          ...await uiSize(args, 2, "vertical"),
        },
      },
      sources: [
        {
          name: "git_status",
        },
      ],
    });

    return Promise.resolve();
  }
}

@peacock0803sz
Copy link

peacock0803sz commented Aug 12, 2023

Fuzzy Finder: ff UI

File searching: file_external Source (with fd)

CleanShot 2023-08-12 at 09 08 10

LSP Workspace Symbols: lsp Source

CleanShot 2023-08-12 at 09 25 54

Filer: filer UI

Filer for current dir: file Source

CleanShot 2023-08-12 at 08 52 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants