Atom-Ctags (autocomplete+ with ctags)


#1

Hey,
I create a package that fork from atom/symbols-view, provide ctags suggestion data to autocomplete-plus, support Auto Update Ctags when file saved. Also has “Rebuild Ctags” in context-menu, btw you can setting “Auto Build Tags When Active”.


Looking forward to your feedback! :sunglasses:


#2

Nice :+1:

Suggestion: it would be more efficient to make a ctrl+click like in Eclipse IDE for “go to declaration”


#3

I use keyboard to coding more than mouse. :smile:
Also it contains keymap:

‘.platform-darwin .editor’:
‘cmd-r’: ‘atom-ctags:toggle-file-symbols’
‘cmd-alt-down’: ‘atom-ctags:go-to-declaration’
‘cmd-alt-up’: ‘atom-ctags:return-from-declaration’

‘.platform-win32 .editor’:
‘ctrl-r’: ‘atom-ctags:toggle-file-symbols’

‘.platform-linux .editor’:
‘ctrl-r’: ‘atom-ctags:toggle-file-symbols’
‘ctrl-alt-down’: ‘atom-ctags:go-to-declaration’
‘ctrl-alt-up’: ‘atom-ctags:return-from-declaration’

you can use keyborad command instead.

And i have create a new feature issue for this.


#4

Me too but these shorter does not work on Ubuntu ctrl-alt-down and ctrl-alt-up switch to another workspace.
I will try to overload via the personal config of Atom, it should work.

Thanks for your reply. :wink:


#5

Does atom-ctags support coffeescript? When I select a word and do go-to-declaration I get a dialog with an empty input box and the message no symbols found. I have done rebuild ctags but I don’t know if it is doing anything. There is no delay or indication anything is rebuilding.


Is there a simple go-to-definition
#6

It do support coffeescript.
Toggle Developer Tools, and check if there any information or error?
Normally, You should see something like this after you rebuild ctags:

[atom-ctags:rebuild] start @ {path} @ tags... 
[atom-ctags:rebuild] command done @ {path} @ tags. cost: 67ms
[atom-ctags:rebuild] parse end @ {path} @ tags. cost: 0ms 

#7

The rebuild seems to work fine. I just didn’t know if it worked.

I still can’t get go to declaration to work. In the following code I am selecting the bottom paneInfo and executing go to declaration and I get No Symbols Found. Isn’t this supposed to find the top paneInfo?

{Subscriber} = require 'emissary'

paneInfo = [null, null]

class ScrlSync
  Subscriber.includeInto @
  
  activate: (state) ->
    x = paneInfo[0]

#8

I understand what you mean.
coffeescript’s ctags rules exists in .atom/packages/atom-ctags/lib/.ctags

It did not have regrex that support your specs.
Or you can write your own rules support your needs.
Here are some examples for coffeescript I search by google:

  1. https://gist.github.com/mads379/907245#comment-950082
  2. https://gist.github.com/edubkendo/2901380

#9

thanks – I’ll check it out


#10

I have the same problem, I tried with different key combinations but I couldn’t make it works.
Please reply if you find a solution.

Regards.


#11

I also see ‘No symbols found’ and started a new thread for my case here: https://discuss.atom.io/t/struggling-with-ctags/12550/5


#12

Same problem here. I had stopped using this plugin for a while, was working before although with some errors on my setup but now it just shows “No Symbols found”.


#13

can this package generate the ctag file in specified directory? sometimes i maybe forget to ignore the file


#14

Probably is not useful for you anymore, but it can be interesting for newcomers.

I had the same issue. You can solve it by modifying the keybindings of Atom (in Settings).

Just search for goto to find the ctrl+alt+down shortcut, copy the instruction clicking in the icon, then open your keymap.cson file, paste it and change the shortcut.

After rebooting Atom, your new shortcut should work.


#15

Hi docargar, could give an example as to how to configure a shorcut to exclude files while rebuilding ctags?


#16

Hi @yongkangchen

thank you for this pluing, however I am facing issues with building ctags symbols in my project.

I see quite a few posts on this issue in the support forum but as yet there isn’t a clear example as to how to resolve it. Would really appreciate if you could give us an example to solve the problem.

When I try to build ctags, the plugins stops after 10s with the following message,

Stopped: Build more than 10 seconds, check if /Users/aurovrata/Sites/nims contain too many files.
Suggest that add CmdArgs at atom-ctags package setting, example:
–exclude=some/path --exclude=some/other

However your plugin gives no Settings options, can you tell how to exclude paths ?


#17

Actually, THERE IS a Settings options in the atom-ctags package, am not sure why I didn’t see it earlier…

I got it to work by increasing the timeout to 30sec, and this time when I execute ‘Rebuild Ctags’ it does not timeout anymore. I am now able to use the ‘cmd-alt-down’ shortcut to navigate to the function declaration