Skip to content

Commit

Permalink
feat(actions): add 'setqflist' (#290)
Browse files Browse the repository at this point in the history
* feat(actions): add setqflist

* WIP

* feat(actions): add setqflist_find, setqflist_rg, setqflist_grep

* feat(actions): add 'ctrl-q' to files/live grep/buffers/git files/diagnostics

* docs(actions): add 'ctrl-q' send quickfix window

* docs(commands): split into small groups

* docs: typing

* refactor(actions): move interaction 'bdelete' to config
  • Loading branch information
linrongbin16 authored Oct 20, 2023
1 parent 997821b commit 1284639
Show file tree
Hide file tree
Showing 5 changed files with 438 additions and 30 deletions.
216 changes: 192 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@ https://github.com/linrongbin16/fzfx.nvim/assets/6496887/aa5ef18c-26b4-4a93-bd0c
- [packer.nvim](#packernvim)
- [lazy.nvim](#lazynvim)
- [Commands](#-commands)
- [Naming Rules](#naming-rules)
- [Bind Keys](#bind-keys)
- [Files](#files)
- [Live Grep](#live-grep)
- [Buffers](#buffers)
- [Git Files](#git-files)
- [Git Branches](#git-branches)
- [Git Commits](#git-commits)
- [Git Blame](#git-blame)
- [(Vim) Commands](#vim-commands)
- [Lsp Diagnostics](#lsp-diagnostics)
- [Lsp Symbols](#lsp-symbols)
- [File Explorer](#file-explorer)
- [Recommended Key Mappings](#-recommended-key-mappings)
- [Vimscript](#vimscript)
- [Lua](#lua)
Expand Down Expand Up @@ -253,25 +262,25 @@ Commands are named following below rules:

> Note: builtin keys can be configured, see [Configuration](#-configuration).
### Files

<table>
<thead>
<tr>
<th>Group</th>
<th>Command</th>
<th>Mode</th>
<th>Multi Key?</th>
<th>Preview Key?</th>
<th>Hints</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Files</td>
<td>FzfxFiles(U)</td>
<td>N</td>
<td rowspan="4">Yes</td>
<td rowspan="4">Yes</td>
<td rowspan="4"></td>
<td rowspan="4">1. Use `ctrl-q` to send selected lines to quickfix window and quit.</td>
</tr>
<tr>
<td>FzfxFiles(U)V</td>
Expand All @@ -285,13 +294,28 @@ Commands are named following below rules:
<td>FzfxFiles(U)P</td>
<td>N</td>
</tr>
</tbody>
</table>

### Live Grep

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Live Grep</td>
<td>FzfxLiveGrep(U)</td>
<td>N</td>
<td rowspan="4">Yes</td>
<td rowspan="4">Yes</td>
<td rowspan="4">1. Use `--` to pass raw options to search command (grep/rg).</td>
<td rowspan="4">1. Use `ctrl-q` to send selected lines to quickfix window and quit.<br></td>
</tr>
<tr>
<td>FzfxLiveGrep(U)V</td>
Expand All @@ -305,13 +329,30 @@ Commands are named following below rules:
<td>FzfxLiveGrep(U)P</td>
<td>N</td>
</tr>
</tbody>
</table>

- Use `--` to pass raw options to search command (grep/rg).

### Buffers

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Buffers</td>
<td>FzfxBuffers</td>
<td>N</td>
<td rowspan="4">Yes</td>
<td rowspan="4">Yes</td>
<td rowspan="4"></td>
<td rowspan="4">1. Use `ctrl-q` to send selected lines to quickfix window and quit.</td>
</tr>
<tr>
<td>FzfxBuffersV</td>
Expand All @@ -325,13 +366,28 @@ Commands are named following below rules:
<td>FzfxBuffersP</td>
<td>N</td>
</tr>
</tbody>
</table>

### Git Files

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Git Files</td>
<td>FzfxGFiles(C)</td>
<td>N</td>
<td rowspan="4">Yes</td>
<td rowspan="4">Yes</td>
<td rowspan="4">1. Git files in current directory variant is named with `C` suffix.</td>
<td rowspan="4">1. Use `ctrl-q` to send selected lines to quickfix window and quit.</td>
</tr>
<tr>
<td>FzfxGFiles(C)V</td>
Expand All @@ -345,13 +401,30 @@ Commands are named following below rules:
<td>FzfxGFiles(C)P</td>
<td>N</td>
</tr>
</tbody>
</table>

- Git files in current directory variant is named with `C` suffix.

### Git Branches

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Git Branches</td>
<td>FzfxGBranches(R)</td>
<td>N</td>
<td rowspan="4">No</td>
<td rowspan="4">Yes</td>
<td rowspan="4">1. Remote git branch variant is named with 'R' suffix.<br>2. Use `enter` to checkout branch.</td>
<td rowspan="4">1. Use `enter` to checkout branch.</td>
</tr>
<tr>
<td>FzfxGBranches(R)V</td>
Expand All @@ -365,8 +438,25 @@ Commands are named following below rules:
<td>FzfxGBranches(R)P</td>
<td>N</td>
</tr>
</tbody>
</table>

- Remote git branch variant is named with `R` suffix.

### Git Commits

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Git Commits</td>
<td>FzfxGCommits(B)</td>
<td>N</td>
<td rowspan="4">No</td>
Expand All @@ -385,8 +475,23 @@ Commands are named following below rules:
<td>FzfxGCommits(B)P</td>
<td>N</td>
</tr>
</tbody>
</table>

### Git Blame

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Git Blame</td>
<td>FzfxGBlame</td>
<td>N</td>
<td rowspan="4">No</td>
Expand All @@ -405,13 +510,28 @@ Commands are named following below rules:
<td>FzfxGBlameP</td>
<td>N</td>
</tr>
</tbody>
</table>

### (Vim) Commands

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Vim Commands</td>
<td>FzfxCommands(E/U)</td>
<td>N</td>
<td rowspan="4">No</td>
<td rowspan="4">Yes</td>
<td rowspan="4">1. Vim ex(builtin) commands variant is named with 'E' suffix.<br>2. Vim user commands variant is named with 'U' suffix.<br>3. Use `enter` to input vim command.</td>
<td rowspan="4">1. Use `enter` to input vim command.</td>
</tr>
<tr>
<td>FzfxCommands(E/U)V</td>
Expand All @@ -425,13 +545,31 @@ Commands are named following below rules:
<td>FzfxCommands(E/U)P</td>
<td>N</td>
</tr>
</tbody>
</table>

- Vim ex(builtin) commands variant is named with 'E' suffix.
- Vim user commands variant is named with 'U' suffix.

### Lsp Diagnostics

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Lsp Diagnostics</td>
<td>FzfxLspDiagnostics(B)</td>
<td>N</td>
<td rowspan="4">Yes</td>
<td rowspan="4">Yes</td>
<td rowspan="4"></td>
<td rowspan="4">1. Use `ctrl-q` to send selected lines to quickfix window and quit.</td>
</tr>
<tr>
<td>FzfxLspDiagnostics(B)V</td>
Expand All @@ -445,8 +583,23 @@ Commands are named following below rules:
<td>FzfxLspDiagnostics(B)P</td>
<td>N</td>
</tr>
</tbody>
</table>

### Lsp Symbols

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">Lsp Symbols</td>
<td>FzfxLspDefinitions</td>
<td>N</td>
<td rowspan="4">Yes</td>
Expand All @@ -465,8 +618,23 @@ Commands are named following below rules:
<td>FzfxLspImplementations</td>
<td>N</td>
</tr>
</tbody>
</table>

### File Explorer

<table>
<thead>
<tr>
<th>Command</th>
<th>Mode</th>
<th>Multi Keys</th>
<th>Preview Keys</th>
<th>Exit Keys</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="4">File Explorer</td>
<td>FzfxFileExplorer(U)</td>
<td>N</td>
<td rowspan="4">Yes</td>
Expand Down
Loading

0 comments on commit 1284639

Please sign in to comment.