-
Notifications
You must be signed in to change notification settings - Fork 42
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
Hack to enable neovim support #136
base: master
Are you sure you want to change the base?
Conversation
This is a very first attempt at enabling neovim support for vim-taskwarrir. In my use the only functions that require interaction are undo and delete, for these two functions there is a check `has('nvim')` which changes execution from `!` to `terminal`. There is also no `taskwarrior#refresh()` call, which is done in a BufEnter autocmd.
The refresh of the terminal occurred before sync had updated so any new tasks were not showing up when syncing in neovim.
autoload/taskwarrior/action.vim
Outdated
endif | ||
endif | ||
if !has('nvim') | ||
call taskwarrior#refresh() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have in indentation problem here
autoload/taskwarrior/action.vim
Outdated
call taskwarrior#list() | ||
else | ||
execute 'terminal task '.taskwarrior#data#get_uuid().' delete' | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's generally better if you start with the positive route if has('nvim')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, I think I have fixed/improved the bits of code that you picked up.
All the conditionals in the check for nvim have been modified to check for the positive rather than negative.
I am creating a new window every time there is a call to terminal, as without it when there are multiple windows or tabs open the terminal call will close the current window.
This is a very first attempt at enabling neovim support for
vim-taskwarrior #132 . In my use the only functions that require interaction
are undo and delete, for these two functions there is a check
has('nvim')
which changes execution from!
toterminal
and there isalso no
taskwarrior#refresh()
call, which is done using a BufEnterautocmd.
There is likely a better solution that I don't yet know about.