Closed snoopy closed 5 years ago
There is a ctags module in Textredux: https://github.com/rgieseke/textredux/blob/master/ctags.lua
So i think you just need to overwrite the keyboard shortcut, though i'm not sure if i understand your question correctly.
Sorry, didn't see there already was one in TR. Sadly it doesn't work but i ported the normal ctags module by mitchell to TR which works fine.
local textredux = require("textredux")
keys.cg = textredux.ctags.goto_symbol
Works for me (on Linux) -- what problem did you have @snoopy?
The Textredux version is also based on Mitchell's code, so I'd be happy to have improvements or fixes.
Since no code was provided here I decided to rewrite the ctags functionality somewhat.
@rgieseke could you take a look at it and let me know if you think this warrants a PR? https://github.com/loomer/textredux/blob/update-ctags/ctags.lua
It basically just uses the "tags" file created by ctags just like the official ctags module by Mitchell. You can also restrict search to only symbols from the current file as otherwise you can get a lot of (useless) results in large projects at times.
This looks great! I'm not sure it should be in core Textredux - maybe a separate module (which requires Textredux) would also have better visibility ... what do you think?
That might work.
Is it possible for textredux to hijack the go_to window which opens when using ctags? How would this be possible/how much work is it?
For info on ctags in TA see: https://foicica.com/wiki/ctags