Open michael-odonovan opened 3 years ago
That shouldn't happen by default. What options do you have set? It gets a Dictionary when it expects a String.
Hi, Thanks for coming back to me. This is everything I have set at the moment:
let g:startify_custom_header = [
\' __ __ _ _ ____ _ _ ',
\' \ \ / /__ ___ | | |_ _ | _ \| |__ (_)_ __ ___ ',
\' \ \ /\ / / _ \ / _ \| | | | | | | |_) | _ \| | _ \ / _ \ ',
\' \ V V / (_) | (_) | | | |_| | | _ <| | | | | | | | (_) |',
\' \_/\_/ \___/ \___/|_|_|\__, | |_| \_\_| |_|_|_| |_|\___/ ',
\' |___/ ',
\' <leader>S :Startify V open file in a vsp',
\' :SSave[!] save a session T open file in a tab',
\' :SDelete[!] delete a session e open a blank file',
\]
let g:startify_session_dir = '~/.config/nvim/sessions'
let g:startify_session_persistence = 0 " automatically update sessions
let g:startify_files_number = 10
let g:startify_change_to_dir = 1
let g:startify_change_to_vcs_root = 0
let g:startify_padding_left = 5
let g:startify_session_sort = 1 " sort sessions by modification time
let g:startify_enable_special = 0 " gets rid of [e] and [q]
let s:bookmarks1 = [
\ '~/.config/nvim/init.vim',
\ '~/.config/nvim/colors/daytona.vim',
\ ]
let s:bookmarks2 = [
\ '~/documents/notes',
\ '~/coding-files',
\ ]
let g:startify_lists = [
\ {'header': [' Files'], 'type': {-> map(s:bookmarks1, '{"line": v:val, "path": v:val}')}},
\ {'header': [' Folders'], 'type': {-> map(s:bookmarks2, '{"line": v:val, "path": v:val}')}},
\ ]
map <leader>s :Startify<CR>
That exact configuration is working fine here with Nvim 0.4.4 and Nvim master. Maybe double-check your vim-startify plugin is up-to-date.
Are you sure there isn't any other configuration left over somewhere else? Maybe check :echo g:startify_lists
when Nvim started. :)
Otherwise we need to figure out why append()
is getting wrong arguments. For that, open autoload/startify.vim
, and add the following line above the line with append()
:
echomsg 'DEBUG: '. s:leftpad .'['. index .']'. repeat(' ', (3 - strlen(index))) . entry.line
Then start Nvim again, you probably get the error again, but then check :messages
for the DEBUG messages.
Hi,
When I run
:echo g:startify_lists
it returns
[{'header': [' Files'], 'type': function('<lambda>1')}, {'header': [' Folders'],
'type': function('<lambda>2')}]
I have gone to /.config/nvim/plugins-storage/vim-startify/autoload/startify.vim and done a search /append() and there is no match. there are multiple matches for call append functions but I out of my depth from here...
sorry I did an edit as I messed up your instructions first time. thanks mike
I linked the exact line above. :)
Oops sorry missed that.
I didn't get an error on startup but then got the same error when opening startify from within nvim.
:messages gives -
DEBUG: [0] ~/.config/nvim/init.vim
DEBUG: [1] ~/.config/nvim/colors/daytona.vim
DEBUG: [2] ~/documents/notes
DEBUG: [3] ~/coding-files
Error detected while processing function startify#insane_in_the_membrane[81]..
thanks again Mike
Hello, Sorry to bring this up again, but when trying to go back to Startify from an open nvim buffer (:Startify) I get this error:
Error detected while processing function startify#insane_in_the_membrane[81]..61_show_lists : line 35: E731: using Dictionary as a String E116: Invalid arguments for function append
I have checked it is caused by the added funcref/bookmarks. Startify opens initially fine from the command line though, just throws this error if you try to go back to it with :Startify. Any ideas I should try? Thanks again for your help and plugin. Mike