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 set ignores for local project? #17

Closed wangdayong228 closed 4 years ago

wangdayong228 commented 4 years ago

How to use a customized setting for different project, and not use the global setting?

For example, my global settings.json is configured as below global settings.json file path: ~/Library/Application Support/Code/User/settings.json

{
    "VSCodeCounter.exclude": [
        "**/node_modules/**",
    ]}

but I want ignore "**/static/**" in my local project, when I configure in local settings.json, it does not work. local settings.json file path: /Users/xxx/local_project/.vscode/settings.json

{
    "VSCodeCounter.exclude": [
        "**/node_modules/**",
        "**/static/**"
    ]
}

Is there a way to set ignores for local project? Thank you.

uctakeoff commented 4 years ago

I think your way is right. You can see a detailed log of this extension in the developer tools.

Help> Toggle Developer Tools

So you should see the following log:

[VSCodeCounter] 2019-12-26T22:39:01.857Z excludes : "**/.gitignore", "**/.vscode/**", "**/node_modules/**", "**/.git", "**/.svn", "**/.hg", "**/CVS", "**/.DS_Store", ".VSCodeCounter"

Please tell me what was output.

uctakeoff commented 4 years ago

Also check if it works with global settings.

wangdayong228 commented 4 years ago

@uctakeoff I tried it again and it works, maybe I made some mistake before. It worked fine both on local and global. Thank you.