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

Generate a tags file for navigation while editing #126

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

amartini51
Copy link
Member

The output uses using the POSIX ctags syntax, and enables "jump to definition" for DocC links and for syntactic categories in the formal grammar. From testing with a few different editors, here's what I saw:

  • In Vim, you have to configure setlocal iskeyword+=#,:,- to allow those characters as part a tag. Then both links and grammar works. Classic vi supports tag files, but doesn't have iskeyword, so other vi-like editors might not be able to follow tags.
  • In BBedit, links work without configuration changes. I wasn't able to get grammar to work, likely because it doesn't consider - as part of a tag.
  • Emacs has support for tags files, but it seems to need a module or configuration change to handle the ctags syntax instead of its preferred etags syntax.
  • Xcode uses its own indexing for navigation, not a tags file.

Marking this as a draft for now. I'd like to consider rewriting the script in Swift.

There aren't any headings or grammatical category names today that
include a slash, and there aren't likely to ever be any.  This change
prevents generating incorrect search patterns in the tags file in the
future, just in case, and it's better to be correct anyhow.
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.

1 participant