diff --git a/.SpaceVim.d/plugin/neovim-qt.lua b/.SpaceVim.d/plugin/neovim-qt.lua new file mode 100644 index 000000000..3551a20ba --- /dev/null +++ b/.SpaceVim.d/plugin/neovim-qt.lua @@ -0,0 +1,8 @@ +vim.api.nvim_create_user_command('Nvim', function(opt) + local cmd = { 'nvim-qt', '--' } + for _, v in pairs(opt.fargs) do + table.insert(cmd, v) + end + + vim.fn.jobstart(cmd) +end, { nargs = '*', complete = 'file' }) diff --git a/bundle/FlyGrep/autoload/flygrep.vim b/bundle/FlyGrep/autoload/flygrep.vim new file mode 100644 index 000000000..46be63cb3 --- /dev/null +++ b/bundle/FlyGrep/autoload/flygrep.vim @@ -0,0 +1,8 @@ +function! flygrep#open(argv) abort + call SpaceVim#plugins#flygrep#open(a:argv) +endfunction + +function! flygrep#statusline() abort + let st = ' FlyGrep %{getcwd()} ' + return st . "%{getline(1) ==# '' ? '' : (line('.') . '/' . line('$'))}" +endfunction diff --git a/bundle/FlyGrep/plugin/FlyGrep.vim b/bundle/FlyGrep/plugin/FlyGrep.vim index bb4149739..819e2a9ce 100644 --- a/bundle/FlyGrep/plugin/FlyGrep.vim +++ b/bundle/FlyGrep/plugin/FlyGrep.vim @@ -39,5 +39,5 @@ let g:FlyGrep_enable_statusline = get(g:, 'FlyGrep_enable_statusline', 1) " Set FlyGrep default command prompt let g:spacevim_commandline_prompt = get(g:, 'spacevim_commandline_prompt', '➭') -command! -nargs=0 FlyGrep call FlyGrep#open({}) +command! -nargs=0 FlyGrep call flygrep#open({}) diff --git a/bundle/FlyGrep/test/vimrc b/bundle/FlyGrep/test/vimrc new file mode 100644 index 000000000..c70ea63a3 --- /dev/null +++ b/bundle/FlyGrep/test/vimrc @@ -0,0 +1,4 @@ +let s:path = expand(':p:h:h') +call execute('set rtp+=' . s:path) +set rtp+=. +