Coder Social home page Coder Social logo

no tag found (neovim) about tagbar HOT 5 OPEN

jfmoulin avatar jfmoulin commented on June 2, 2024
no tag found (neovim)

from tagbar.

Comments (5)

raven42 avatar raven42 commented on June 2, 2024

Couple questions to try to help:

  • It looks like it is using the temp location /tmp/nvim.jfmoulin/UskkgL/0.py as the cache location. Can you verify if this directory exists and you have write access to it? It should report an error if not, but just want to check it out anyway.
  • Have you tried using regular vim instead of neovim to see if that works? I'm wondering if it is something specific to neovim.
  • Are you able to share the file that is not working? Or share another file that isn't working so I can test it out?
  • Lastly, can you share the output of your ctags from the file you can share? If we can see the ctags output we may be able to identify an issue if there is one. You will want to run the following command
ctags --extras=+F -f - --format=2 --excmd=pattern --fields=nksSafet --sort=no --append=no -V --language-force=python --python-kinds=icfmv <filename>

from tagbar.

jfmoulin avatar jfmoulin commented on June 2, 2024

Hi!
Sorry for delayed answer, I was afk.

  • The temporary dir exists and belongs to me (I can rwx).
  • I no longer have vim installed on my system, I moved to neovim a longtime ago and was happily using tagbar first with a vimscript setup, and I think I had it working also when called from init.lua (but I am not sure...). I'll install it again and report
  • Here is a file I tried tagbar on (no file works, anyways):
    import pickle
    import subprocess
    from time import sleep
    import odict
    class Outputer:

    """
    A class to output data (dicts, see FifoReader) to a named pipe
    which can then be read by another process
    Use it to start a script into a new window and communicate with it...
    """
    
    def __init__(self,fifo='/home/jfmoulin/Temp/testfifo',interval=.1):

        """
        fifo is an existing named pipe
        """
        self.interval = interval
        # let us open a new gnome terminal and play our reader therein
        subprocess.Popen(['gnome-terminal',
                          '-x',
                          'python',
                          '/home/jfmoulin/My_Progs/dev/_42_reader.py'
                          ])
        self.fifo_name = fifo
    def __call__(self,data):
        self.fifo = open(self.fifo_name,'w')
        data = pickle.dumps(data)
        self.fifo.write(data)
        self.fifo.close()    
  • Here is the result of the command you proposed:
@ ctags --extras=+F -f - --format=2 --excmd=pattern --fields=nksSafet --sort=no --append=no -V --language-force=python --python-kinds=icfmv _42_outputer.py
  Option: --language-force=python
    Option: --python-kinds=icfmv
    Initialize parser: Python
    Initialize parser: IPythonCell
    Add extra[8]: doubleSharps,Include cells starting from ## in IPythonCell
    enable field "name": yes
    enable field "input": yes
    enable field "pattern": yes
    Reading command line arguments
    OPENING _42_outputer.py as Python language file [new]
    Outputer_42_outputer.py/^class Outputer:$/;"cline:5access:public
    __init___42_outputer.py/^    def __init__(self,fifo='\/home\/jfmoulin\/Temp\/testfifo',interval=.1):$/;"mline:13class:Outputeraccess:publicsignature:(self,fifo='/home/jfmoulin/Temp/testfifo',interval=.1)end:25
    __call___42_outputer.py/^    def __call__(self,data):$/;"mline:26class:Outputeraccess:publicsignature:(self,data)end:30

from tagbar.

raven42 avatar raven42 commented on June 2, 2024

Hmm... the ctags output doesn't look quite right. Was this exactly as it appeared? There doesn't appear to be any TAB characters between the fields. That is how tagbar splits the items on the tag line and decodes the tag information. If there are no TAB characters, then tagbar won't be able to decipher the sting correctly. If this is the case, do you have something in your ctags config file that is causing the delimiter to be different?

Or is this a simply a copy/paste issue when you pasted the output into the github comment?

When I execute it on this file, this is what I see:

projects$ ctags --extras=+F -f - --format=2 --excmd=pattern --fields=nksSafet --sort=no --append=no -V --language-force=python --python-kinds=icfmv test.py
  Option: --language-force=python
  Option: --python-kinds=icfmv
Initialize parser: Python
Initialize parser: IPythonCell
Add extra[8]: doubleSharps, Include cells starting from ## in IPythonCell
enable field "name": yes
enable field "input": yes
enable field "pattern": yes
Reading command line arguments
OPENING test.py as Python language file [new]
Outputer        test.py /^class Outputer:$/;"   c       line:7  access:public   end:32
__init__        test.py /^    def __init__(self, fifo='\/home\/jfmoulin\/Temp\/testfifo', interval=.1):$/;"     m       line:14 class:Outputer  access:public   signature:(self, fifo='/home/jfmoulin/Temp/testfifo', interval=.1)     end:26
__call__        test.py /^    def __call__(self, data):$/;"     m       line:28 class:Outputer  access:public   signature:(self, data)  end:32
projects$

from tagbar.

jfmoulin avatar jfmoulin commented on June 2, 2024

This was a cut and paste from cli output.
I retried and redirected the output to file, the result is TAB separated:


Outputer	_42_outputer.py	/^class Outputer:$/;"	c	line:5	access:public
__init__	_42_outputer.py	/^    def __init__(self,fifo='\/home\/jfmoulin\/Temp\/testfifo',interval=.1):$/;"	m	line:13	class:Outputer	access:public	signature:(self,fifo='/home/jfmoulin/Temp/testfifo',interval=.1)	end:25
__call__	_42_outputer.py	/^    def __call__(self,data):$/;"	m	line:26	class:Outputer	access:public	signature:(self,data)	end:30

from tagbar.

raven42 avatar raven42 commented on June 2, 2024

Hmm. I'm at a loss. I installed neovim on a VM to give it a shot and I am able to see the tagbar output just fine on the file contents you specified. The logs all look the same up to the 'Redisplaying file []' line in my log file, but then my log file shows that there are two 'f' kinds, and 1 'c' kind as we'd expect.

The only thing I can think of is it having to do with the temp directory location. I tried both with, and without setting the $TMPDIR in my .vimrc and in both cases neovim displayed the tags correctly.

Sorry I can't be of more help.

from tagbar.

Related Issues (20)

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.