-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question with startup time #62
Comments
I'm sorry, but I'll need more information if I'm to help. First off, from the startup trace you've provided, it's not clear that Specifically to If you can provide more detailed timing information/explain why you think the slow speed is |
Thank you for your reply. Check out my master branch. The only difference between it and the packer branch is that the plugin management uses packer. The other modules are basically the same. Using lua to configure neovim can not view the startup time of the script through startuptime, so it is difficult to see anything from the startuptime command. This is the startup speed of my master branch.
|
@wbthomason got a new error |
In dein I can use |
I will note that your
Yes, this is an unfortunate shortcoming of
The only time this error happens (that I'm aware of) is when there's an issue with your config, e.g. #59 (there, there was an autocommand that was triggering and setting the update buffer to
PRs are always welcome! I would definitely merge something adding
I'm sorry you find |
hey I have rewrite it on my master branch. seems like only buffer modified problem is trouble some…
…--------------原始邮件--------------
发件人:"Wil Thomason "<notifications@github.com>;
发送时间:2020年10月9日(星期五) 凌晨0:03
收件人:"wbthomason/packer.nvim" <packer.nvim@noreply.github.com>;
抄送:"Raphael "<glepnir@gopherhub.org>;"Author "<author@noreply.github.com>;
主题:Re: [wbthomason/packer.nvim] question with startup time (#62)
-----------------------------------
The only difference between it and the packer branch is that the plugin management uses packer. The other modules are basically the same.
I will note that your parse_config function is different in both as well, and the python you (may?) execute in the packer branch is likely slower than the find command you use in master.
Using lua to configure neovim can not view the startup time of the script through startuptime, so it is difficult to see anything from the startuptime command.
Yes, this is an unfortunate shortcoming of startuptime. If you would like to do more fine-grained profiling, I suggest using the reltime() function, built-in to Neovim. Using this, for example, I can see that requiring packer and calling packer.init() and packer.reset() takes ~7ms on my machine.
@wbthomason got a new error
The only time this error happens (that I'm aware of) is when there's an issue with your config, e.g. #59 (there, there was an autocommand that was triggering and setting the update buffer to nonmodifiable when packer was trying to write to it).
In dein I can use on_map to bind the keymap like n = , but in packer keys just support {mode,map} or key map string like - { repo: rhysd/accelerated-jk, on_map: { n: } } , bind j and k for this plugin. when i use j or k load this plugin. In packer {'rhysd/accelerated-jk', keys = 'j'} or keys = {{'n','j'},{'n','k'}}
PRs are always welcome! I would definitely merge something adding dein's keymap shortcuts.
It's too troublesome..
I'm sorry you find packer difficult to use. You're welcome to use (or not use) whatever plugin manager you would like, and PRs to improve packer are always welcome.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
bug of keys keyword.
To be honest, packer is a good direction, but there are many missing features and some problems. I have done a lot of work to make packer suitable for me, but I failed.. If I have time, maybe I will improve packer, but my currently job is to fix neovim-lsp bugs and implement new functions to nvim-lua/lsp_extension, so I don’t have much time to check packer. Here is what I have done to packer may be helpful to you here, you may refer to dein about keys https://github.com/Shougo/dein.vim/blob/master/autoload/dein/parse.vim#L313 best wishes |
I'll note that your keys example is not a bug, but is just the I'm sorry |
Okay, maybe I don’t understand the meaning of keys. My understanding is that the plugin will only be loaded when the key is triggered. It’s strange. When I do this, my {'Shougo/defx.nvim',
cmd = 'Defx',
setup = function()
vim.api.nvim_command('autocmd FileType defx setlocal nonumber | setlocal norelativenumber')
end,
requires = {{'kristijanhusak/defx-icons',opt = true},{'kristijanhusak/defx-git',opt = true }},
config = function()
vim.g.defx_icons_column_length = 1
vim.g.defx_icons_mark_icon = ''
vim.g.defx_icons_parent_icon = ""
vim.fn['defx#custom#option']('_', {
resume = 1,
winwidth = 30,
split = 'vertical',
direction = 'topleft',
show_ignored_files = 0,
columns =' mark:indent:git:icons:filename',
root_marker = '[in]: ',
})
vim.fn['defx#custom#column']('git', {
indicators = {
Modified = '•',
Staged = '✚',
Untracked = 'ᵁ',
Renamed = '≫',
Unmerged = '≠',
Ignored = 'ⁱ',
Deleted = '✖',
Unknown = '⁇'}
})
vim.fn['defx#custom#column']('mark', { readonly_icon= '', selected_icon = '' })
vim.api.nvim_command([[
" Events
" ---
augroup user_plugin_defx
autocmd!
" Define defx window mappings
autocmd FileType defx call <SID>defx_mappings()
" Delete defx if it's the only buffer left in the window
autocmd WinEnter * if &filetype == 'defx' && winnr('$') == 1 | bdel | endif
" Move focus to the next window if current buffer is defx
autocmd TabLeave * if &filetype == 'defx' | wincmd w | endif
augroup END
" Internal functions
" ---
function! s:jump_dirty(dir) abort
" Jump to the next position with defx-git dirty symbols
let l:icons = get(g:, 'defx_git_indicators', {})
let l:icons_pattern = join(values(l:icons), '\|')
if ! empty(l:icons_pattern)
let l:direction = a:dir > 0 ? 'w' : 'bw'
return search(printf('\(%s\)', l:icons_pattern), l:direction)
endif
endfunction
function! s:defx_toggle_tree() abort
" Open current file, or toggle directory expand/collapse
if defx#is_directory()
return defx#do_action('open_or_close_tree')
endif
return defx#do_action('multi', ['drop'])
endfunction
function! s:defx_mappings() abort
" Defx window keyboard mappings
setlocal signcolumn=no expandtab
nnoremap <silent><buffer><expr> <CR> defx#do_action('drop')
nnoremap <silent><buffer><expr> l <sid>defx_toggle_tree()
nnoremap <silent><buffer><expr> h defx#async_action('cd', ['..'])
nnoremap <silent><buffer><expr> st defx#do_action('multi', [['drop', 'tabnew'], 'quit'])
nnoremap <silent><buffer><expr> s defx#do_action('open', 'botright vsplit')
nnoremap <silent><buffer><expr> i defx#do_action('open', 'botright split')
nnoremap <silent><buffer><expr> P defx#do_action('preview')
nnoremap <silent><buffer><expr> K defx#do_action('new_directory')
nnoremap <silent><buffer><expr> N defx#do_action('new_multiple_files')
nnoremap <silent><buffer><expr> dd defx#do_action('remove_trash')
nnoremap <silent><buffer><expr> r defx#do_action('rename')
nnoremap <silent><buffer><expr> x defx#do_action('execute_system')
nnoremap <silent><buffer><expr> . defx#do_action('toggle_ignored_files')
nnoremap <silent><buffer><expr> yy defx#do_action('yank_path')
nnoremap <silent><buffer><expr> ~ defx#async_action('cd')
nnoremap <silent><buffer><expr> q defx#do_action('quit')
nnoremap <silent><buffer><expr> <Tab> winnr('$') != 1 ?
\ ':<C-u>wincmd w<CR>' :
\ ':<C-u>Defx -buffer-name=temp -split=vertical<CR>'
" Defx's buffer management
nnoremap <silent><buffer><expr> q defx#do_action('quit')
nnoremap <silent><buffer><expr> se defx#do_action('save_session')
nnoremap <silent><buffer><expr> <C-r> defx#do_action('redraw')
nnoremap <silent><buffer><expr> <C-g> defx#do_action('print')
" File/dir management
nnoremap <silent><buffer><expr><nowait> c defx#do_action('copy')
nnoremap <silent><buffer><expr><nowait> m defx#do_action('move')
nnoremap <silent><buffer><expr><nowait> p defx#do_action('paste')
nnoremap <silent><buffer><expr><nowait> r defx#do_action('rename')
nnoremap <silent><buffer><expr> dd defx#do_action('remove_trash')
nnoremap <silent><buffer><expr> K defx#do_action('new_directory')
nnoremap <silent><buffer><expr> N defx#do_action('new_multiple_files')
" Jump
nnoremap <silent><buffer> [g :<C-u>call <SID>jump_dirty(-1)<CR>
nnoremap <silent><buffer> ]g :<C-u>call <SID>jump_dirty(1)<CR>
" Change directory
nnoremap <silent><buffer><expr><nowait> \ defx#do_action('cd', getcwd())
nnoremap <silent><buffer><expr><nowait> & defx#do_action('cd', getcwd())
nnoremap <silent><buffer><expr> <BS> defx#async_action('cd', ['..'])
nnoremap <silent><buffer><expr> ~ defx#async_action('cd')
nnoremap <silent><buffer><expr> u defx#do_action('cd', ['..'])
nnoremap <silent><buffer><expr> 2u defx#do_action('cd', ['../..'])
nnoremap <silent><buffer><expr> 3u defx#do_action('cd', ['../../..'])
nnoremap <silent><buffer><expr> 4u defx#do_action('cd', ['../../../..'])
" Selection
nnoremap <silent><buffer><expr> * defx#do_action('toggle_select_all')
nnoremap <silent><buffer><expr><nowait> <Space>
\ defx#do_action('toggle_select') . 'j'
nnoremap <silent><buffer><expr> S defx#do_action('toggle_sort', 'Time')
nnoremap <silent><buffer><expr> C
\ defx#do_action('toggle_columns', 'indent:mark:filename:type:size:time')
endfunction
]])
end
} |
code in here https://github.com/glepnir/nvim/blob/packer/lua/loadpack.lua just three plugins. check startuptime..it takes too long time.
The text was updated successfully, but these errors were encountered: