hackjutsu / Lepton

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

Snap is loading an erroneous .leptonrc configuration #536

Open colematt opened 1 year ago

colematt commented 1 year 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:

Lepton "About" dialog says it's loading configuration from /home/matthew/snap/lepton/12/.leptonrc. Contents of that file are:

{
    "theme": "dark",
    "autoUpdate": false,
    "snippet": {
        "expanded": true,
        "newSnippetPrivate": false,
        "sorting": "updated_at",
        "sortingReverse": true
    },
    "editor" : {
        "tabSize": 2,
        "validateFilename": true
    },
    "userPanel": {
        "hideProfilePhoto": true
    },
    "logger": {
        "level": "debug"
    },
    "proxy": {
        "enable": false,
        "address": "socks://localhost:1080"
    },
    "notifications": {
        "success": true,
        "failure": true
    },
    "shortcuts": {
        "keyShortcutForSearch": "CMD+F",
        "keyNewGist": "CommandOrControl+N",
        "keyEditGist": "CommandOrControl+E",
        "keySubmitGist": "CommandOrControl+S",
        "keyImmersiveMode": "CommandOrControl+I",
        "keyAboutPage": "CommandOrControl+,",
        "keyDashboard": "CommandOrControl+D",
        "keyEditorExit": "CommandOrControl+Escape",
        "keySyncGists": "CommandOrControl+R"
    }
}

However, the log file includes the following text:

2022-10-08T14:20:05.695Z - info: 

----- Lepton v1.10.0 linux-----

2022-10-08T14:20:05.696Z - info: [conf] Looking for .leptonrc at /home/matthew/snap/lepton/12/.leptonrc
2022-10-08T14:20:05.696Z - info: [conf] The resolved configuration is ...
2022-10-08T14:20:05.696Z - info: "theme": "light"
2022-10-08T14:20:05.696Z - info: "autoUpdate": false
2022-10-08T14:20:05.696Z - info: "userPanel": {"hideProfilePhoto":false}
2022-10-08T14:20:05.696Z - info: "logger": {"level":"debug"}
2022-10-08T14:20:05.696Z - info: "proxy": {"enable":false,"address":"socks://localhost:1080"}
2022-10-08T14:20:05.696Z - info: "snippet": {"sorting":"updated_at","sortingReverse":true,"expanded":true,"newSnippetPrivate":false}
2022-10-08T14:20:05.696Z - info: "editor": {"tabSize":4,"validateFilename":true}
2022-10-08T14:20:05.697Z - info: "enterprise": {"enable":false,"host":"","token":"","avatarUrl":""}
2022-10-08T14:20:05.697Z - info: "notifications": {"success":true,"failure":true}
2022-10-08T14:20:05.697Z - info: "shortcuts": {"keyShortcutForSearch":"Shift+Space","keyNewGist":"CommandOrControl+N","keyEditGist":"CommandOrControl+E","keyDeleteGist":"CommandOrControl+Delete","keySubmitGist":"CommandOrControl+S","keyImmersiveMode":"CommandOrControl+I","keyAboutPage":"CommandOrControl+,","keyDashboard":"CommandOrControl+D","keyEditorExit":"CommandOrControl+Escape","keySyncGists":"CommandOrControl+R"}
...

Which doesn't match my config file. It looks like it's loading a default configuration file from somewhere, as those contents match the sample .leptonrc from the wiki.

If possible, provide the log files

Full log file below. 2022-10-08T14.20.05.692Z.log

KeatsPeeks commented 1 year ago

the configuration file doesn't work in macos either.