-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem of autocompletion with an incremental drop down menu for auctex based on ivy on Ubuntu 20.04. #2887
Comments
That's expected. Ivy doesn't provide any automatic "drop down menus". For that there's e.g.
That probably means you haven't initialised/activated Here's what I did:
Since this issue doesn't seem related to Ivy, I'm closing it for now, but I'm still happy to answer questions if I can. |
Thank you for letting me know this. I add the follownig code snippet into my
Now I obtain the same result with yours as shown below, but according to my try, the command to trigger the "drop-down menu" is like this: Furthermore, what I really want is that once I start typing commands, the incremental drop-down menu should be triggered automatically immediately and the candidate results should be narrowed as the input sequence increases without invoking the command used in step 8 over and over again. To summarize, below is the drop-down menu that is triggered when only one command character is entered, and it should be gradually and precisely filtered as the input sequence grows: Can this be done?
Thank you for your sincere help and technical exquisite guidance. Another thing I want to know is how to let Emacs show tooltip like the following given by TeXstudio: Regards, |
That's what
Sorry, I'm not aware of any packages that currently do that. If there aren't any, maybe you can be the first to write one ;). |
Then, what's the relationship between I filed an issue here.
This seems to be the exact same thing being discussed here.
If so, maybe I really will do that someday ;-). |
None, except for both being completion-related. Again, I'm not that familiar with |
Have you noticed my latest comments here? It seems to me that the LSP based solution maybe a preferable method over the tricks discussed here. However, TBF, I haven't achieved a feasible configuration based on this method so far. |
Sure, whatever works for you. I sometimes use the Eglot [1][2] LSP client with the Digestif [3] server. I've yet to compare it to the TexLab [4] server, I guess because Debian's version of [1] https://elpa.gnu.org/devel/eglot.html
What have you tried? All I do after installing (with-eval-after-load 'tex
(define-key TeX-mode-map [remap TeX-complete-symbol] #'completion-at-point))
Then when I visit a LaTeX file I just |
Thank you for sharing valuable experience. I'll try it as soon as possible.
I give a cursory look at some related packages, including digestif, texlab, lsp-mode[1], lsp-ivy, and spacemacs, but still can't figure out a workable setting from scratch. It seems to me that the lsp-mode is an indispensable component for this feature, but your above-mentioned configuration don't use it at all. This is a complicated configuration field for Emacs, my understanding is far less comprehensive enough. [1] For lsp-mode relevant (La)TeX supporting capability, refer to the following instructions for more detailed info: https://emacs-lsp.github.io/lsp-mode/page/lsp-tex/ |
That's because I use the simpler My understanding is that |
Wonderful. I have successfully completed the corresponding configuration according to your above guidance. I describe the detailed steps used by me as below:
(straight-use-package
`( auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
:pre-build ,(pcase system-type
(`berkeley-unix '("gmake"))
(_ '(
;("bash" "-c" "cd ~/.emacs.d/straight/repos/auctex")
("./autogen.sh")
("./configure")
("make")
("sudo" "make" "install"))))))
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(use-package company)
(add-hook 'after-init-hook 'global-company-mode)
(use-package yasnippet)
(require 'yasnippet)
(yas-reload-all)
(add-hook 'prog-mode-hook #'yas-minor-mode)
(use-package eglot)
; Based on my tries, whether the following settings are made or not will not affect the final use.
;(with-eval-after-load 'tex
; (define-key TeX-mode-map [remap TeX-complete-symbol] #'completion-at-point)) Open some TeX document and enable Eglot ( I also tried to test the (use-package lsp-mode)
(use-package company-lsp)
(require 'company-lsp)
(push 'company-lsp company-backends)
(add-to-list 'company-lsp-filter-candidates '(digestif . nil)) |
This surely has a good historical reason to be so, but at this point AUCTeX should probably be providing a simple completion-at-point function instead... |
I've never done that comparison (I'm the author of Digestif), so I would be curious to know about your findings. TexLab is a much bigger project in terms of lines of code and dependencies, but I can't see that difference reflected in their feature list. |
Yes, namely that
It already does, which is why simply rebinding
Okay, but don't hold your breath ;). I probably won't even bother trying to install TexLab until it's easier to do so on Debian, since Digestif already suits my (limited) LaTeX needs.
Glad to hear I'm not missing out :). Thanks! |
On Ubuntu 20.04, I'm using latest git master version of Emacs/auctex/swiper, with the straight as the Emacs package manager. The
auctex
andswiper/ivy
are bootstrapped as below via straight:Then I test my above configurations with a minimal LaTeX file as shown below:
I find the following problems:
But TeXstudio doesn't have all the above-mentioned disadvantages, see the following screenshot taken from it for more detailed info.
The text was updated successfully, but these errors were encountered: