hackjutsu / Lepton

💻 Democratizing Snippet Management (macOS/Win/Linux)
https://hackjutsu.com/Lepton
MIT License
10.14k stars 475 forks source link

Feature/optional filename validation #421

Closed sunxyw closed 4 years ago

sunxyw commented 4 years ago

Make filename validation more flexible for special use cases.

I have added a switch option "validateFilename" under the "editor" in .leptonrc.

e.g. In your <homeDir>/.leptonrc

"editor": {
    "tabSize": 4,
    "validateFilename": true
},

Filename validation will be disable when "validateFilename" switch to false.

Tested on Windows10, but not tested on other platforms.

sunxyw commented 4 years ago

I have moved the "required" check out of the the if (conf.get('editor').validateFilename) block. And I have deleted some unrelated files, includes yarn-error.log, and the binary file.

Please feel free to tell me if it still has some problems or any improvement.

hackjutsu commented 4 years ago

@sunxyw Thanks for the contributions!