jsfaint / gen_tags.vim

Async plugin for vim and neovim to ease the use of ctags/gtags
https://vim.sourceforge.io/scripts/script.php?script_id=5499
MIT License
312 stars 42 forks source link

add ncm2 source support #63

Closed fcying closed 6 years ago

fcying commented 6 years ago

for ncm2 https://github.com/ncm2/ncm2 #61

jsfaint commented 6 years ago

I tested this PR, it works for me 👍 But there are several minor things:

  1. Please rename the file ncm2_gen_tags as ncm2_gtags, because this is only gtags completion.
  2. Please remove trailing space in ncm2_gen_tags.py line 30

Thanks for your contribution!

BTW: Should we remove ncm source now? or just keep it for compatible.

fcying commented 6 years ago

I think it can be remove now.....

The maintainer said:

PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
jsfaint commented 6 years ago

OK, please remove it with a new commit. I'll modify the document later when I get some time.

A little question why do you add cwd=data['cwd'] for subprocess.Popen()? I removed this line, the source still works. Just curious, because I'm not familiar with python 😄

fcying commented 6 years ago

It will changes the global working dir to cwd before subprocess executing the child, may be it will effect the relative position for some files? I just saw it add in deoplete source, so I add it too@_@

jsfaint commented 6 years ago

gtags/global checks the database via environment variable GTAGSDBPATH, but not in the current working directory So maybe we can remove it?

fcying commented 6 years ago

Ok, I remove it both ncm2 and deoplete source.

jsfaint commented 6 years ago

Merged, thanks for your contribution~

butterflyfish commented 6 years ago

if possible, please help add function parameter expansion support. appreciated.

jsfaint commented 6 years ago

gtags is tag based only, it is impossible to add parameter expansion support...

butterflyfish commented 6 years ago

GNU global provide function prototype, that's why I think it's impossible. Like ncm2/ncm2-pyclang provide parameter expansion.

example:

global -x new_terminal
new_terminal      113 src/terminal.c   new_terminal(tea_t* tea, char* name, int ifd, int ofd, aio_recv_t aio_recv)
jsfaint commented 6 years ago

Yes, but it is not for completion. I have no idea how to implement it. The PR is appreciated.

butterflyfish commented 6 years ago

I'm not python programmer, no idea also. Welcome someone implement this fantastic feature.