slackhq / vscode-hack

Hack language & HHVM debugger support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pranayagarwal.vscode-hack
MIT License
74 stars 36 forks source link

Autocomplete not working #55

Open SamyOteroGlez opened 5 years ago

SamyOteroGlez commented 5 years ago

Hello,

I recently installed vscode-hack but I can't get the autocomplete working the same way it is shown in the plugging readme. When I right click in the code I can't see the Go to definition option.

I am using:

I tried the configuration for remote development without success. (See below)

    "hack.remote.enabled": true,
    "hack.remote.type": "ssh",
    "hack.remote.ssh.host": "ssh vagrant@127.0.0.1 -p 2222 \"cd /vagrant/webroot && /usr/bin/hh_client\" ",

I also executed succesfully ssh vagrant@127.0.0.1 -p 2222 "cd /vagrant/webroot && /usr/bin/hh_client as recommended.

Looking forward to hearing from you, Cheers,

Sam


ps: Here is my full settings.json:

{
    "window.enableMenuBarMnemonics": false,
    "window.zoomLevel": 0,
    "window.openFilesInNewWindow": "on",

    "workbench.editor.enablePreviewFromQuickOpen": false,
    "workbench.colorTheme": "Darcula Extended",
    "workbench.editor.tabSizing": "shrink",
    "workbench.colorCustomizations" : {
        "terminal.foreground" : "#00A20E",
        "terminal.background" : "#080808"
    },

    "explorer.autoReveal": false,
    "explorer.confirmDelete": false,

    "editor.renderWhitespace": "all",
    "editor.renderIndentGuides": true,
    "editor.renderLineHighlight": "all",
    "editor.largeFileOptimizations": false,
    "editor.suggestSelection": "first",
    "editor.quickSuggestions": {
      "other": true,
      "comments": true,
      "strings": true
    },

    "terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.shellArgs.windows": [
        "/k", "C:\\Users\\Samy\\cmder\\vendor\\init.bat"
    ],

    "files.insertFinalNewline": true,
    "files.trimTrailingWhitespace": true,
    "files.associations": {
      "*.php": "hack"
    } ,

    //check php version
    // "php.validate.executablePath": "vagrant@127.0.0.1 -p 2222 \"cd /usr/bin/php\"",
    // "php.validate.executablePath": "C:\\Users\\Samy\\dev\\php\\php-5.6.40\\php.exe",
    // "php.validate.executablePath": "C:\\Users\\Samy\\dev\\php\\php-7.0.33\\php.exe",
    // "php.suggest.basic": false,
    // "php-docblocker.qualifyClassNames": true,
    // "php-docblocker.returnGap": true,
    // "phpformatter.composer": true,

    // "phpcs.executablePath": "C:\\Users\\Samy\\dev\\php\\phpcs\\phpcs.phar",
    // "phpcs.standard": "PSR2",
    // "phpcs.ignorePatterns": [
    //   "/database/*",
    //   "/tests/*",
    //   "/app/Http/Routes/*",
    // ],

    "hack.remote.enabled": true,
    "hack.remote.type": "ssh",
    "hack.remote.ssh.host": "ssh vagrant@127.0.0.1 -p 2222 \"cd /vagrant/webroot && /usr/bin/hh_client\" ",
    //"hack.remote.workspacePath": "",

    "git.enableSmartCommit": true,
    "git.ignoreLegacyWarning": true,

    "gitlens.codeLens.enabled": false,
    "gitlens.advanced.messages": {
        "suppressGitVersionWarning": true,
        "suppressShowKeyBindingsNotice": true,
        "suppressResultsExplorerNotice": true,
        "suppressWelcomeNotice": true
    },
    "gitlens.keymap": "chorded",
    //"gitlens.historyExplorer.enabled": true,
    "gitlens.hovers.currentLine.over": "line",
    "gitlens.views.fileHistory.enabled": true,
    "gitlens.views.lineHistory.enabled": true,

    "prettier.printWidth": 120,
    "prettier.singleQuote": true,
    "prettier.tabWidth": 4,
    // "[php]": {
    //   "editor.rulers": [120],
    // },
    "[html]": {
      "editor.rulers": [120],
    },
    "[css]": {
      "editor.rulers": [120],
    },
    "[less]": {
      "editor.rulers": [120],
    },
    "[scss]": {
      "editor.rulers": [120],
    },
    "[javascript]": {
      "editor.rulers": [120],
    },

    "projects.refreshIgnoreFolders": [
      "bower_components",
      "node_modules",
      "typings",
      ".vscode",
      ".vagrant",
      ".docker",
      "nbprojects",
    ],
    "projects.viewAllEnabled": true,
    "projects.checkDirty": true,
    "projects.checkPaths": true,

    "breadcrumbs.enabled": true,

    "workbench.iconTheme": "vscode-icons"
}
azjezz commented 5 years ago

this issues is probably related to remote settings, Go to definition works fine on Linux, and MacOS.

i don't have windows, but i think you configurations are wrong.

"hack.remote.enabled": true, "hack.remote.type": "ssh", "hack.remote.ssh.host": "ssh vagrant@127.0.0.1 -p 2222 \"cd /vagrant/webroot && /usr/bin/hh_client\"",

should probably ( not sure ) be :

"hack.remote.enabled": true,
"hack.remote.type": "ssh",
"hack.remote.ssh.host": "vagrant@127.0.0.1",
"hack.remote.workspacePath": "/vagrant/webroot",
"hack.remote.ssh.flags": "-p 2222",

see : https://github.com/slackhq/vscode-hack#remote-development

SamyOteroGlez commented 5 years ago

Thanks!!

I will follow your advice.

Cheers

lexidor commented 5 years ago

@SamyOteroGlez May this issue be closed?