Skip to content
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

Add universal ctags support #84

Merged
merged 2 commits into from
Mar 3, 2018
Merged

Add universal ctags support #84

merged 2 commits into from
Mar 3, 2018

Conversation

Felixoid
Copy link
Contributor

@Felixoid Felixoid commented Mar 2, 2018

Hi. There is universal ctags which supports hierarchy.
This PR implements checking, which ctags installed, and chooses config for tagbar accordingly.

@Felixoid Felixoid changed the title Add universal ctags support WIP: Add universal ctags support Mar 2, 2018
@Felixoid
Copy link
Contributor Author

Felixoid commented Mar 2, 2018

NB: for fixing Ctrl+] jump to class instead first any include second commit was done

@Felixoid Felixoid changed the title WIP: Add universal ctags support Add universal ctags support Mar 2, 2018
@rodjek rodjek merged commit 921ccf8 into rodjek:master Mar 3, 2018
@Felixoid
Copy link
Contributor Author

Felixoid commented Mar 4, 2018

@masatake Hi. Maybe this would be interesting for you also. I'm not completely sure about config correctness, but it looks good enough. https://github.com/rodjek/vim-puppet/blob/598b48b064ba1d6e03667a35ac478abb02d7a396/ctags/puppet_u.ctags

@masatake
Copy link

masatake commented Mar 5, 2018

@Felixoid, thank you for this notification. I'm very interested in.

Universal-ctags has built-in puppet parser. Isn't it enough?
https://github.com/universal-ctags/ctags/blob/master/optlib/puppetManifest.ctags
See the output of u-ctags --list-languages | grep -i puppet.

...

I compared my implementation with yours quickly.
Mine doesn't recognize include, site, and default.
Supporting include cannot be done in mine because it should be captured as reference tag.
(http://docs.ctags.io/en/latest/news.html?highlight=reference%20tag#reference-tags)
I have not implement the way to record a tag captured by a regex parser as reference tag yet.
This is the second time people need it. I have to think about implementing it.

About site, I cannot find its definition in https://puppet.com/docs/puppet/5.3/index.html quickly.
I guess I can add a code to my parser.

About default, I wonder how I should do.

Anyway, I would like you to try my parser that is built-in u-ctags. And I would like to hear the comments from real users. Mine is stateful, so you will see a serious bug. I would like to fix it.

I don't know puppet well. I wrote my parser because I would like to test newly written multiple state regex meta parser. Therefore the comments from real users are important for me.

@masatake
Copy link

masatake commented Mar 5, 2018

BTW, when writing a parser even if it is not large, I recommend you to make a test input and its expected output; and commit them to your repository. A regex parser tends to be too complicated. The test case and the expected output help people maintain the parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants