summaryrefslogtreecommitdiff
path: root/plugin/telescope.vim
diff options
context:
space:
mode:
authorRaphael <glepnir@gopherhub.org>2020-11-03 21:04:55 +0800
committerGitHub <noreply@github.com>2020-11-03 08:04:55 -0500
commit1f3110bf54877b975956e42911e05d517d8f4993 (patch)
treed949394ca2e0f9b7670455bbb617272e536ddb3d /plugin/telescope.vim
parent051aefdb8cea71294e6e62e8a4a1e051c48e4edd (diff)
Feat: convert options if it is table type in lua (#220)
* support custom list type commands * update command usage
Diffstat (limited to 'plugin/telescope.vim')
-rw-r--r--plugin/telescope.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugin/telescope.vim b/plugin/telescope.vim
index 6538226..ae1af2d 100644
--- a/plugin/telescope.vim
+++ b/plugin/telescope.vim
@@ -39,9 +39,15 @@ function! s:load_command(builtin,...) abort
let opts = {}
" range command args
+ " if arg in lua code is table type,we split command string by `,` to vimscript
+ " list type.
for arg in a:000
let opt = split(arg,'=')
- let opts[opt[0]] = opt[1]
+ if opt[0] == 'find_command' || opt[0] == 'vimgrep_arguments'
+ let opts[opt[0]] = split(opt[1],',')
+ else
+ let opts[opt[0]] = opt[1]
+ endif
endfor
let telescope = v:lua.require('telescope.builtin')