Commit Graph

234 Commits

Author SHA1 Message Date
bhagwan
57ce1bff55 live_grep resume search is working again 2021-09-07 23:20:54 -07:00
bhagwan
0d24020629 live_grep escape hyphen, minor modification for 'sk' 2021-09-07 21:31:36 -07:00
bhagwan
9785cafd9a live_grep default changed to native (no resume) temporarily 2021-09-07 21:11:03 -07:00
John Drouhard
a846889c7e More performance improvements for hot-path functions tail() and extension(); improve get_devicon() to be case-insensitive for extension 2021-09-07 20:19:51 -05:00
bhagwan
eb19fb51ac added cwd to search headers, added headers to live_grep 2021-09-07 17:37:08 -07:00
bhagwan
eaf465f9e9 grep, live_grep cwd relative path display 2021-09-07 16:59:13 -07:00
bhagwan
6fc53bc42e fzf_colors added to README 2021-09-07 10:47:02 -07:00
Bogdan Grigoruță
f9415a00fe core: Add support for the fzf --color option 2021-09-07 10:42:50 -07:00
bhagwan
28f0adcfa3 grep: enable empty string search 2021-09-07 01:51:51 -07:00
bhagwan
2afab38370 sk live_grep single quote search fix 2021-09-07 01:22:08 -07:00
bhagwan
67b727bd8e better grep,live_grep search query continuation 2021-09-06 18:56:17 -07:00
bhagwan
befdb5db85 files_resume flicker fix (within issue #103) 2021-09-06 14:45:04 -07:00
bhagwan
2de83f800e added icons to lines|blines 2021-09-06 14:18:55 -07:00
John Drouhard
d04dc95a94 Slight cleanup in make_entry_file(); make buffer list pass correct filename to get_devicon() 2021-09-06 13:59:38 -07:00
John Drouhard
c78712c407 Improve performance of path.tail() and path.extension() by not matching with end-anchor $ 2021-09-06 13:59:38 -07:00
John Drouhard
02ad885d30 File icons: use colors from nvim-web-devicons if available
This improves the colors for file icons if nvim-web-devicons is
available. If it is, fzf-lua now uses those colors for the icons.

This should also improve the performance of make_entry_file by
optimizing string creation and when various regexes are matched.
2021-09-06 13:59:38 -07:00
bhagwan
fa70aa52f8 added 'lines' (closes issue #97) 2021-09-06 13:12:30 -07:00
bhagwan
ae5fc09069 close preview when 'jump_to_single_result = true', also closes issue #105 2021-09-06 12:49:44 -07:00
bhagwan
7fc2c44bd3 compatibility with new LSP handlers (closes issue #109) 2021-09-06 12:26:45 -07:00
bhagwan
07288898af added 'files_resume' (issue #103) 2021-09-05 15:16:49 -07:00
bhagwan
137b246845 file_icon_padding, replace spaces with unicode invisible char 2021-09-05 12:00:57 -07:00
ibhagwan
e94e2bb286
Merge pull request #104 from EdwarKenedy/file_icon_padding
Add file_icon_padding option
2021-09-05 11:55:37 -07:00
bhagwan
ce30520aef closes #102 2021-09-05 10:31:41 -07:00
bhagwan
2617aa1587 added convenience function 'live_grep_resume' 2021-09-05 03:50:08 -07:00
Edwar Martinez
0f713785a0 Add file_icon_padding option 2021-09-05 06:31:00 -04:00
bhagwan
62024ecf9a live_grep saves last search term (closes issue #103) 2021-09-05 03:26:46 -07:00
bhagwan
cc7828d4d2 lsp prompt lables respected again 2021-09-04 20:03:20 -07:00
bhagwan
7a144f81da bugfix: [No Name] buffer, minor live_grep modifications 2021-09-04 19:40:18 -07:00
bhagwan
78895876c2 standardize 'fzf_bin', live_grep options optimizations 2021-09-04 15:02:34 -07:00
bhagwan
5a66cae8ff live_grep further optimizations for empty string queries (both fzf|sk) 2021-09-04 11:30:43 -07:00
bhagwan
5fcbace5ba live_grep: do not perform empty string initial query (closes issue #92) 2021-09-04 04:28:29 -07:00
bhagwan
1837038f8e executed searches|commands will be added to history (closes issue #95) 2021-09-04 03:45:14 -07:00
bhagwan
8feda7fb9c added preview scrolling for terminal buffers 2021-09-04 03:33:06 -07:00
bhagwan
6c349939b8 lsp_code_actions should ignore jump_to_single_result (closes issue #93) 2021-09-04 00:43:09 -07:00
bhagwan
3527c8e532 added '--perl-regexp' to grep options (closest match to rg regex engine) 2021-09-03 19:01:18 -07:00
bhagwan
bdbd662468 better handling of '--ansi' flag, detect extension on filenames with space 2021-09-03 18:49:41 -07:00
bhagwan
2ae75cba96 column support for search matching, default colors for extensions 2021-09-03 17:35:28 -07:00
John Drouhard
d34444e860 Builtin previewer: improve mechanism for backing up/restoring winopts
See :help local-options for more details, but essentially, we have to be
very careful with how we set window-local options on popup windows,
because buffers might take some window-local options from the last
window they were displayed in with them to the new window in certain
circumstances.

This commit changes the backup/restore for the window options so that
the possible window-local options that might get clobbered are saved
from the original active window and reapplied to the preview window just
before it's closed. This ensures any buffers loaded from the picker will
have the same window options applied that were in the active window when
fzf was opened.
2021-09-03 17:40:17 -05:00
bhagwan
d8b5981e92 README: added lua keymap exmaple, removed commented _G.dump(s) 2021-09-03 13:28:50 -07:00
bhagwan
a0f073950b misc previewer title display improvements, grep 'no_esc' option added 2021-09-03 11:31:24 -07:00
bhagwan
93ca0a3adf git_status preview now shows deleted and untracked files 2021-09-02 16:39:12 -07:00
ibhagwan
532cea4291
Merge pull request #90 from jdrouhard/better_git_cwd
Improve git commands so they always run in the git root directory
2021-09-02 12:11:09 -07:00
John Drouhard
6668b04b4b Improve git commands so they always run in the git root directory
This matches the behavior of both fzf.vim and telescope.nvim.

It also fixes a bug with the "git_buf_edit" action if the cwd is not in
the git root.
2021-09-02 12:35:04 -05:00
jpe
f3471b411f Fix loss of git records after checking out older commits 2021-09-02 00:14:33 -04:00
bhagwan
789e0bf310 added 'filetypes' provider 2021-09-01 19:39:01 -07:00
bhagwan
7b9fe4495e 'git_xxx' now supports 'cwd' option (closes issue #82) 2021-09-01 15:37:11 -07:00
bhagwan
e3e6d2643b 'current_buffer_only' option to LSP providers (closes issue #80) 2021-09-01 10:51:04 -07:00
bhagwan
6aff90f99b improved actions for command_history|search_history (closes issue #75) 2021-08-31 15:25:23 -07:00
bhagwan
9fb6a3059f added 'blines' provider (closes issue #77) 2021-08-31 15:02:35 -07:00
bhagwan
1b1de47c57 even better method for filetype detection, ty @jdrouhard! 2021-08-31 12:37:23 -07:00
bhagwan
96bbe33406 better filetype detection, closes issue #74 2021-08-31 12:11:51 -07:00
bhagwan
571ec3a8ca closes issue #78 2021-08-31 11:21:34 -07:00
bhagwan
5472c41f20 bugfix: live_grep with underlying 'grep' 2021-08-31 10:00:44 -07:00
bhagwan
659bd79718 bugfix: grep_curbuf 2021-08-31 09:37:50 -07:00
bhagwan
fe4cfcece7 added options to override '--ansi' and '--info' (closes issue #76) 2021-08-31 09:00:50 -07:00
bhagwan
46f186c954 adjust fzf win size when closing preview (issue #73) 2021-08-30 17:32:23 -07:00
francisco souza
9dbaad9f94 Fix empty line in the builtin previewer
Whenever the file ends with newline, the builtin previewer was adding an
empty line at the end of the file. That's a side effect splitting and
rejoining the lines with \n. Basically, when we split a\nb\nc\n we get
{'a', 'b', 'c', ''}, then nvim_buf_set_lines treats each item in the
table as a line, and inserts an empty line at the end.

We do need to account for files that don't end with a new line though,
hence the check.

I don't have a way to test the \r\n logic locally, no Windows hosts
around, but it should work too.
2021-08-30 15:59:44 -04:00
bhagwan
34a2997869 bat_native config|theme to be respected 2021-08-30 12:52:26 -07:00
bhagwan
2aeb0fc36f should close issue #70 2021-08-30 12:31:15 -07:00
bhagwan
ba77d4912d bugfix: get_visual_selection with dirty buffers(closes issue #54) 2021-08-30 11:03:27 -07:00
bhagwan
bbef641125 fixes issue #67 2021-08-30 10:04:53 -07:00
bhagwan
ac99206c13 added 'packadd' provider (closes issue #64) 2021-08-30 09:09:49 -07:00
bhagwan
757d6392f0 added builtin previewer options for syntax bytes/lines limits 2021-08-30 08:35:36 -07:00
bhagwan
e6c4f31c06 git_buf_edit, set bufhidden:wipe 2021-08-30 00:02:31 -07:00
jpe
0b97ac673b Add actions to checkout and inspect previous git commits 2021-08-30 00:02:31 -07:00
bhagwan
37a6f3b999 closes issue #62 2021-08-29 23:49:31 -07:00
francisco souza
941064ed5b Set cursorlineopt=both in the builtin previewer
This way, if the user has defined cursorlineopt=number elsewhere, we
override it to behave as intended.
2021-08-29 22:37:00 -07:00
bhagwan
e89018baf9 builtin previewer: misc config options added 2021-08-29 22:34:06 -07:00
bhagwan
2315413bdd closes issue #59 2021-08-29 09:00:59 -07:00
bhagwan
a7c093e774 set filetype in a pcall to circumvent error (issue #58) 2021-08-29 02:39:58 -07:00
bhagwan
a2470b81e1 should close issue#58 2021-08-29 02:21:06 -07:00
bhagwan
eefed45175 added builtin previewer 2021-08-29 00:45:36 -07:00
francisco souza
233062d7e6 providers/lsp: support for a pre-defined query in workspace_symbols 2021-08-24 22:23:49 -07:00
bhagwan
82a477420d fix bcomments for git version < 2.31 (issue #48) 2021-08-18 19:48:28 -07:00
bhagwan
dee50f72d9 adjust buffers:current colors (issue #47) 2021-08-17 16:39:54 -07:00
bhagwan
c67bf21428 buffers: remove header color, lsp_live_ws_symbols: async WIP 2021-08-17 10:56:07 -07:00
bhagwan
f51135cc3c added lsp_live_workspace_symbols 2021-08-16 21:03:52 -07:00
bhagwan
7322a96b2d tags, btags complete, misc fixes 2021-08-16 17:51:20 -07:00
bhagwan
c938022571 grep: added filespec option 2021-08-16 15:44:48 -07:00
bhagwan
1c25350397 added raw_cmd option to files,grep 2021-08-16 14:56:50 -07:00
bhagwan
ecdc79da2e WIP: added tags, btags (need to fix previewer line) 2021-08-15 23:05:20 -07:00
bhagwan
cea8e27991 added marks 2021-08-14 21:50:34 -07:00
bhagwan
faad0474d4 added neovim builtin providers
commands, command_history, search_history, keymaps, registers, spell_suggest
2021-08-14 14:39:19 -07:00
bhagwan
48ce442b21 bugfix: calling files with find (instead of fd), closes issue #43 2021-08-13 21:02:33 -07:00
bhagwan
8da08ec5b3 bugfix: lsp_code_actions with more than one LSP client (issue #42) 2021-08-13 09:24:03 -07:00
bhagwan
3c661e552e refactor and add 'cwd_only' option to all file providers 2021-08-11 15:26:19 -07:00
bhagwan
b25e5bef33 added async|sync option to LSP functions 2021-08-11 12:25:20 -07:00
Denys Zadorozhnyi
d7b4696985
add lsp.workspace_diag_only_cwd option to filter out diagnostics entries from files outside of the current working directory (#36)
* add lsp.workspace_diag_only_cwd option to filter

out diagnostics entries from files outside of the current
working directory;

* switch to cwd_only option;

* restore original filtering in buffer_diag loop;
2021-08-10 15:56:34 -07:00
John Drouhard
57f304b270 Optimize git performance: 1) faster method to determine if in git repo; 2) bypass entirely if git icons disabled 2021-08-10 17:41:45 -05:00
bhagwan
ccc9d5f6c1 option to open in a split instead of a popup 2021-08-10 07:09:40 -07:00
bhagwan
d1fe6479c1 bugfix: lsp_workspace_symbols filename (issue #34) 2021-08-09 09:43:03 -07:00
bhagwan
fd390cdcea added git_status 2021-08-07 14:01:01 -07:00
bhagwan
1257eadb7c added git commits,bcommits,branches 2021-08-05 19:34:49 -07:00
bhagwan
049298e818 added FzfLua command with auto-complete 2021-08-05 09:34:27 -07:00
bhagwan
0d05954397 previewers migrated to new async_action 2021-08-04 15:22:10 -07:00
bhagwan
1cafaba2f9 updated README, fix for issue #33 2021-08-04 09:58:59 -07:00
bhagwan
652f66d36b bugfix: rg --color prevented git_icons from showing 2021-08-03 21:34:58 -07:00
bhagwan
a91e839cce file providers with custom cwd bugfix 2021-08-03 19:37:39 -07:00
bhagwan
b21f5a6308 previewer fix for fish shell 2021-08-03 19:17:42 -07:00
bhagwan
ec2e870614 refactor previewers 2021-08-03 15:43:51 -07:00
bhagwan
cf583fe211 fix issue #28, added search header for cword/visual grep 2021-07-30 11:21:23 -07:00
ibhagwan
2c9438855c
Merge pull request #27 from kdheepak/add-open-in-background
Added “open file in background” (as buffer) action
2021-07-30 08:15:59 -07:00
Dheepak Krishnamurthy
bd71a01711 Add open in background file buffer 2021-07-30 09:11:34 -06:00
bhagwan
9d0be97816 potential fix for issue #23 2021-07-29 08:01:26 -07:00
zeertzjq
2eaade0e23 open the correct man page section 2021-07-27 13:29:37 +08:00
bhagwan
ea38de4d7c options refactor, slightly better startup time 2021-07-26 18:08:26 -07:00
bhagwan
2ed1a56102 potential fix for issue #23? 2021-07-25 22:19:27 -07:00
bhagwan
8813d5a5ea fixed possibility of missed last result in more providers 2021-07-23 21:10:53 -07:00
bhagwan
dda1387536 fix possibility of missing last LSP result 2021-07-23 18:02:29 -07:00
bhagwan
c76d6d9b36 nvim-web-devicons lazy load bugfix 2021-07-23 11:10:22 -07:00
bhagwan
976ee88400 added initial skim (rust fzf) support 2021-07-22 21:34:12 -07:00
bhagwan
25b53481f4 builtin() accept additional options 2021-07-22 13:08:16 -07:00
bhagwan
5e49c8a8c4 added missing module.lua 2021-07-22 12:56:39 -07:00
bhagwan
eb9dec7dcd added provider for builtin methods 2021-07-22 12:53:16 -07:00
bhagwan
52da9efe9e LSP: added option to jump to single result 2021-07-21 11:49:44 -07:00
bhagwan
0d61b8a284 bugfix: tanbew -> tabnew typo fix 2021-07-21 08:36:38 -07:00
bhagwan
daee2543c8 optional cwd bugfix 2021-07-21 08:06:57 -07:00
bhagwan
0e472a9ee3 do not reset vim.env.FZF_DEFAULT_OPTS 2021-07-20 08:42:32 -07:00
bhagwan
08430c0325 workspace_symbols bugfix with new sumneko_lua 2021-07-20 00:43:27 -07:00
bhagwan
4ec3f7716c LSP diagnostics verify attached client 2021-07-19 23:37:54 -07:00
bhagwan
49c1e2f1ea added full LSP support 2021-07-19 23:21:20 -07:00
bhagwan
a1a8fd89cb ansi colors escape sequence changed to support older lua versions 2021-07-18 08:51:16 -07:00
bhagwan
495c133254 nbsp revert, lsp_references added 2021-07-18 08:04:22 -07:00
bhagwan
fe0b3d1184 escape special chars before search so we can grep [(...)] 2021-07-16 10:39:02 -07:00
bhagwan
1de8269b56 fixed conflciting ctrl-u fzf bind 2021-07-15 17:54:15 -07:00
bhagwan
2ef5697cb0 winopts_raw slight modification 2021-07-15 13:47:19 -07:00
bhagwan
1cb4ae1b0e added winopts_raw option for advanced window customiztaion 2021-07-15 12:51:03 -07:00
bhagwan
e6ad43e030 passthrough win_border to nvim-fzf (to enable custom border characters) 2021-07-15 11:38:31 -07:00
bhagwan
192a386087 added the option to supply extra fzf_args 2021-07-15 09:19:02 -07:00
bhagwan
565e76bdfa fixed default when devicon returns nil 2021-07-15 08:57:20 -07:00
bhagwan
c925eb89a0 added preview_opts, fixed win_border opt, fixed crash when no devicons are installed 2021-07-15 08:52:41 -07:00
bhagwan
0d89d51240 find custom path, use expand 2021-07-14 12:14:28 -07:00
bhagwan
4ba44c8dff passthrough opts to build_fzf_cli 2021-07-14 11:24:54 -07:00
ibhagwan
36d850b29b Initial commit 2021-07-14 05:29:55 -07:00