hackjutsu / Lepton

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

.leptonrc not loading #472

Closed seebeen closed 3 years ago

seebeen commented 3 years ago

The more we know about your system and use case, the more easily and likely we can help.

Environment info

Description of the problem / feature request / question:

.leptonrc not loaded.

Lepton confguration file is saved in proper location, but it doesn't load.

Configuration file contents are:

{
    "theme": "dark",
    "autoupdate: true,
    "userPanel": {
        "hideProfilePhoto": true
    },
}

If possible, provide a sample gist or screenshot:

If possible, provide the log files

For Lepton after v1.9.0, the path of the log file can be found at Command/Ctrl + ,

2020-12-08T11:36:32.372Z - info:

----- Lepton v1.9.1 win32-----

2020-12-08T11:36:32.372Z - info: [conf] Looking for .leptonrc at C:\Users\Sibin Grasic/.leptonrc 2020-12-08T11:36:32.372Z - info: [conf] The resolved configuration is ... 2020-12-08T11:36:32.372Z - info: "theme": "light" 2020-12-08T11:36:32.372Z - info: "autoUpdate": false 2020-12-08T11:36:32.373Z - info: "userPanel": {"hideProfilePhoto":false} 2020-12-08T11:36:32.373Z - info: "logger": {"level":"debug"} 2020-12-08T11:36:32.373Z - info: "proxy": {"enable":false,"address":"socks://localhost:1080"} 2020-12-08T11:36:32.373Z - info: "snippet":

nkzhengwt commented 3 years ago

the same. There is not .leptonrc in the folder after ctrl+comma. Platform: Windows 10

alpipego commented 3 years ago

Your snippet is not valid JSON, this will work:

{
    "theme": "dark",
    "autoupdate": true,
    "userPanel": {
        "hideProfilePhoto": true
    }
}
seebeen commented 3 years ago

Well, I feel like an idiot. 😢

kauanmocelin commented 3 years ago

I maked exactly same error. It's the habit for prevent errors on js objects with this comma :smile:

kinduff commented 3 years ago

Happen to me too, until I stumbled in this thread. I have my opinions about JSON as config, TOML is pretty nice for these kind of things.