astoff / digestif

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

How to get completion-at-point to the local file #65

Closed AcaDemIQ closed 1 year ago

AcaDemIQ commented 1 year ago

Hi, I try to use your package in Emacs 29.1 to make completion-at-point with local files. I added % !TeX root = ../main.tex to leafs files, but it's not working... And I don't understand, what does "this is exposed via the the workspace/symbols LSP method" mean? P.S. I cannot make completion on a package subname...

[server-reply] (id:44) Thu Nov  9 20:33:52 2023:
(:result nil :id 44 :jsonrpc "2.0")
[server-reply] (id:45) Thu Nov  9 20:33:52 2023:
(:result nil :id 45 :jsonrpc "2.0")
[internal] (id:41) Thu Nov  9 20:33:55 2023:
(:timed-out :textDocument/signatureHelp :id 41 :params
        (:textDocument
         (:uri "file:///home/mukhin/phd-mukhin-pandoc-latex/src/main.tex")
         :position
         (:line 12 :character 29)))
[internal] (id:42) Thu Nov  9 20:33:55 2023:
(:timed-out :textDocument/hover :id 42 :params
        (:textDocument
         (:uri "file:///home/mukhin/phd-mukhin-pandoc-latex/src/main.tex")
         :position
         (:line 12 :character 29))
astoff commented 1 year ago

I suspect you need to write % !TeX root = main.tex. In general, (La)TeX projects with subfolders can lead to tricky issues.

And I don't understand, what does "this is exposed via the the workspace/symbols LSP method" mean?

In your case it means you need https://github.com/mohkale/consult-eglot.