Commit graph

6 commits

Author SHA1 Message Date
Tomas Janousek
1e3ccb16f8 vwtags: Distinguish (tag kinds) between header, preset and viewport
For tagbar to correctly nest the tags, we need to remember kinds of
parent scopes as well. This wasn't done in the original taskwiki
implementation.
2020-09-23 02:03:47 -04:00
Tomas Janousek
07dc2b8ceb vwtags: Viewports/presets shown using their name only
In other words hide the parts behind `|`. Handle vimwiki links
correctly.
2020-09-23 02:03:47 -04:00
Tomas Janousek
91f98d54b3 tests: Add basic tests for vwtags 2020-09-23 02:03:47 -04:00
Tomas Janousek
b48123fd58 vwtags: Drop help and import from __future__
We don't need the help message as g:tagbar_type_vimwiki is set by
taskwiki itself, and as we're going to refactor this, maintaining the
help is extra work that makes little sense here.

The import isn't needed in python3.
2020-09-23 02:03:47 -04:00
Tomas Janousek
3cbf59e8ea vwtags: Revert to current vimwiki/utils master
The implementation that was here had several limitations:

* headers containing `[[vimwiki|links]]` are incorrectly marked as
  viewports

* headers/viewports nested below such headers aren't correctly nested in
  tagbar as they use `header:` to refer to their parent scope

* presets are marked as viewports, and viewports nested under presets
  don't correctly nest for the same reason as above

* the logic for marking headers/viewports as `i:inside` is incorrect,
  and the motivation for it is unclear

Let's revert to
6c419fba6f/vwtags.py
and then we'll add tests and implement support for viewports and presets
in a way that actually works.
2020-09-23 02:03:47 -04:00
Tomas Babej
97fe29ff36 Add script to generate tags, taken from vimwiki/utils 2015-04-02 07:17:32 +02:00