簡體   English   中英

vscode:一段時間后,Express Snippets停止工作

[英]vscode: Express Snippets stop working after a while

奇怪的是以下與Node相關的擴展; 表達片段擴展expressjs4-snippetsNode Snippets在一段時間后停止工作。 我的反應片段很好,但不是這三個。

下面是我的settings.json配置文件:

{
     // //editor fontSize and tabSize configs
     "editor.fontSize": 14,
     "terminal.integrated.fontSize": 14,
     "window.zoomLevel": -1,
     "[Log]": {
         "editor.fontSize": 14
     },

    // Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions. The value 'smart' means only accept a suggestion with Enter when it makes a textual change
    "editor.acceptSuggestionOnEnter": "on",
    "editor.autoIndent": true,
    "editor.emptySelectionClipboard": false,

    "editor.formatOnPaste": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.renderIndentGuides": true,
    "editor.renderWhitespace": "none",
    "editor.renderControlCharacters": false,
    "editor.scrollBeyondLastLine": true,
    "editor.showFoldingControls": "always",
    "editor.showUnused": true,

    // Controls the delay in ms after which quick suggestions will show up.
    "editor.quickSuggestionsDelay": 10,
    // Controls if quick suggestions should show up while typing
    "editor.quickSuggestions": {
        "other": true,
        "comments": false,
        "strings": false
    },
    // Controls if suggestions should automatically show up when typing trigger characters
    "editor.suggestOnTriggerCharacters": true,
    // Controls if pressing tab inserts the best suggestion and if tab cycles through other suggestions
    "editor.tabCompletion": "on",
    "editor.trimAutoWhitespace": false,
    "editor.wordWrap": "on",
    // Controls whether sorting favours words that appear close to the cursor
    "editor.suggest.localityBonus": true,
    "editor.wordBasedSuggestions": true,

    // Tab config
    // The number of spaces a tab is equal to. This setting is overridden
    // based on the file contents when `editor.detectIndentation` is true.
    "editor.tabSize": 2,
    // Insert spaces when pressing Tab. This setting is overriden
    // based on the file contents when `editor.detectIndentation` is true.
    "editor.insertSpaces": true,
    // When opening a file, `editor.tabSize` and `editor.insertSpaces`
    // will be detected based on the file contents. Set to false to keep
    // the values you've explicitly set, above.
    "editor.detectIndentation": false,
    // emmet
    // When enabled, Emmet abbreviations are expanded when pressing TAB.
    "emmet.triggerExpansionOnTab": true,
    "emmet.syntaxProfiles": {
        "javascript": "jsx",
        "xml": {
            "attr_quotes": "single"
        }
    },
    "emmet.includeLanguages": {
        "javascript": "javascriptreact"
    },


    // Enable ESLint (with Prettier plugin) to format code on save
    "eslint.alwaysShowStatus": true,
    "eslint.autoFixOnSave": true,
    "eslint.enable": true,
    "eslint.nodePath": "/Users/antonio-pavicevac-ortiz/.nvm/versions/node/v9.0.0/bin/eslint",
    "files.autoSave": "onFocusChange",
    "files.hotExit": "off",
    "files.trimTrailingWhitespace": true,
    "files.insertFinalNewline": true,
    "files.associations": {
      "*.js": "javascriptreact",
      ".gitignore": "shellscript"
    },
    // Disable default VSCode formatting for JavaScript
    "[javascript]": {
      "editor.formatOnSave": false
    },
    "javascript.validate.enable": true, // this controls having your unused imports or variables to appear grey
    "html.format.enable": true,
    "html-css-class-completion.enableEmmetSupport": true,
    // //php settings
    "php.executablePath": "/usr/bin/php",
    "prettier.disableLanguages": [
      "javascript",
      "javascriptreact",
      "json"
    ],


    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "workbench.colorTheme": "Night Owl",
    "sync.gist": "8e227eee246912533620000ceb348981" 
}

任何幫助,將不勝感激!

UPDATE

不是真正的更新,而是我發現讓他們暫時工作的方法;

我實際上退出了vs代碼,然后轉到(在MacOS Mojave版本10.14.3上) 主文件夾>庫>應用程序支持>代碼並刪除該文件夾。 它基本上會在啟動時重新生成。

CODE文件夾包含USER文件夾。 在該文件夾中是keybindings.jsonsettings.json文件,其中一個文件覆蓋擴展的默認值和調整首選項。

在我的情況下,因為我正在使用設置同步 (它允許將擴展和設置保存在github上的要點中,由多台計算機和團隊共享!!!)所以將所有內容都歸還還不算太糟糕。

所以我再次像上面提到的那樣破壞了所有內容,但是這一次在我的settings.json中我決定重新輸入每個設置以查看是否有人插入這些插件。 原來是一個!

罪魁禍首是:

 "files.associations": { // breaks node, express auto completes
   "*.js": "javascriptreact",
   ".gitignore": "shellscript"
 },

顯然它是"*.js": "javascriptreact",但我必須深入研究為什么?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM