vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

improvement file encoding

Open mozhuanzuojing opened this issue 3 years ago • 4 comments
trafficstars

Describe the improvement that you'd like Hope to support the phenomenon that different types of files in vscode define different encodings, for example

root folder -> .vscode -> settings.json

{
    "files.encoding": "utf8",
    "files.autoGuessEncoding": true,
    // 针对 [java] 语言,配置替代编辑器设置。
    "[java]": {
        "editor.defaultFormatter": "redhat.java",
        "files.encoding": "gb18030",
        "files.autoGuessEncoding": false
    }
}

Additional context (optional) In the project, the encoding of the .java file is gb18030, and the encoding of the .properties file is utf8

mozhuanzuojing avatar Nov 25 '21 22:11 mozhuanzuojing

We may add a option: "git-graph.useVscodeEncoding": true, then "git-graph.fileEncoding" are disabled. when git-graph.fileEncoding is not specified, auto using files.encoding and files.autoGuessEncoding

lygstate avatar Jan 07 '22 04:01 lygstate

By using https://github.com/microsoft/vscode/issues/824

lygstate avatar Jan 07 '22 04:01 lygstate

@lygstate Thanks for your detailed explanation。

mozhuanzuojing avatar Jan 07 '22 05:01 mozhuanzuojing