forked from ibhagwan/fzf-lua
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ibhagwan:main' into main
- Loading branch information
Showing
69 changed files
with
5,690 additions
and
1,832 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: 🐞 Bug Report | ||
description: File a bug/issue | ||
labels: [bug] | ||
title: "Bug: " | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
**Before submitting an issue, please make sure to search the [Issues](https://github.com/ibhagwan/fzf-lua/issues)/[Discussions](https://github.com/ibhagwan/fzf-lua/discussions) and read the [Wiki](https://github.com/ibhagwan/fzf-lua/wiki) including the [Advanced section](https://github.com/ibhagwan/fzf-lua/wiki/Advanced) (if relevant)** | ||
Many esoteric and lesser known options can be found by searching the above links, if you still have questions after that please use the [Discussions page](https://github.com/ibhagwan/fzf-lua/discussions), rest assured I will answer your quesion in the same priority as if it was an issue. | ||
- type: checkboxes | ||
attributes: | ||
label: RTFM Checklist | ||
description: |- | ||
Please make sure to search the issues first and check only the relevant boxes below, if you don't think your issue is relevant to the Wiki/Advanced API or you aren't well versed in `fzf` (or unsure what that means) do not check these boxes, this mostly helps me understand where you're coming from so I can better assist you when troubleshooting. | ||
options: | ||
- label: I have searched exisiting issues / discussions | ||
required: true | ||
- label: I have read the Wiki including the Advanced section | ||
required: false | ||
- label: I have read `man fzf` / I am well versed in shell fzf | ||
required: false | ||
- type: input | ||
attributes: | ||
label: "Operating system" | ||
placeholder: "e.g. Linux, Windows, Mac, etc" | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: "Shell" | ||
placeholder: "e.g. bash, zsh, fish, etc" | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: "Neovim version (`nvim --version`)" | ||
placeholder: "NVIM v0.10.0-dev-2739+ge2224a793" | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: "Fzf version (`fzf --version`)" | ||
placeholder: "e.g. 0.48.1 (d579e33)" | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: "Output of `:lua print(os.getenv('FZF_DEFAULT_OPTS'))`" | ||
placeholder: "e.g. --layout=reverse ..." | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: "Is the problem reproducible with `mini.sh`?" | ||
description: |- | ||
**Please mark a single checbox from the below options.** | ||
Unless you're on Windows, you can quickly test fzf-lua with minimal config in its own sandbox by running the below command in the shell: | ||
```sh | ||
sh -c "$(curl -s https://raw.githubusercontent.com/ibhagwan/fzf-lua/main/scripts/mini.sh)" | ||
``` | ||
options: | ||
- label: My issue is reproducible with `mini.sh` | ||
required: false | ||
- label: My issue **IS NOT** reproducible with `mini.sh` | ||
required: false | ||
- label: I have not tested with `mini.sh` (not relevant, requires LSP, Windows, etc) | ||
required: false | ||
|
||
- type: textarea | ||
id: config | ||
attributes: | ||
label: Fzf-lua configuration | ||
description: Fzf-lua setup options | ||
render: lua | ||
value: |- | ||
```lua | ||
require('fzf-lua').setup({ | ||
}) | ||
``` | ||
- type: textarea | ||
attributes: | ||
label: Describe the bug / steps to reproduce | ||
description: |- | ||
Please describe your issue with as much details as you can, let me know what you've tested and your findings, bonus points if you can provide reproduction steps / code as this will help me get to the solution faster. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask a question or start a discussion | ||
url: https://github.com/ibhagwan/fzf-lua/discussions | ||
about: Use Github discussions instead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 💡 Feature Request | ||
description: Suggest a new feature or improvement | ||
labels: [feature request] | ||
title: "Feature: " | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
**Before submitting a feature request, please make sure to search the [Issues](https://github.com/ibhagwan/fzf-lua/issues)/[Discussions](https://github.com/ibhagwan/fzf-lua/discussions) and read the [Wiki](https://github.com/ibhagwan/fzf-lua/wiki) including the [Advanced section](https://github.com/ibhagwan/fzf-lua/wiki/Advanced) (if relevant)** | ||
Many esoteric and lesser known options can be found by searching the above links, if you still have questions after that please use the [Discussions page](https://github.com/ibhagwan/fzf-lua/discussions), rest assured I will answer your quesion in the same priority as if it was an issue. | ||
- type: checkboxes | ||
attributes: | ||
label: Have you RTFM'd? | ||
description: Please search the issues/discussions and read the Wiki first | ||
options: | ||
- label: I have done proper research | ||
required: true | ||
- type: textarea | ||
id: feature | ||
attributes: | ||
label: Feature Request | ||
description: |- | ||
Please describe your request with as much details as you can. Helpful examples can include how your request works in other plugins/software as well as links to discussions/issues and implementation details if such exist. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
on: [push, delete] | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'ibhagwan/fzf-lua' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Sync remote repositories | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.GIT_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
# Ignore hosts keys, since we accept them as-is | ||
git config --global core.sshCommand 'ssh -i ~/.ssh/id_rsa -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' | ||
# Codeberg | ||
git remote add codeberg ssh://[email protected]/ibhagwan/fzf-lua.git | ||
git push --tags --force --prune codeberg 'refs/remotes/origin/*:refs/heads/*' | ||
# GitLab | ||
git remote add gitlab ssh://[email protected]/ibhagwan/fzf-lua.git | ||
git push --tags --force --prune gitlab 'refs/remotes/origin/*:refs/heads/*' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", | ||
"runtime.version": "LuaJIT", | ||
"diagnostics": { | ||
"enable": true, | ||
"globals": ["vim"], | ||
"neededFileStatus": { | ||
"codestyle-check": "Any" | ||
}, | ||
"disable": ["need-check-nil", "missing-parameter", "cast-local-type"] | ||
}, | ||
"workspace": { | ||
"library": [ | ||
"lua", | ||
"$VIMRUNTIME/lua", | ||
"${3rd}/luv/library", | ||
"$XDG_DATA_HOME/nvim/lazy/plenary.nvim/lua", | ||
"$LOCALAPPDATA/nvim-data/lazy/plenary.nvim/lua" | ||
], | ||
"checkThirdParty": false, | ||
"maxPreload": 2000, | ||
"preloadFileSize": 1000, | ||
"ignoreDir": ["tests/"] | ||
}, | ||
"type": { | ||
"weakNilCheck": true, | ||
"weakUnionCheck": true, | ||
"castNumberToInteger": true | ||
}, | ||
"telemetry.enable": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## Windows Known Issues and Limitations | ||
|
||
As fzf-lua is bound by the same constraints, please read | ||
[fzf's Windows Wiki page](https://github.com/junegunn/fzf/wiki/Windows). | ||
|
||
It took a lot of work to make everything work exactly as it does on *NIX/OSX. | ||
Fzf-lua attempts to overcome inherent fzf Windows woes (escaping, etc) by using | ||
our command proxy wrapper and working around the issues using lua code. | ||
|
||
### Single quotes in commands / options | ||
|
||
On Windows, single quotes `'` in command arguments are treated as a string literal, | ||
that means that wrapping arguments with single quotes does not translate into a single | ||
string the same way a double quoted argument is treated, i.e. `'foo bar' != "foo bar"`. | ||
|
||
To avoid issues, make sure none of your `cmd`'s `rg_opts`, `fd_opts`, `preview`, etc | ||
contains single hyphens that should be treated as quotes, this is probably the case | ||
if you copied old fzf-lua defaults into your `setup` options. | ||
|
||
### live_grep_native | ||
|
||
When using `live_grep_native` we are sending the `rg` command directly | ||
to fzf (without the fzf-lua wrapper) and are therefore bound by fzf's escaping | ||
requirements. | ||
|
||
For example, `^` is a special escape character on windows and also a regex special | ||
character. Say we wanted to search for all lines that start with "local", we would | ||
run: | ||
```lua | ||
-- we use `no_esc` to tell rg we're using a regex | ||
:FzfLua live_grep no_esc=true search=^local | ||
``` | ||
|
||
However, when using the native version we need to escape the caret twice: | ||
```lua | ||
:FzfLua live_grep no_esc=true search=^^local | ||
``` | ||
|
||
More so, I couldn't find a way to send special regex chars `[(|.*^$` as the backslash | ||
is always doubled by fzf's `{q}`<sub><sup>* see bottom note</sup></sub>. | ||
|
||
For example, if we run: | ||
```cmd | ||
break | fzf --ansi --disabled --bind="change:reload:rg --line-number --column --color=always {q}" | ||
``` | ||
|
||
And try to search for the literal `[` by typing `\[`, we get the error: | ||
``` | ||
[Command failed: rg --line-number --column --color=always ^"\\[^"] | ||
``` | ||
|
||
If we double the blackslashes by typing `\\[` we get the error: | ||
``` | ||
[Command failed: rg --line-number --column --color=always ^"\\\\[^"] | ||
``` | ||
|
||
<sub><sup>* upstream issue: https://github.com/junegunn/fzf/issues/3626</sup></sub> |
Oops, something went wrong.