Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete not working #55

Open
SamyOteroGlez opened this issue Apr 5, 2019 · 3 comments
Open

Autocomplete not working #55

SamyOteroGlez opened this issue Apr 5, 2019 · 3 comments

Comments

@SamyOteroGlez
Copy link

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:

  • windows 10 (sadly)
  • vscode 1.33.0
  • hhvm 3.24.8
  • hh_client 3.24.8
  • web server nginx
  • and everything is running in vagrant

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

    "hack.remote.enabled": true,
    "hack.remote.type": "ssh",
    "hack.remote.ssh.host": "ssh [email protected] -p 2222 \"cd /vagrant/webroot && /usr/bin/hh_client\" ",

I also executed succesfully ssh [email protected] -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": "[email protected] -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 [email protected] -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
Copy link
Contributor

azjezz commented Apr 5, 2019

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 [email protected] -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": "[email protected]",
"hack.remote.workspacePath": "/vagrant/webroot",
"hack.remote.ssh.flags": "-p 2222",

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

@SamyOteroGlez
Copy link
Author

Thanks!!

I will follow your advice.

Cheers

@lexidor
Copy link
Contributor

lexidor commented May 26, 2019

@SamyOteroGlez May this issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants