setting.json

2024/2/21現在のvscodeのsetting.jsonです!😀
MacとWindowsの2つです.WSL用は現在作成中です.
セキュリティの関係で,jsonではなくtxtファイルで置いています!

主にpythonとlatexの設定です.特にwindowsのtexの設定はややこしいかもしれません.windowsとwslの両方にtexをインストールしているため,どちらでもビルドできるようにしています.wslでのビルドは,wslを起動し,引数としてplatexを渡しています.こうすることで,windowsのtexと同様にビルドできますし,windowsより高速です(理由は知りません).

拡張機能についても今後まとめてみます.

  • Mac
{
    "editor.fontFamily": "Cascadia Code",
    "editor.fontSize": 13,
    "editor.insertSpaces": true,
    "editor.unicodeHighlight.includeComments": false,
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "editor.unicodeHighlight.nonBasicASCII": false,
    "editor.wordWrap": "off",
    "editor.formatOnSave": true,
    "editor.formatOnPaste": false,
    "editor.tabSize": 4,
    "files.eol": "\n",
    "files.trimFinalNewlines": true,
    "editor.showFoldingControls": "always",
    "files.trimTrailingWhitespace": true,
    "security.workspace.trust.untrustedFiles": "open",
    "security.workspace.trust.enabled": false,
    "C_Cpp.clang_format_style": "{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0, BreakBeforeBraces: Attach}",
    "[txt]": {
        "editor.wordWrap": "on"
    },
    "[csv]": {
        "editor.wordWrap": "off"
    },
    //python
    "[python]": {
        "editor.formatOnType": true,
        "editor.tabSize": 4,
        "editor.defaultFoldingRangeProvider": "ms-python.black-formatter",
        "editor.defaultFormatter": "ms-python.black-formatter",
        "editor.codeActionsOnSave": {
            "source.organizeImports": "explicit"
        }
    },
    "flake8.args": [
        "--max-line-length=88"
    ],
    "[html]": {
        "editor.tabSize": 2,
    },
    "files.associations": {
        "*.html": "html"
    },
    "[css]": {
        "editor.defaultFormatter": "aeschli.vscode-css-formatter"
    },
    "workbench.editor.enablePreview": false,
    "python.defaultInterpreterPath": "/opt/homebrew/Cellar/python@3.11/3.11.7/Frameworks/Python.framework/Versions/3.11/bin/python3.11",
    // terminalにpowerlevel10kを用いてるためフォントを変更
    "terminal.integrated.fontFamily": "MesloLGS NF",
    "workbench.startupEditor": "none",
    // 以下tex
    "latex-workshop.latex.autoBuild.run": "never",
    "latex-workshop.latex.autoClean.run": "onBuilt",
    "latex-workshop.latex.recipes": [
        {
            "name": "mac_platex",
            "tools": [
                "platex",
                "platex",
                "dvipdfmx"
            ]
        },
        {
            "name": "mac_platex_bib",
            "tools": [
                "platex",
                "pbibtex",
                "platex",
                "platex",
                "dvipdfmx"
            ]
        }
    ],
    "latex-workshop.latex.tools": [
        {
            "name": "platex",
            "command": "platex",
            "args": [
                "-synctex=1",
                "%DOCFILE%"
            ],
            "env": {}
        },
        {
            "name": "pbibtex",
            "command": "pbibtex",
            "args": [
                "%DOCFILE%"
            ],
        },
        {
            "name": "dvipdfmx",
            "command": "dvipdfmx",
            "args": [
                "%DOC%"
            ]
        },
    ],
    "[latex]": {
        "editor.formatOnPaste": true,
        "editor.wordWrap": "on",
        "editor.suggestSelection": "recentlyUsed",
        "editor.tabSize": 2,
        "editor.formatOnType": true
    },
}
  • Windows(WSL)
{
    "editor.fontFamily": "Cascadia Code",
    "editor.fontSize": 14,
    "editor.insertSpaces": true,
    "editor.unicodeHighlight.includeComments": false,
    "editor.unicodeHighlight.ambiguousCharacters": false,
    "editor.unicodeHighlight.nonBasicASCII": false,
    "editor.wordWrap": "off",
    "editor.formatOnSave": true,
    "editor.formatOnPaste": false,
    "editor.tabSize": 4,
    "files.eol": "\n",
    "files.trimFinalNewlines": true,
    "editor.showFoldingControls": "always",
    "files.trimTrailingWhitespace": true,
    "security.workspace.trust.untrustedFiles": "open",
    "security.workspace.trust.enabled": false,
    "C_Cpp.clang_format_style": "{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0, BreakBeforeBraces: Attach}",
    "settingsSync.ignoredSettings": [
        "editor.fontSize",
        "editor.fontFamily",
    ],
    "[txt]": {
        "editor.wordWrap": "on"
    },
    "[csv]": {
        "editor.wordWrap": "off"
    },
    "[python]": {
        "editor.formatOnType": true,
        "editor.tabSize": 4,
        "editor.defaultFoldingRangeProvider": "ms-python.black-formatter",
        "editor.defaultFormatter": "ms-python.black-formatter",
        "editor.codeActionsOnSave": {
            "source.organizeImports": "explicit"
        }
    },
    "flake8.args": [
        "--max-line-length=88"
    ],
    "[html]": {
        "editor.tabSize": 2,
    },
    "files.associations": {
        "*.html": "html"
    },
    "[css]": {
        "editor.defaultFormatter": "aeschli.vscode-css-formatter"
    },
    "[pyscript]": {
        "editor.tabsize": 2,
    },
    "security.allowedUNCHosts": [
        "wsl.localhost"
    ],
    "terminal.integrated.profiles.windows": {
        "Ubuntu (WSL)": {
            "path": "C:\\Windows\\System32\\wsl.exe",
            "args": [
                "-d",
                "Ubuntu"
            ]
        },
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Git Bash": {
            "source": "Git Bash"
        },
    },
    "terminal.integrated.fontFamily": "MesloLGS NF",
    "latex-workshop.latex.autoBuild.run": "never",
    "latex-workshop.latex.autoClean.run": "onBuilt",
    "latex-workshop.latex.recipes": [
        {
            "name": "win_platex",
            "tools": [
                "platex",
                "platex",
                "dvipdfmx"
            ]
        },
        {
            "name": "wsl_platex",
            "tools": [
                "wsl_platex",
                "wsl_platex",
                "wsl_dvipdfmx"
            ]
        },
        {
            "name": "win_platex_bib",
            "tools": [
                "platex",
                "pbibtex",
                "platex",
                "platex",
                "dvipdfmx"
            ]
        }
    ],
    "latex-workshop.latex.tools": [
        {
            "name": "platex",
            "command": "platex",
            "args": [
                "-synctex=1",
                "%DOC%"
            ],
            "env": {}
        },
        {
            "name": "pbibtex",
            "command": "pbibtex",
            "args": [
                "%DOCFILE%"
            ],
        },
        {
            "name": "dvipdfmx",
            "command": "dvipdfmx",
            "args": [
                "%DOC%"
            ]
        },
        {
            "name": "wsl_platex",
            "command": "wsl",
            "args": [
                "platex",
                "-synctex=1",
                "%DOCFILE%.tex"
            ]
        },
        {
            "name": "wsl_dvipdfmx",
            "command": "wsl",
            "args": [
                "dvipdfmx",
                "%DOCFILE%.dvi"
            ]
        }
    ],
    "[latex]": {
        "editor.formatOnPaste": true,
        "editor.wordWrap": "on",
        "editor.suggestSelection": "recentlyUsed",
        "editor.tabSize": 2,
        "editor.formatOnType": true
    },
}

\ 最新情報をチェック /

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です