question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add an option to exclude certain kinds of `ctags`

See original GitHub issue

This is a feature request.

Currently, ctags generates all kinds of tags for Python code: class, function, class member, variable, import, file, etc.

When doing “Go To Symbol in Workspace” I’m only interested in definitions, such as class and function definitions and class members.

Allowing to specify what kinds of tags should be generated by ctags would increase the relevancy of the “Go To Symbol in Workspace” output, and also reduce the size of tags file drasticly.

The proposed solution is to add an option allowing to specify the included/excluded kinds of tags. This option will be passed to the --Python-kinds argument of the ctags executable.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
andreyfedoseevcommented, Feb 13, 2018

@DonJayamanne

I just found that it’s possible to specify default ctags options using configuration files in either home directory or project directory.

I’m using universal-ctags already, so I created a file ~/.ctags.d/python.ctags with the following content:

--Python-kinds=-i-v

This resolved the issue for me. Given that it’s possible configure ctags without any need to change the VSCode extension I step back from this and suggest closing the issue.

As for #197, it seems that all that needs to be done there is updating the documentation to install universal-ctags instead of regular ctags.

0reactions
DonJayamannecommented, Feb 13, 2018

As for #197, it seems that all that needs to be done there is updating the documentation to install universal-ctags instead of regular ctags.

Thanks, unfortunately I haven’t tested this to confirm it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to exclude multiple directories with Exuberant ctags?
From $ man ctags : --exclude=[pattern] Add pattern to a list of excluded files and directories. This option may be specified as many...
Read more >
Universal Ctags 0.3.0 documentation
Add <pattern> to a list of excluded files and directories. This option may be specified as many times as desired. For each file...
Read more >
How can I exclude Javascript files so as to ignore the warning ...
When you give ctags the -R (recurse) option, it's often useful to use the --exclude option to tell it to ignore things like...
Read more >
Universal Ctags Documentation - Read the Docs
Some options take one-letter flags as parameters (e.g. --kinds-<LANG> option). ... --exclude=<pattern> Add <pattern> to a list of excluded files and ...
Read more >
NAME - Exuberant Ctags - SourceForge
This option only affects how the scoping of a particular kinds of tags is interpreted (i.e. ... Add pattern to a list of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found