[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LaTeX commands and packages names autocomplete.
From: |
Hongyi Zhao |
Subject: |
Re: LaTeX commands and packages names autocomplete. |
Date: |
Thu, 4 May 2023 23:50:04 +0800 |
On Thu, May 4, 2023 at 11:40 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Thu, May 4, 2023 at 10:54 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> >
> > On Tue, May 2, 2023 at 1:30 PM Arash Esbati <arash@gnu.org> wrote:
> > >
> > > Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> > >
> > > > My current configuration:
> > > >
> > > > (use-package company-math
> > > > :hook
> > > > ;; This will enable the company-math backend for LaTeX mode
> > > > (LaTeX-mode . (lambda ()
> > > > (setq-local company-backends
> > > > (append '((company-math-symbols-latex
> > > > company-latex-commands))
> > > > company-backends))))
> > > > )
> > > >
> > > > See the attached file for the results returned using your example.
> > >
> > > I think you need none of company-math-symbols-latex and
> > > company-latex-commands, AUCTeX offers already a Capf for both of them,
> > > so comment out that part and start company without any additions in your
> > > .tex file.
> > >
> > > > What's your corfu configuration?
> > >
> > > (setq tab-always-indent 'complete)
> > > (setq corfu-auto t)
> > > (global-corfu-mode)
> >
> > Now, I've disabled all the company-mode related configuration and try
> > switching to corfu as follows:
> >
> > ;; https://github.com/minad/corfu#installation-and-configuration
> > (use-package corfu
> > ;; Optional customizations
> > ;; :custom
>
> I should have also uncommented the above line. But even so, I have the
> following problems:
>
> 1. I must at least type 3 letters to trigger the completion.
> 2. Furthermore, my completion candidates list entries are less than
> yours, as shown in the attached screenshot.
Another problem I noticed:
3. The speed of triggering the candidate list for the first time is
very slow, while company-mode does not seem to have this problem.
> > ;; (corfu-cycle t) ;; Enable cycling for
> > `corfu-next/previous'
> > (corfu-auto t) ;; Enable auto completion
> > ;; (corfu-separator ?\s) ;; Orderless field separator
> > ;; (corfu-quit-at-boundary nil) ;; Never quit at completion boundary
> > ;; (corfu-quit-no-match nil) ;; Never quit, even if there is no match
> > ;; (corfu-preview-current nil) ;; Disable current candidate preview
> > ;; (corfu-preselect 'prompt) ;; Preselect the prompt
> > ;; (corfu-on-exact-match nil) ;; Configure handling of exact matches
> > ;; (corfu-scroll-margin 5) ;; Use scroll margin
> >
> > ;; Enable Corfu only for certain modes.
> > ;; :hook ((prog-mode . corfu-mode)
> > ;; (shell-mode . corfu-mode)
> > ;; (eshell-mode . corfu-mode))
> >
> > ;; Recommended: Enable Corfu globally.
> > ;; This is recommended since Dabbrev can be used globally (M-/).
> > ;; See also `corfu-exclude-modes'.
> > :init
> > (global-corfu-mode))
> >
> > ;; A few more useful configurations...
> > (use-package emacs
> > :init
> > ;; TAB cycle if there are only few candidates
> > (setq completion-cycle-threshold 3)
> >
> > ;; Emacs 28: Hide commands in M-x which do not apply to the current mode.
> > ;; Corfu commands are hidden, since they are not supposed to be used via
> > M-x.
> > ;; (setq read-extended-command-predicate
> > ;; #'command-completion-default-include-p)
> >
> > ;; Enable indentation+completion using the TAB key.
> > ;; `completion-at-point' is often bound to M-TAB.
> > (setq tab-always-indent 'complete))
> >
> >
> > But I cannot get any completion effect provided by corfu, as shown in
> > the attached screenshot.
> >
> > > Best, Arash
> >
> > Regards, Zhao
- Re: LaTeX commands and packages names autocomplete., (continued)
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/01
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/01
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/01
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/02
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/02
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/02
- Re: LaTeX commands and packages names autocomplete., David Kastrup, 2023/05/02
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/02
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/04
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/04
- Re: LaTeX commands and packages names autocomplete.,
Hongyi Zhao <=
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/04
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/04
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/05
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/05
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/05
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/05
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/05
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/05
- Re: LaTeX commands and packages names autocomplete., Hongyi Zhao, 2023/05/05
- Re: LaTeX commands and packages names autocomplete., Arash Esbati, 2023/05/05