Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Uncaught SyntaxError: Unexpected token } #240

Closed easteregg closed 8 years ago

easteregg commented 8 years ago
  1. Opened my project, Created a new branch
  2. Created a new php class file.
  3. tried Ctrl+alt+n to insert namespace, this error was thrown.

Atom Version: 1.5.4 System: Ubuntu 15.10 Thrown From: atom-autocomplete-php package, v0.18.7

Stack Trace

Uncaught SyntaxError: Unexpected token }

At file:///usr/share/atom/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2Fhome%2Feasteregg%2Fwww%2Fmohsenin%2Fserver%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%7D%5D%2C%22windowInitializationScript%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%2Fsrc%2Finitialize-application-window.js%22%2C%22resourcePath%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22appVersion%22%3A%221.5.4%22%2C%22atomHome%22%3A%22%2Fhome%2Feasteregg%2F.atom%22%2C%22shellLoadTime%22%3A3055%2C%22initialPaths%22%3A%5B%22%2Fhome%2Feasteregg%2Fwww%2Fmohsenin%2Fserver%22%5D%7D:22

SyntaxError: Unexpected token }
    at Object.parse (native)
    at Object.module.exports.readComposer (/home/easteregg/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:112:35)
    at Object.module.exports.composer (/home/easteregg/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:153:17)
    at Object.module.exports.createNamespace (/home/easteregg/.atom/packages/atom-autocomplete-php/lib/services/namespace.coffee:14:29)
    at atom-workspace.atom.commands.add.atom-autocomplete-php:namespace (/home/easteregg/.atom/packages/atom-autocomplete-php/lib/config.coffee:98:23)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:570:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:378:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:28.8.0 git-plus:new-branch (atom-pane.pane.active)
     -0:27.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  4x -0:25.3.0 click (span.name.icon.icon-file-directory)
     -0:16.5.0 tree-view:add-folder (span.name.icon.icon-file-directory)
     -0:15 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:13.2.0 click (span.name.icon.icon-file-directory)
     -0:12.4.0 tree-view:add-file (span.name.icon.icon-file-directory)
  2x -0:05.8.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:03.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:02.4.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -0:02.4.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -0:02.4.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:02.4.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -0:02.4.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
     -0:02.4.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -0:02.1.0 atom-autocomplete-php:namespace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true
  },
  "atom-autocomplete-php": {
    "binComposer": "composer",
    "insertNewlinesForUseStatements": true
  }
}

Installed Packages

# User
Stylus, v3.0.0
atom-autocomplete-php, v0.18.7
chary-tree-view, v0.2.3
color-picker, v2.1.1
docblockr, v0.7.3
emmet, v2.4.2
file-icons, v1.6.18
fonts, v1.2.0
git-plus, v5.13.0
language-blade, v0.20.0
language-vue, v0.9.0
linter, v1.11.3
linter-jscs, v3.4.8
linter-jshint, v2.0.3
linter-php, v1.2.0
php-extract-method, v0.2.1
terminal-plus, v0.14.5
theme-flux, v0.0.3
wakatime, v5.0.8

# Dev
No dev packages

hmm, is it to be here? couldn't insert namespace.

Peekmo commented 8 years ago

Hello,

Probably an error in you PHP file ?