atom / symbols-view

Jump to symbols in Atom
MIT License
164 stars 114 forks source link

goto declaration doesn't work #159

Open dragonxlwang opened 8 years ago

dragonxlwang commented 8 years ago

I can see symbols:

image

But goto declaration doesn't work at all..

I have tried to add tag files at project root, my home folder, or where the current file resides but none of them work...

image

houmie commented 8 years ago

I experience the exact same issue. What a shame, could have been a very useful feature.

Wardevour commented 8 years ago

I am also experiencing this issue. Nothing happens when I click "Go to Declaration". This happens with a project open or if the function is declared on the same page. I'm running Atom 1.6.0 on Ubuntu Linux 14.04 3.16.0-67-generic.

Where can I find logs? Usually I open the program from the terminal and observe stdout but the atom command seems to open a separate process.

jiapei100 commented 8 years ago

Me too... Go to Declaration doesn't work for me... Ubuntu 16.02 Beta, with gcc-5.3.1

Lucciniolo commented 8 years ago

me too ... on PHP Mac 10.11.5

thehans commented 8 years ago

I'm having the same issue. I have a .tags file in my project root generated by symbol-gen package.

I click go to declaration and nothing happens usually.

On some of the things I tried, a menu drops down with some options showing file, line#,col# but clicking them does not navigate anywhere.

nzager commented 8 years ago

+1 Atom v1.7.4 Python 2.7 Windows 8.1

ErikBean commented 8 years ago

I was able to fix this by generating .tags file using symbol-gen package See discussion here: https://discuss.atom.io/t/is-there-a-simple-go-to-definition/11809/2

gilad905 commented 7 years ago

+1 Atom 1.11.1 on Javascript Windows 7

kaabsimas commented 7 years ago

+1 Atom 1.12.4 PHP 7 Linux Fedora 24

epineda commented 7 years ago

+1 Atom 1.12.7 on Python Windows 10

dstamou commented 7 years ago

+1 Atom 1.16.0 on PHP5 / PHP7 Mac 10.12.4

amillermsme commented 7 years ago

+1 Atom 1.19.4 x64 on C/Arduino Windows 10

9joshua commented 6 years ago

Same here... Atom 1.23.1 PHP 5&7 Ubuntu 16.04

jk171505 commented 6 years ago

wow, a 1.5 year without a fix... nice!

Eminanza commented 6 years ago

Same here. I already tried several solutions regarding tags but nothing solves the problem. When I use the "Go to declaration" option, nothing happens.

I just found the goto-definition package which works well with javascript but it would also be nice to make it work for CSS classes (CSS, SCSS, SASS, LESS,...)

So far, still no solution.

xinthose commented 6 years ago

+1 1.24.0 x64 on C++ Ubuntu 16.04 LTS

shanethmoore commented 6 years ago

+1 1.24.0 x64 on Ruby Mac osx 10.13.3

dgotrik commented 6 years ago

+1 1.21.0 x64 on Javascript Ubuntu 16.04 LTS

szmerd commented 6 years ago

still not working 1.25.1

der-ali commented 6 years ago

me too python 2.7.12 Atom 1.22.1 ubuntu 16.04

9joshua commented 6 years ago

please fix

ghost commented 6 years ago

Still not working in 1.26.1. Shortcut / Ctrl + Click on method is most useful for development...

panosangelopoulos commented 6 years ago

Not working for me too. Atom 1.27.2 mac os 10.13.5 python 3.6.5

jessexknight commented 6 years ago

+1 atom 1.27.1 x64 ubuntu 16.04 python 2.7.12


the solution by @ErikBean allows me to "Go to Declaration" using the right-click context menu, after "Packages > Symbols > Generate for Project". However, I am unable to:

It also seems I need to open the .tags file generated by "Generate (Symbols) for Project" before I can use right-click "Go to Declaration".

fpsantos86 commented 6 years ago

Click on the name of object or class that you want to see and press the "F12" key. As well as in the Visual Studio..

Works with me.

I have also discovered that the package [hyperclick] works too. With it you will be able to hold the [Ctrl] key and click over the name of class or reference.

See the example: https://atom.io/packages/hyperclick

Acriss commented 6 years ago

I have no idea if it's a recent fix or not, but I remember complaining about this issue. Just checked @fpsantos86 comment and using F12 also works for me.

begin29 commented 6 years ago

It was working for me because I used ctags for vim. Then accidentally delete .ctags file and it stop working. that package can help to generate ctags file https://atom.io/packages/symbol-gen

Thanks @ErikBean for reference

abgordon commented 5 years ago

I stopped using atom because of this issue

9joshua commented 5 years ago

I stopped using atom because of this issue

I am about to do the same.

begin29 commented 5 years ago

@abgordon, @discon-nected maybe just needs to add plugin that generates ctags or something similar automatically after file change or add new one. I totally back to vim and use similar solution there, but it also should work in atom

9joshua commented 5 years ago

I tried symbol-gen and it created a large .tags file for the project but still no dice with Go to Declaration

damianobarbati commented 5 years ago

@discon-nected @abgordon I just stopped using atom because of this: more than 1 year without "go to definition" was insane, luckily vs code handle this perfectly

guiglass commented 4 years ago

I just switched from VS to Atom for a Unity project, but if Atom doesn't have "go to definition" functionality then it's just a waste of effort IMO...

Please add "go to definition" feature so Atom can finally be superior to VS.

jamvar commented 4 years ago

+1 1.40.1 x64 on Ruby macOS 10.14.6

sogaiu commented 4 years ago

Atom 1.40.1 Manjaro Linux Clojure (custom-generated tags file)

Go to declaration didn't work for me initially, but after trying various things (not helpful I know) and restarting, things started to work.

When it works, it is via:

(I have yet to see it work via F12.) Once it stops working, I haven't seen it recover during the same "session".

However, restarting seems to do the trick.

(It would be nice to be able to see some sort of verbose output from Atom to get an idea if there is some error or warning somewhere...I keep encountering silent failures without a clue even in the devtools console. Anyone have any tips regarding getting better feedback from Atom?)

jhack-jos commented 4 years ago

+1 atom 1.41.0 x64 Windows 10 JavaScript ES6

The CTRL+R keybinding works, but:

For anyone doing anything more than petty projects this is a serious issue. I tried installing all kind of packages and none does the job (atom-ternjs; symbol-gen; auto-ctag; etc.).

houmie commented 4 years ago

Guys,

They haven’t fixed the issues for several years. No one is going to fix this.

Let’s face it. Atom is dead. Everyone moved on to Visual Studio Code.

On Mon, 25 Nov 2019 at 12:57, jhack-jos notifications@github.com wrote:

+1 atom 1.41.0 x64 Windows 10 JavaScript ES6

The CTRL+R keybinding works, but:

  • the context menu "Go To Declaration" does not do anything.
  • "Symbols View: Go To Declaration" via the command palette does not do anything.

For anyone doing anything more than petty projects this is a serious issue. I tried installing all kind of packages and none does the job (atom-ternjs; symbol-gen; auto-ctag; etc.).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atom/symbols-view/issues/159?email_source=notifications&email_token=AAN7PZMX4VOSLRHEIXZUHALQVPDTXA5CNFSM4B6RJRSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFCJQLQ#issuecomment-558143534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN7PZPPJFAI5DPORDAKOKLQVPDTXANCNFSM4B6RJRSA .

sogaiu commented 4 years ago

Looks like there is some potentially promising work here:

https://atom-ide-community.github.io/

Specifically, this bit:

https://github.com/atom-ide-community/atom-ide-definitions

Found via the thread mentioned by ErikBean. Thanks!

mauricioszabo commented 4 years ago

Most things in the Atom editor are really plug-ins and not built-in in the editor.

Maybe it's possible to replace symbols with something that fixes this current issue?

sogaiu commented 4 years ago

For a ctags-based approach, the following two bits might be useful:

https://github.com/jtanx/ctagsx https://github.com/jtanx/ctagz (used in above)

The former is a vscode extension that has worked well for me. The latter is a:

JS Native ctags parser, based on the reference implementation by Darren Hiebert (public domain).

I have forks with some branches to support an associated outline view for vscode:

https://github.com/sogaiu/ctagsx/tree/outline-view https://github.com/sogaiu/ctagz/tree/tags-for-file

so possibly those might be of some use too.

sjenyart commented 4 years ago

Hello folks. Here is what I have done to get this working:

  1. Install symbol-gen.
  2. ctrl-alt-g to generate tags.
  3. "Go to declaration" context menu now works.
  4. If you are on Windows, you will need to add a keybinding if you want a hotkey. Add the following to your keymap.cson:
'atom-text-editor':
  'f12': 'symbols-view:go-to-declaration'
  'ctrl-f12': 'symbols-view:return-from-declaration'

This will result in f12 taking you to the declaration and ctrl-f12 returning, so use whatever you like so long as it is not already mapped.

sogaiu commented 4 years ago

@sjenyart Thanks for sharing this.

[Note: content updated from original post -- see history if interested in earlier content]

It looks like it is for generating tags files.

I think I am still encountering some of the issues from before (https://github.com/atom/symbols-view/issues/159#issuecomment-544118286).

I can generate tags files via other means too, but the resulting Atom behavior appears flaky still.

Below are some other potential considerations, but even if the tags generation portion is accounted for, it appears that (at least in my case) things can "stop working" after a whie.


One possibly minor thing is that npm audit is giving some not-so-happy output.


Another aspect of this plugin to be aware of is that it comes with 3 pre-compiled binaries (one for each of Linux, macos, and Windows). That might not be a problem for some folks, but it may be for others. Ah, now I see that the original symbols-view does the same.

Apparently some folks have just replaced the included binaries with one's of their own with some success: https://github.com/weskinner/symbol-gen/issues/62#issuecomment-335303253

(Note that it apparently didn't work for at least one person.)

May be it's possible for there to be a wasm version of the bits required for tag file generation (or use something like ctagz mentioned above). I am pretty sure there are some extensions for VSCode that go the wasm route so may be that's doable for Atom plugins as well.