astoff / digestif

A language server for TeX and friends
Other
255 stars 6 forks source link

How to generate tags file for completion? #45

Closed lavish440 closed 2 years ago

lavish440 commented 2 years ago

I am currently using digestif with coc.nvim. I installed digestif using luarocks but I didn't get any autocompletion. Whenever I try to generate tags file, digestif gives me an error

digestif --generate $(kpsewhich amsmath.sty)

Error: can't find '/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty' or can't generate tags from it. 
astoff commented 2 years ago

This command works for me using the git master branch. Could you try that?

But before delving into the autogenerated stuff, do you get completions for the basic LaTeX commands, say, \cite or \section?

lavish440 commented 2 years ago

No. I don't get any autocompletion at all.

lavish440 commented 2 years ago

@astoff Respond please What should I do?

astoff commented 2 years ago

If you get no completions at all, then there must be some problem in your text editor configuration.

lavish440 commented 2 years ago

There is no problem with my Neovim configuration as texlab, clangd and ccls work fine. Also I have seen from logs that digestif is successfully connected to coc.

lavish440 commented 2 years ago

coc.log This is the output of :CocCommand workspace.showOutput languageserver.digestif

lavish440 commented 2 years ago
{
    "languageserver": {
      "digestif": {
        "command": "/home/lavish/.luarocks/bin/digestif",
        "filetypes": ["tex", "plaintex", "context"],
        "trace.server": "verbose"
      }
    },
    "Lua.telemetry.enable": false
}

@astoff This is my coc config

astoff commented 2 years ago

I see nothing obviously wrong with your configuration, so I'm afraid I can't help more. You might have better luck with a newer version installed with the self-installing wrapper script.

lavish440 commented 2 years ago

@astoff I have installed digestif using the wrapper script. I have generated .tags file for amsmath.sty and copied it to ~/.digestif/data successfully but still I am not getting any completion for anything.

astoff commented 2 years ago

I'll close this now, but if in the future you want to discuss the inclusion of a tags file, please feel free to open a new ticket.