uctakeoff / vscode-counter

VS Code extension: counts blank lines, comment lines, and physical lines of source code in many programming languages.
MIT License
151 stars 20 forks source link

How to ignore directories #1

Closed ecker00 closed 5 years ago

ecker00 commented 5 years ago

How do you make it ignore some directories? Seems like it might be ignoring node_modules already, is there a way to control this and add more directories to that ignore list?

uctakeoff commented 5 years ago

There are several ways to exclude files and folders.

Use VSCodeCounter.exclude.

You can use glob syntax manually here.

Use VSCodeCounter.useFilesExclude and files.exclude.

When useFilesExclude is set to true, the contents of the settings files.exclude are excluded.

Use VSCodeCounter.useGitignore and .gitignore.

If useGitignore is set to true, it excludes the contents of .gitignore. (However, this is not completely implemented.)

ecker00 commented 5 years ago

I'm not using this extension right now, but might in the future again.

But to clarify, do you mean to create a file in the root of the project named VSCodeCounter.exclude and list files to ignore there with glob syntax? Or are you talking about VS Code settings?

uctakeoff commented 5 years ago

It can be set by VSCode settings.

Also, files ignored by .gitignore should be ignored by default.

ecker00 commented 5 years ago

Thanks for the explanation, that sounds good then!