Code Monkey home page Code Monkey logo

symbols-view's Introduction

Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement

Symbols View package

macOS Build Status Windows Build Status Dependency Status

Display the list of functions/methods in the editor.

If your project has a tags/.tags/TAGS/.TAGS file at the root then following are supported:

Command Description Keybinding (Linux) Keybinding (macOS) Keybinding (Windows)
symbols-view:toggle-file-symbols Show all symbols in current file ctrl-r cmd-r ctrl-r
symbols-view:toggle-project-symbols Show all symbols in the project ctrl-shift-r cmd-shift-r ctrl-shift-r
symbols-view:go-to-declaration Jump to the symbol under the cursor ctrl-alt-down cmd-alt-down
symbols-view:return-from-declaration Return from the jump ctrl-alt-up cmd-alt-up

This package uses ctags.

symbols-view's People

Contributors

50wliu avatar as-cii avatar binarymuse avatar bronson avatar damieng avatar darangi avatar izuzak avatar jasonrudolph avatar joefitzgerald avatar joshaber avatar kevinnathan avatar kevinsawicki avatar kuychaco avatar lee-dohm avatar lkashef avatar maxbrunsfeld avatar mcolyer avatar mislav avatar mnquintana avatar philcoggins avatar rzhw avatar segevfiner avatar superlou avatar thedaniel avatar thomasjo avatar torn4dom4n avatar xndcn avatar ylansegal avatar zcbenz avatar zmb3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

symbols-view's Issues

Symbols not recognized below certain regex pattern in JS

The symbols plugin seems to choke when it sees a regex pattern like /\//

It doesn't recognize and symbols below the pattern, including the containing function.

var a = function() {}
var b = function() {
    var name = 'hel/lo'.replace(/\//, '_');
}
var c = function() {}

In this case, the symbols plugin only recognizes a, but not b or c.

Uncaught TypeError: Cannot read property 'length' of undefined

[Enter steps to reproduce below:]

1.Press Ctrl + R
2. Type a few keys
3. try and get rid of the dialog to search
4. hangs up for 5 seconds than the error shows up so I can report it

Atom Version: 0.174.0
System: Microsoft Windows 8.1 Pro
Thrown From: symbols-view package, v0.79.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of undefined

At c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\text-buffer\lib\text-buffer.js:391

TypeError: Cannot read property 'length' of undefined
  at TextBuffer.module.exports.TextBuffer.lineLengthForRow (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\text-buffer\lib\text-buffer.js:391:29)
  at TextBuffer.module.exports.TextBuffer.clipPosition (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\text-buffer\lib\text-buffer.js:943:53)
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\src\display-buffer.js:1009:27)
  at DisplayBuffer.module.exports.DisplayBuffer.scrollToBufferPosition (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\src\display-buffer.js:661:47)
  at TextEditor.module.exports.TextEditor.scrollToBufferPosition (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\src\text-editor.js:2670:33)
  at FileView.module.exports.SymbolsView.moveToPosition (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\symbols-view\lib\symbols-view.js:128:16)
  at FileView.module.exports.SymbolsView.openTag (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\symbols-view\lib\symbols-view.js:117:14)
  at FileView.module.exports.SymbolsView.confirmed (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\symbols-view\lib\symbols-view.js:92:21)
  at FileView.module.exports.SelectListView.confirmSelection (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\archive-view\node_modules\atom-space-pen-views\lib\select-list-view.js:335:21)
  at space-pen-li.<anonymous> (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\archive-view\node_modules\atom-space-pen-views\lib\select-list-view.js:139:19)
  at HTMLOListElement.jQuery.event.dispatch (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\archive-view\node_modules\atom-space-pen-views\node_modules\space-pen\vendor\jquery.js:4676:9)
  at HTMLOListElement.elemData.handle (c:\Users\Rafi\AppData\Local\atom\app-0.174.0\resources\app\node_modules\archive-view\node_modules\atom-space-pen-views\node_modules\space-pen\vendor\jquery.js:4360:46)

Commands

     -0:16.4 settings-view:open (atom-text-editor.editor.is-focused)
  2x -0:00.0 symbols-view:toggle-file-symbols (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
No installed packages

# Dev
No dev packages

/cc @atom/core

Comparisson with atom-ctags package

Hi,

I have been playing a bit with symbols-view and atom-ctags and it seems to me that ctags is easier to use and provide more functionality. I am right now writing series of articles about Atom and I am thinking about which one to recomend. I am curious about what advantages/dissadvantges does symbols-view have and are you planning on collaboration with atom-ctags package?

symbol access through global api

I was thinking about a feature that would let you step back and forth between symbols in a file (for example alt-down to locate the cursor to the next possible symbol). Currently, FileView is responsible for generating and caching all symbols for a file. I was wondering if it was possible to refactor this logic out of that class and make it available through a global api, so one could access symbols of a file independently.

Maximum list items for ProjectView and SymbolsView should be configurable

In V8, when searching for a symbol which is defined differently for different architectures, thus a symbol is found many times --- Unfortunately, with the default maximum items count of 10, the version for the architecture I'm working on is typically not available.

Ideally, it would be good if the items list preferred items in directories similar to the one being edited currently, so that nearby symbol declarations were preferred, but having a configurable maximum list items also works around it.

As it stands, I'm manually patching the source code just to make it more usable for V8 hacking, but that's not really ideal

Feature request: Quick focus symbols when selected

I'd like command+r (go to function) to instantly show the function as I highlight it in the list without having to hit enter. If I hit escape, I want it to leave me where I was. This is great for quickly looking at a function definition in the same file without actually navigating there.

go_to does not recognize bang methods

As a ruby developer using Atom
When my cursor is positioned over a bang method (e.g. deactivate!)
And I attempt to go to declaration
Then it should take me to the correct method
And ignore all other methods.

Currently, go to declaration ignores the exclamation point and will go to a non-bang method of the same name.

I will look into opening a PR on this by the end of next week, if anyone has any ideas on how to fix this, I am open to hearing it.

Use Syntax instead of ctags?

I believe it would be not be too difficult to generate the tags from the atom/textmate syntax files themselves which has a lot of benefits:

  1. Every file type that has a syntax could now have symbols generated automatically. The ctags project is never going to be able to keep up with all of the great new syntaxes as Atom grows.
  2. Hacking ctags is much more difficult than atom packages, further impeding improvements.
  3. Performance for Toggle File Symbols should be better since open files are already being tokenized.
  4. This would eliminate an entire dependency that requires special handling on Windows, etc. Grammars, first-mate, etc. are already part of the project.
  5. Less fragile since it would be using other Atom syntax settings and code. (For example, the mapping from syntax to ctags file types bug would not have happened if the actual syntax was being used.)

I performed some initial testing using grammar.tokenizeLines and scanning the results for items like meta.function and it seems to work well. (Well, coffee script cuts off the last letter of a function name and makes a separate function from it, but that is easy to work around until it is fixed in first-mate.)

File Symbols does not work on 32-bit systems

I have my tags file in the root of my project and can bring up the project symbol list which works fine. When I try to bring up the file symbol list, there is nothing in the list. There is nothing showing up in the console so I'm not quite sure where to dig next.

Running atom v0.175 on Ubuntu 12.04.

Update: I did a clean install on a different machine (Fedora 20) and everything is working fine. I suspect my install may just be buggered. I will start with a fresh install on the Ubuntu machine and see if that clears things up.

Update2: I reinstalled node v0.10.35, cleared out my .atom and .npm folders, and rebuilt atom v0.176.0. I'm still having the same issue on Ubuntu 12.04.

Not working on Windows and Uncaught NotFoundError

I am running 1.50.0 and 0.68.0 on Windows 7 64Bit.

Issue 1:
ctrl + r is always showing as empty on Windows.

Issues 2:
If you hit ctrl + r twice in a row it create an Uncaught NotFoundError.

Uncaught NotFoundError: Failed to execute 'appendChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler? 

Atom.0.150.0\tools\Atom\resources\app\node_modules\space-pen\vendor\jquery.js:5830

Go to declaration has incorrect line numbers

When pressing cmd-R (then typing mark_task_), I see this:

image

Notice there are 3 implementations of mark_task_complete in 3 different classes.

But when I use go to declaration, it lists the same line number three times. Pressing cmd-opt-downarrow on top of a reference to mark_task_complete gives:

image

Interestingly, pressing shift-cmd-R shows a slightly different view that makes no attempt to show line numbers:

image

In the latter two cases, despite showing 3 entries, picking one always takes me to line 964. It seems to be impossible to get it to take me to the other two definitions.

Failed at the [email protected] install script

When trying to update from 0.38.0 to (currently) 0.40.0 I says "Installing …" for quite a few minutes and then fails with the following error:

> [email protected] install /private/var/folders/7b/42g6fdws1mxg6fykvvsn24lr0000gn/T/apm-install-dir-114128-541-1bwsgxo/node_modules/symbols-view/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild


npm http GET https://registry.npmjs.org/ctags
npm http GET https://registry.npmjs.org/pathwatcher/0.16.0
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/humanize-plus/1.4.2
npm http GET https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/ctags
npm http GET https://registry.npmjs.org/humanize-plus/1.4.2
npm http GET https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/pathwatcher/0.16.0
npm http GET https://registry.npmjs.org/pathwatcher/0.16.0
npm http GET https://registry.npmjs.org/humanize-plus/1.4.2
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/ctags
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/nan/0.8.0
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/event-stream
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/runas
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/nan/0.8.0
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/event-stream
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/runas
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/nan/0.8.0
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/event-stream
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/nan/0.8.0
/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/npm/bin/node-gyp-bin/node-gyp: line 2: node: command not found
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/property-accessors
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "/Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper" "/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--userconfig" "/Applications/Atom.app/Contents/Resources/app/node_modules/atom-package-manager/.apmrc" "install" "/var/folders/7b/42g6fdws1mxg6fykvvsn24lr0000gn/T/d-114128-541-1jgl72s/package.tgz" "--target=0.11.10" "--arch=x64"
npm ERR! cwd /private/var/folders/7b/42g6fdws1mxg6fykvvsn24lr0000gn/T/apm-install-dir-114128-541-1bwsgxo
npm ERR! node -v v0.11.10
npm ERR! npm -v 1.3.18
npm ERR! code ELIFECYCLE
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/property-accessors
npm http 304 https://registry.npmjs.org/property-accessors
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/mixto
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/7b/42g6fdws1mxg6fykvvsn24lr0000gn/T/apm-install-dir-114128-541-1bwsgxo/npm-debug.log
npm ERR! not ok code 0

Uncaught Error: Cannot find module './.ctags'

This happens when navigating to:
Packages -> Symbols -> File Symbols

Atom Version: 0.165.0
System: Microsoft Windows 8.1
Thrown From: symbols-view package, v0.70.0

Stack Trace

Uncaught Error: Cannot find module './.ctags'

At module.js:346

Error: Cannot find module './.ctags'
  at Module._resolveFilename (module.js:344:15)
  at Function.Module._resolveFilename (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\src\module-cache.js:380:52)
  at Function.require.resolve (module.js:396:19)
  at TagGenerator.module.exports.TagGenerator.generate (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\tag-generator.js:89:34)
  at FileView.module.exports.FileView.generateTags (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\file-view.js:100:62)
  at FileView.module.exports.FileView.populate (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\file-view.js:95:21)
  at FileView.module.exports.FileView.toggle (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\file-view.js:72:14)
  at atom-text-editor.editorSubscription.atom.commands.add.symbols-view:toggle-file-symbols (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\main.js:21:43)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\src\command-registry.js:243:29)
  at CommandRegistry.handleCommandEvent (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\src\command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\src\command-registry.js:156:19)
  at Ipc.<anonymous> (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\app\src\window-event-handler.js:65:30)
  at Ipc.emit (events.js:107:17)
  at process.<anonymous> (c:\Users\user\AppData\Local\atom\app-0.165.0\resources\atom\renderer\api\lib\ipc.js:22:29)
  at process.emit (events.js:110:17)

Commands

 12x -1:23.8 core:backspace (input.hidden-input)
     -0:00.0 symbols-view:toggle-file-symbols (input.hidden-input)

Config

{
  "core": {
    "disabledPackages": [
      "helium",
      "ide-haskell"
    ]
  }
}

Installed Packages

# User
No installed packages

# Dev
No dev packages

/cc @atom/core

Add service-hub Based API For Symbols Providers

@maxbrunsfeld won't find it surprising that I would want to add this, but I have an outstanding pull request in go-plus to add support for godef to the package. godef provides the location of the definition of the item at a buffer position for .go files.

I have a ton of experience implementing an API like this for autocomplete-plus, but that wasn't a core package, so I'm mostly looking for a green flag to proceed in creating a pull request with this functionality so the responsibility for triggering go to definition isn't in go-plus, but rather in symbols-view, and so symbols-view can determine the correct provider for the current scope of the current cursor.

@maxbrunsfeld Could be an opportunity to test out the config-based approach for service-hub service definition also, depending on your timelines for that.

Cannot interact or use .select-list overlay

I can open the .goto-view.select-list.overlay, which accurately indexes and displays the symbols in the current file (tested recently in JS and PHP). However, I cannot interact with the select-list in any way (other than to scroll it with a trackpad gesture) without it immediately being removed from the DOM. This includes clicking on a symbol from the list, using the arrow keys, pressing return, etc.

I also tried alt while the select-list was opened, which caused the editor to hang and eventually show the editor not responding dialog box.

I’m using Symbols View 0.66.0/Atom 0.136.0 on Mac OS 10.9.5

Failed to update

Version 0.115.0
MacOs 10.9.4

Updating to “[email protected]” failed.Hide output…

> [email protected] install /private/var/folders/_f/1xw_5zl14_99hzcv72sgs2sr0000gn/T/apm-install-dir-114618-61566-1bj521/node_modules/symbols-view/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild

  CXX(target) Release/obj.target/runas/src/main.o

> [email protected] install /private/var/folders/_f/1xw_5zl14_99hzcv72sgs2sr0000gn/T/apm-install-dir-114618-61566-1bj521/node_modules/symbols-view/node_modules/ctags
> node-gyp rebuild


npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/humanize-plus/1.4.2
npm http GET https://registry.npmjs.org/ctags
npm http GET https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/ctags
npm http 304 https://registry.npmjs.org/fs-plus
npm http 304 https://registry.npmjs.org/temp
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/humanize-plus/1.4.2
npm http 304 https://registry.npmjs.org/pathwatcher
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/nan/1.2.0
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/event-stream
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/osenv/0.0.3
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/underscore-plus
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/event-stream
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/underscore-plus
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/nan/1.2.0
npm http 304 https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/underscore
In file included from ../src/main.cc:1:
../../nan/nan.h:342:74: error: too many arguments to function call, expected at most 3, have 4
    return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
           ~~~~~~~~~~~~~~~~~~                                            ^~~~
/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:3550:3: note: 'New' declared here
  static Local<Signature> New(Handle<FunctionTemplate> receiver =
  ^
In file included from ../src/main.cc:1:
../../nan/nan.h:370:27: error: cannot initialize a parameter of type 'int' with an rvalue of type 'v8::Isolate *'
    return v8::Array::New(v8::Isolate::GetCurrent());
                          ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:2307:31: note: passing argument to parameter 'length' here
  static Local<Array> New(int length = 0);
                              ^
In file included from ../src/main.cc:1:
../../nan/nan.h:375:54: error: too many arguments to function call, expected at most single argument 'length', have 2 arguments
    return v8::Array::New(v8::Isolate::GetCurrent(), length);
           ~~~~~~~~~~~~~~                            ^~~~~~
/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:2307:3: note: 'New' declared here
  static Local<Array> New(int length = 0);
  ^
In file included from ../src/main.cc:1:
../../nan/nan.h:380:53: error: too many arguments to function call, expected single argument 'time', have 2 arguments
    return v8::Date::New(v8::Isolate::GetCurrent(), time).As<v8::Date>();
           ~~~~~~~~~~~~~                            ^~~~
/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:2831:3: note: 'New' declared here
  static Local<Value> New(double time);
  ^
In file included from ../src/main.cc:1:
../../nan/nan.h:380:70: error: expected '(' for function-style cast or type construction
    return v8::Date::New(v8::Isolate::GetCurrent(), time).As<v8::Date>();
                                                             ~~~~~~~~^
../../nan/nan.h:380:72: error: expected expression
    return v8::Date::New(v8::Isolate::GetCurrent(), time).As<v8::Date>();
                                                                       ^
../../nan/nan.h:385:53: error: too many arguments to function call, expected single argument 'time', have 2 arguments
    return v8::Date::New(v8::Isolate::GetCurrent(), time).As<v8::Date>();
           ~~~~~~~~~~~~~                            ^~~~
/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:2831:3: note: 'New' declared here
  static Local<Value> New(double time);
  ^
In file included from ../src/main.cc:1:
../../nan/nan.h:385:70: error: expected '(' for function-style cast or type construction
    return v8::Date::New(v8::Isolate::GetCurrent(), time).As<v8::Date>();
                                                             ~~~~~~~~^
../../nan/nan.h:385:72: error: expected expression
    return v8::Date::New(v8::Isolate::GetCurrent(), time).As<v8::Date>();
                                                                       ^
../../nan/nan.h:388:15: error: no type named 'UnboundScript' in namespace 'v8'
  typedef v8::UnboundScript NanUnboundScript;
          ~~~~^
../../nan/nan.h:396:9: error: no member named 'ScriptCompiler' in namespace 'v8'
    v8::ScriptCompiler::Source source(s, origin);
    ~~~~^
../../nan/nan.h:397:16: error: no member named 'ScriptCompiler' in namespace 'v8'
    return v8::ScriptCompiler::CompileUnbound(
           ~~~~^
../../nan/nan.h:398:37: error: use of undeclared identifier 'source'; did you mean 'v8::Extension::source'?
        v8::Isolate::GetCurrent(), &source);
                                    ^~~~~~
                                    v8::Extension::source
/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:3677:46: note: 'v8::Extension::source' declared here
  const String::ExternalAsciiStringResource* source() const {
                                             ^
In file included from ../src/main.cc:1:
../../nan/nan.h:398:36: error: must explicitly qualify name of member function when taking its address
        v8::Isolate::GetCurrent(), &source);
                                   ^~~~~~~
                                    Extension::
../../nan/nan.h:405:9: error: no member named 'ScriptCompiler' in namespace 'v8'
    v8::ScriptCompiler::Source source(s);
    ~~~~^
../../nan/nan.h:406:16: error: no member named 'ScriptCompiler' in namespace 'v8'
    return v8::ScriptCompiler::CompileUnbound(
           ~~~~^
../../nan/nan.h:407:37: error: use of undeclared identifier 'source'; did you mean 'v8::Extension::source'?
        v8::Isolate::GetCurrent(), &source);
                                    ^~~~~~
                                    v8::Extension::source
/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:3677:46: note: 'v8::Extension::source' declared here
  const String::ExternalAsciiStringResource* source() const {
                                             ^
In file included from ../src/main.cc:1:
../../nan/nan.h:407:36: error: must explicitly qualify name of member function when taking its address
        v8::Isolate::GetCurrent(), &source);
                                   ^~~~~~~
                                    Extension::
../../nan/nan.h:432:36: error: too many arguments to function call, expected single argument 'value', have 2 arguments
        v8::Isolate::GetCurrent(), val).As<v8::NumberObject>();
                                   ^~~

/Users/xMac/.atom/.node-gyp/.node-gyp/0.11.10/deps/v8/include/v8.h:2869:3: note: 'New' declared here
  static Local<Value> New(double value);
  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/runas/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/_f/1xw_5zl14_99hzcv72sgs2sr0000gn/T/apm-install-dir-114618-61566-1bj521/node_modules/symbols-view/node_modules/pathwatcher/node_modules/runas
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http GET https://registry.npmjs.org/property-accessors
npm http GET https://registry.npmjs.org/mixto
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/through
npm http GET https://registry.npmjs.org/from
npm http GET https://registry.npmjs.org/duplexer
npm http GET https://registry.npmjs.org/stream-combiner
npm http GET https://registry.npmjs.org/split
npm http GET https://registry.npmjs.org/map-stream
npm http GET https://registry.npmjs.org/pause-stream/0.0.11
npm http 304 https://registry.npmjs.org/mixto
npm http 304 https://registry.npmjs.org/through
npm http 304 https://registry.npmjs.org/duplexer
npm http 304 https://registry.npmjs.org/stream-combiner
npm http 304 https://registry.npmjs.org/from
npm http 304 https://registry.npmjs.org/property-accessors
npm http 304 https://registry.npmjs.org/pause-stream/0.0.11
npm http 304 https://registry.npmjs.org/map-stream
npm http 304 https://registry.npmjs.org/split


node.js:811
    var cwd = process.cwd();
                      ^
Error: ENOENT, no such file or directory
    at Function.startup.resolveArgv0 (node.js:811:23)
    at startup (node.js:58:13)
    at node.js:902:3
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/.apmrc" "--userconfig" "/Users/xMac/.atom/.apmrc" "install" "/Users/xMac/.atom/.node-gyp/.atom/.apm/symbols-view/1.0.0/package.tgz" "--target=0.11.10" "--arch=x64"
npm ERR! cwd /private/var/folders/_f/1xw_5zl14_99hzcv72sgs2sr0000gn/T/apm-install-dir-114618-61566-1bj521
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/_f/1xw_5zl14_99hzcv72sgs2sr0000gn/T/apm-install-dir-114618-61566-1bj521/npm-debug.log
npm ERR! not ok code 0

gypnpm ERR! [email protected] install: `node-gyp rebuild

How to fix this:
'''
gypnpm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_
modules\npm\bin\npm-cli.js" "--userconfig=c:\Users\vincent\atom-master.npmrc" "ins
tall" "--quiet"
npm ERR! cwd c:\Users\vincent\atom-master\build
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
gypnpm
'''

Doesn't parse certain function expressions

Related: #39, #8

When you define a function expression inside an anonymous function which is passed to another function, and the function expression is namespaced to a one-letter object (so it's technically a method), it's not recognized.

Running Atom 0.156, symbols-view 0.70, on Win 7

Refer below (func0 is not recognized):

define(function () {

    function f () {} // ok
    m.func0   = function () {}; // not parsed !
    m1.func1  = function () {}; // two-letter namespace → ok
    z.m.func2 = function () {}; // ok
});

function func () { // ok
    m.func3 = function () {}; // ok
}

(function () {
    m.func4 = function () {}; // ok
})();

m.func5 = function () {}; // ok

Uncaught Error: Cannot find module './.ctags'

I installed the latest version of atom from atom.io (0.165.0). I opened it for the first time and tried pressing the CTRL+R hotkey. The program locked up for a little while then spawned the following error:

Uncaught Error: Cannot find module './.ctags'
module.js:346

Error: Cannot find module './.ctags'
  at Module._resolveFilename (module.js:344:15)
  at Function.Module._resolveFilename (\AppData\Local\atom\app-0.165.0\resources\app\src\module-cache.js:380:52)
  at Function.require.resolve (module.js:396:19)
  at TagGenerator.module.exports.TagGenerator.generate (\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\tag-generator.js:89:34)
  at FileView.module.exports.FileView.generateTags (\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\file-view.js:100:62)
  at FileView.module.exports.FileView.populate (\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\file-view.js:95:21)
  at FileView.module.exports.FileView.toggle (\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\file-view.js:72:14)
  at atom-text-editor.editorSubscription.atom.commands.add.symbols-view:toggle-file-symbols (\AppData\Local\atom\app-0.165.0\resources\app\node_modules\symbols-view\lib\main.js:21:43)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (\AppData\Local\atom\app-0.165.0\resources\app\src\command-registry.js:243:29)
  at \AppData\Local\atom\app-0.165.0\resources\app\src\command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (\AppData\Local\atom\app-0.165.0\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (\AppData\Local\atom\app-0.165.0\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (\AppData\Local\atom\app-0.165.0\resources\app\src\window-event-handler.js:167:20)

Interestingly enough, the button to create a new issue goes to http://git.io/BT-hJA , which is a 404 error. I don't know who I should report that one to.

cmd+shift+r -> symbols-view.js:88

executing a cmd+shift+r on PHP code I get the following error

Uncaught TypeError: Cannot call method 'getCursorBufferPosition' of undefined /Applications/Atom.app/Contents/Resources/app/node_modules/symbols-view/lib/symbols-view.js:88

Auto-scroll to Symbol

When navigating through symbols in the dialog, would be nice if the page could automatically scroll to the currently selected symbol.

Cache tags for open buffers

Currently the tags are generated each time the view is open which can cause a loading delay for large files.

Tags should be cached instead for all open buffers and only invalidated when the buffer changes.

Doesn't handle method definitions in javascript

Command + R doesn't show these method definitions, where SublimeText does.

$(function() {
  "use strict";

  app.ColorList = Backbone.Collection.extend({
    model: app.Color,

    /**
     * add a new color object to the Colors collection
     */
    addFromHex: function(hex, index) {
      var c = Color(hex);
      index ? this.add({color: c, at: index}) : this.add({color: c});
    }
  });
});

Doesn't show namespacing for certain methods (assigned to 2+ letter objects)

Methods assigned to 2+ letter objects are listed as not namespaced, see below:

symbol-view-namespacing

Generated from following code:

// named function
function x () {
    m.func1       = function () {}; // => m.func1 -- correct
    someObj.func1 = function () {}; // => func1 -- incorrect
}

// anon function
function () {
    m.func2       = function () {}; // => m.func2 -- correct
    someObj.func2 = function () {}; // => func2 -- incorrect
}

// IIFE
(function () {
    m.func3       = function () {}; // => func3 -- incorrect
    someObj.func3 = function () {}; // => func3 -- incorrect
})();

// global
m.func4 = function () {}; // => m.func4 -- correct
someObj.func4 = function () {} //  => func4 -- incorrect

If this is a desired behavior (hardly), it behaves inconsistently since even m.func3 (defined inside IIFE) is displayed as func3.

Deeply nested methods (e.g. a.b.someMethod) are not correctly displayed, either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.