[vscode] code fomatter 가 자동으로 fix 안될 때 > IT 기술백서

IT 기술백서

직접 알아내거나 검색하기 귀찮아서 모아 둔 것

Tools | [vscode] code fomatter 가 자동으로 fix 안될 때

본문

 

보통은 아래처럼 하면 된다.

 

[code]

"editor.formatOnSave": true,

[/code]

 

그런데 뭔가 꼬였을때 안될경우가 있다.

최대한 주석처리 했다가 저장해 보고를 반복해 본다.

 

다시 작동하면 주석을 다 해제하면 된다.

 

참고로 내 설정

 

[code]

{

  "editor.renderWhitespace": "all",

  "editor.codeActionsOnSave": {

    "source.fixAll.eslint": true,

    "source.fixAll.stylelint": true,

  },

  "editor.formatOnSave": true,

  "editor.insertSpaces": true,

  "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",

  "python.pythonPath": "c:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe",

  "eslint.alwaysShowStatus": true,

  "[javascript]": {

    "editor.tabSize": 2,

    "editor.formatOnSave": true,

    "editor.defaultFormatter": "esbenp.prettier-vscode",

  },

  "[vue]": {

    "editor.tabSize": 2,

    "editor.defaultFormatter": "esbenp.prettier-vscode",

  },

  

  "[go]": {

    "editor.insertSpaces": true,

    "editor.tabSize": 2,

    "editor.formatOnSave": true,

  },

  

  "git.autofetch": true,

  "git.enableSmartCommit": true,

  "workbench.editor.enablePreviewFromQuickOpen": false,

  "go.formatTool": "goimports",

  //"go.formatTool": "goreturns",

  "go.autocompleteUnimportedPackages": true,

  // "workbench.editor.enablePreview": false

  "files.eol": "\n",

  "go.useLanguageServer": true,

  "editor.tabSize": 2,

  "editor.detectIndentation": false,

}

[/code] 

댓글 0개

등록된 댓글이 없습니다.

Menu