SublimeText / CTags

CTags support for Sublime Text
MIT License
987 stars 167 forks source link

allow changing opts on project settings file (*.sublime-project) #340

Closed glaucocustodio closed 3 years ago

glaucocustodio commented 3 years ago

Allow changing opts (as ctags.opts) on project settings.

Use case: I am adding this as I have a particular project with many files, I want to ignore some of them when generating ctags to speed up things, so I have added the following to the project settings file (ex: myproject.sublime-project):

{
  "settings": {
    "ctags.opts": ["--exclude=@.ctags_ignore"]
  }
}

then I created the file .ctags_ignore containing the folders I want the ctags command to ignore:

node_modules
public/packs

I can't simply add opts to Sublime Text/Packages/User/CTags.sublime-settings as I would need to create a .ctags_ignore file for each project, which I don't want to.

References:

stephenfin commented 3 years ago

Thanks! I'll try get this in a release before the end of the weekend

glaucocustodio commented 3 years ago

Did you have time to release it @stephenfin?

Changing of topic.. What do you think about passing by default the flag "--exclude=@.ctags_ignore" to the ctags command if a file .ctags_ignore exists at the project root folder?

glaucocustodio commented 3 years ago

Would you cut a release please @stephenfin? What do you think about passing by default the flag "--exclude=@.ctags_ignore" to the ctags command if a file .ctags_ignore exists at the project root folder?

stephenfin commented 3 years ago

Would you cut a release please @stephenfin?

Sorry for the delay: I was on holiday. This is done now.

What do you think about passing by default the flag "--exclude=@.ctags_ignore" to the ctags command if a file .ctags_ignore exists at the project root folder?

If you can draft a PR includes docs explaining the impact this would have, I'll be happy to review this. TBH though, I haven't used this extension in years so I'm reluctant to make any significant changes here before keeping things working since I have no way to test them myself.