Closed jazzychad closed 2 years ago
I should mention I do not have counsel installed.. it was unclear from the README whether that was required for fuzzy-matching.
I can't reproduce the issue,
case insensitive match,
fuzzy match enabled,
Make sure you are using company-ctags
, not company-etags
,
What's the output of C-h v company-backends
?
You can just (setq company-backends '(company-ctags))
in .emacs
and re-test.
Please note company-ctags-fuzzy-match-p
is actually just partial string match. If it's nil, the input string should be strictly the prefix of candides. I can implement the real fuzzy match but it's slow and I'm not sure it's useful.
case sensitive matching does have a bug, fixed. 313508b fixed a case sensitive bug (Chen Bin)
here is the describe-variable output of company-backends
Its value is
(company-bbdb company-semantic company-cmake company-capf company-clang company-files
(company-dabbrev-code company-gtags company-ctags company-keywords)
company-oddmuse company-dabbrev)
Original value was
(company-bbdb company-semantic company-cmake company-capf company-clang company-files
(company-dabbrev-code company-gtags company-etags company-keywords)
company-oddmuse company-dabbrev)
I'm not sure where -gtags
or -etags
are getting set. I have not (knowingly) installed any other backends. Are those just the default company backends?
When I manually set (setq company-backends '(company-ctags))
it does appear to work as intended (fuzzy (nonprefix) and case-insensitive matching).. however it doesn't do the function/argument autocomplete like it was before (presumably supplied by some other of the backends??).
example 1
example 2
with only company-ctags:
Is there a best of both worlds?
company-gtags
company-gtags
is a backend for GNU Global which could extract more information from code.
company-ctags
could only extract tag name, no parameter information. So you need check other backends instead of company-ctags
for parameter completion.
In your setup, the combined results of company-gtags
and company-ctags
are returned as candidates because they are in a group.
BTW, as you can see, company-capf
is before the group of gtags&ctags. if company-capf
returns non-empty result, the backend and the group after it will not be called.
lsp-mode
uses company-capf
, so if you use some LSP stuff, you need only lsp setup and company-capf
.
Aha! Thank you for the detailed info. Sorry for the noise. But at least it uncovered a case-insensitive bug? 😅 I will tweak my setup to figure out what works best between all these backends. Thanks again!
case sensitive bug is fixed for sure.
Hello! Loving company-ctags so far. However, I'm having an issue getting
company-ctags-ignore-case
andcompany-ctags-fuzzy-match-p
working.OS: MacOS 12.0.1 emacs: 27.2 company: 20211201.2335 (from melpa) company-ctags: 20210723.1322
I have set the relevant variables as such in my .emacs
describe-variable shows them set as non-nil (t), but no matter what I try to type in my .c files, the company completion candidates only appear if they match case and use a prefix (non-fuzzy).
Is there a way to debug this?
I have setup my TAGS file using the
find . -name "*.[ch]" | ctags -e -L -
command in the README