idanarye / vim-dutyl

Coordinate D tools to work together for you
http://www.vim.org/scripts/script.php?script_id=5003
79 stars 13 forks source link

Navigation bar integration #18

Closed joakim-brannstrom closed 9 years ago

joakim-brannstrom commented 9 years ago

Let Dutyl provide a configuration for TagBar to work with Dscanner. See proof-of-concept. Dscanner has merged an update that extends the generated ctags with exuberant metadata to make it feasible. See dscanner update. The configuration is complex/tedious so my thought was that when I've made it work why not share it with others. Make it easy for the user by providing everything needed via a function, dutyl#tagbar#setup().

What do you think? Something that you think may be part of Dutyl?

Issue

Requires a version of Dscanner after v0.2.0-beta1. Otherwise errors...

Background

When I started programming in D I missed the navigation bar that I had when coding in other languages. I found out that ctags-d could generate what I needed and could be made to work with TagBar. But I wasn't happy with the result. I later saw that Dscanner can generate tags but they lacked the needed metadata. The implementation in Dscanner was very straight forward and easy to understand so, why not add what was missing :)

idanarye commented 9 years ago

I fail to see the point of involving Dutyl in this. Why require Dutyl just to set some configuration?

The TagBar documentation points to a Wiki page that explains how to add support to various languages. I don't know why they don't simply put these directly in the plugin code, but since this seems to be the official TagBar way of adding language support - why not simply add your g:tagbar_type_d configuration to that Wiki, as an alternative, better option for those that have dscanner v0.2.0-beta1 or later installed?

joakim-brannstrom commented 9 years ago

Summary Aye, I'll update the TagBar wiki :)

Thoughts Yes, my first thought was to add it to the wiki you pointed to. But then I got the above idea about an integration with vim-dutyl when I thought of my own experience with configuring TagBar. "Why isn't it working for D. So annoying." First months later I found the wiki with explanations of how to make it work.

Which led me to the following, assumptions:

Based on the probability it can be deduced that providing a correct configuration of TagBar that uses dscanner will be successful. Especially if the user has to call a function to activate the integration. It is in accordance with what the user strives for.

So the options after that train of thought was. a) update wiki. b) integrate configuration with vim-dutyl and do a) c) update the TagBar code (based on your comment :)).

Flipping thought If vim-dutyl provides integration with syntastic it could be argued that the stated mission of vim-dutyl expands to being the glue layer between D/Dtools and vim ecosystem. (Comparing the two integrations it is observed that synt-int is quite a bit more complex than TagBar which is only a variable. Which is a reason to say that TagBar is no while syntastic is yes).