File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -42,20 +42,18 @@ local function complete_arg(prefix, candidates)
4242 return result
4343end
4444
45- local cmds = please
4645--- @type table<string , string[]>
4746local cmd_opts = {
4847 test = { ' under_cursor' },
4948 debug = { ' under_cursor' },
5049}
5150local var_arg_cmds = { ' command' }
5251
53- local cmd_names = vim .tbl_keys (cmds )
5452vim .api .nvim_create_user_command (' Please' , function (args )
5553 local cmd_name = args .fargs [1 ]
5654 local cmd_args = { unpack (args .fargs , 2 ) }
5755
58- local cmd = cmds [cmd_name ]
56+ local cmd = please [cmd_name ]
5957 if not cmd then
6058 logging .error (" '%s' is not a 'Please' command" , cmd_name )
6159 return
9391 -- If there's only two words in the command line, then we're completing the command name. i.e. If cmd_line looks
9492 -- like 'Please te'.
9593 if # cmd_line_words == 2 then
96- return complete_arg (arg_lead , cmd_names )
94+ return complete_arg (arg_lead , vim . tbl_keys ( please ) )
9795 end
9896
9997 -- cmd_line looks like 'Please test ...'
You can’t perform that action at this time.
0 commit comments