vscode-spell-checker icon indicating copy to clipboard operation
vscode-spell-checker copied to clipboard

Add feature to support wildcard for path / files

Open MKHen opened this issue 1 year ago • 7 comments

I am building up a company dictionary on the base of this extension. To separate the words of the different departments (and to always address the PRs to the right group) I've started with several dictionary files. Would it be possible for e.g. a use who only want to use ant not to contribute to include them all using a wildcard in the path entry?

Greetings Michael

MKHen avatar Jul 28 '23 05:07 MKHen

@MKHen,

Would you please be able to give me a bit more detail on what you are trying to do?

Jason3S avatar Jul 31 '23 23:07 Jason3S

For sure. In my company there are several departments. Lets call them depA, depB and depC. They all working on different products not influencing each other. Only common used part is VS Code and may a hand of special libraries. So my idea is to make e.g. 4 dictionary files hosted on Bitbucket or similar:

  • common - for the whole company holding e.g. the company name and other stuff all departments have to use
  • depA - with special words and terms for depA
  • depB - with special words and terms for depB
  • depC - with special words and terms for depC

To easily include them I would image a VS Code setting like

"cSpell.customDictionaries": {
     "sharedDic": {
            "name": "sharedDic",
            "path": "D:\\sharedDic\\*.txt",
            "description": "Shared dictionary",
            "addWords": false
     }
}

The pat above is only a suggestion. Possible is also to check out the dics via CMake FetchContent.

I know that most of the guys who will work with will seldom contribute words. So I can image that if e.g., someone of depB who likes to contribute will set up the dic like

"cSpell.customDictionaries": {
     "sharedDic": {
            "name": "sharedDic",
            "path": "D:\\sharedDic\\*.txt",
            "description": "Shared dictionary",
            "addWords": false
     },
     "depB": {
            "name": "depB",
            "path": "D:\\sharedDic\\depB.txt",
            "description": "Shared dictionary for department B",
            "addWords": true
     }
}

Even imaginable for me is to set up all dictionaries with "addWords": true. Git and PRs will prevent the dics from ugly stuff.

MKHen avatar Aug 01 '23 04:08 MKHen

@MKHen,

At the moment, each dictionary is a single file. I can see how it could be useful to be able to specify multiple files to compose a dictionary. However, it isn't currently a priority.

But, you are able to use a URL instead of a file path if that makes your life easier.

"cSpell.customDictionaries": {
     "companies": {
            "name": "companies",
            "path": "https://github.com/streetsidesoftware/cspell-dicts/blob/main/dictionaries/companies/dict/companies.txt",
            "description": "Companies dictionary",
            "addWords": false
     }
}

What is planned, is the ability to refer to a remote dictionary definition, that way you could refer to a BitBucket URL that defined all the company and department dictionaries.

Jason3S avatar Aug 01 '23 17:08 Jason3S

Hi @Jason3S,

Thank you for that hint using URLs for the dictionaries. I think this will make live easier and lower the hurdle to use your tool.

MKHen avatar Aug 03 '23 05:08 MKHen