dhruvasagar / vim-prosession

Handle vim sessions like a pro
254 stars 22 forks source link

Add escape hatch for auto loading when vim flags are specified #88

Closed rsheasby closed 2 years ago

rsheasby commented 2 years ago

@Gee19 @dhruvasagar The changes in #85 have the side effect of breaking auto loading for those of us using GUIs that launch the vim/nvim subprocess with arguments. In my case, I use neovim-qt which adds a few command line arguments to nvim, but the change in #85 now prevents prosession from loading. There doesn't seem to be any way of undoing this behaviour either? It really seems that #85 should've been applied as a config option, instead of just added universally.

Gee19 commented 2 years ago

@rsheasby initially that PR only prevented the session autoload if the -q flag was passed but we couldn't think of a case where autoloading a session made sense with some args supplied to vim. Could you supply the args that are being passed to the embedded nvim?

Running :echo v:argv should suffice, I can push up another PR with a fix ASAP

rsheasby commented 2 years ago

Here's the full launch args from ps -A: /opt/homebrew/bin/nvim --embed --cmd let &rtp.=',/Applications/NeoVim-Qt.app/Contents/MacOS/../Resources/runtime' --cmd set termguicolors

rsheasby commented 2 years ago

Note that no args are provided to nvim-qt, it's the args that nvim-qt provides to nvim when it spawns it as a child process.

Gee19 commented 2 years ago

@rsheasby for the time being you can workaround this with my fork: https://github.com/Gee19/vim-prosession

Apologies for the trouble!

dhruvasagar commented 2 years ago

Is this still an issue after closing #89 ?

rsheasby commented 2 years ago

Nope, that solved it.

Thanks for the quick response!