Commit graph

13 commits

Author SHA1 Message Date
Tomas Janousek
92785f10f7 ftplugin: Minor cleanup 2020-09-18 11:28:39 -04:00
Tomas Janousek
94fe6ed8e8 ftplugin: Postpone initial refresh to better preserve folds
Vim preserves folds by writing line jumps into the view script, so it's
better to load this script with the original file contents and only then
refresh from taskwarrior. The folding is still often broken when the
buffer is updated, but that can now be considered a vim bug and may
perhaps one day be fixed (or even worked around, if one is persistent
enough). Loading the view after modifying the buffer is simply wrong,
that can never ever work.
2020-09-18 11:28:39 -04:00
Tomas Janousek
f3fe7aca21 ftplugin: Only load the python plugin once
This makes opening wiki pages significantly faster and also prevents
clearing the entire cache every time.
2020-09-18 11:28:39 -04:00
Tomas Janousek
b722c29f9e ftplugin: Make commands buffer-local
Consistency with vimwiki, less confusion/clutter.
2020-09-18 11:28:39 -04:00
Tomas Janousek
2942ba776d ftplugin: Use buffer local autocmds
* simplifies code a bit
* avoids triggering autocmds on *.wiki files outside of registered vimwiki
* prevents reordering of autocmds when switching wiki pages

The last bit is my main motivation: I need to add a BufEnter autocmd (to
~/.vim/after, not to taskwiki itself) and I'd love to rely on
`cache.load_current()` having been called already.
2020-09-18 11:28:39 -04:00
Tomas Janousek
15ce16f24c Revert "tests: Use explicit coverage tracking"
This reverts commit b00e886142.

This fixes reporting of coverage by the few tests that run outside of
vim.

The commit that is being reverted doesn't explain why it was committed,
and the git history suggests it was reverted once and then reintroduced
later again. None of those commits explains the why. I can only guess
that the last time this was committed was an attempt to fix coverage
reporting to outside of docker, which it didn't, and additionally it
made coverage gathering less robust (see previous commit). So this is
yet another fix for the inaccurate coverage reporting.

Or maybe it was because `--cov` without `=taskwiki` an argument reports
coverage for tests instead of taskwiki code? Nevermind, I guess, now it
works well.
2020-07-08 21:36:52 -04:00
Tomas Janousek
698e2448f3 tests: Fix vimwiki loading errors
Not only can we stop ignoring the errors, this also fixes
TestInfoActionNotTriggeredByEnterOnLink which would otherwise cause vim
to complain about g:vimwiki_wikilocal_vars not being available.
2020-07-02 09:51:56 -04:00
mrossinek
c5310126fa
Change mappings to disallow remaps (fixes #182) 2019-02-24 12:02:13 -05:00
mrossinek
879853becc
Add maplocalleader option 2019-02-24 12:02:12 -05:00
mrossinek
e82813e03b
Add mapping-suppressing option 2019-02-24 12:01:54 -05:00
Marco Hinz
eaffcbd718 Nvim doesn't imply Python support
`has('python')` and `has('python3')` work the same in Vim and Neovim, so there's
no need for that extra check. That check is even wrong, since Nvim's `:python`
and friends won't work either as long as the Python provider isn't installed as
well.
2019-01-12 00:03:41 -05:00
Tomas Babej
b00e886142
tests: Use explicit coverage tracking 2018-07-31 03:46:58 -04:00
Igor Line
0c964460e6 Fixes filename and path in ftplugin to avoid conflict with vimwiki and
specific plugin managers
2017-10-10 01:03:01 -04:00