Closed A6GibKm closed 4 years ago
The config for company-mode used by doom Emacs is at https://github.com/hlissner/doom-emacs/blob/develop/modules/completion/company/config.el. Only the first use-package!
block should be relevant. Note that by default (featurep! +childframe)
is nil
and (featurep! :editor evil)
is set to t
, so the issue might lie in the :config
part.
According to Doom docs the default is not to use childframes, but rather tooltips & overlays.
+childframe
Enables displaying completion candidates in a child frame, rather than an overlay or tooltip (among with other UI enhancements). This requires GUI Emacs 26.1+ and is incompatible with the =+tng= flag
+childframe
(I think this uses company-box) fixes this issue.@A6GibKm could you explain what each of the first two screenshots is?
They are the tooltip invoked by company-mode on two different themes.
If I understand correctly, doom is configuring for company-posframe when it's not expected to be.
I'm not sure if we are setting something incorrectly, or if this is a doom issue.
does this occur on mainline? if so, we might be advertising a feature incorrectly
This is indeed something that happens due to doom's config, but it does not happen using vanilla emacs 27 + doom, so ultimately there is different (unexpected) behaviour in pgtk.
What I have not yet tested is if this is related to nativecomp as I haven't tested pgtk without it for a long while.
@A6GibKm I did:
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/doom
~/doom/bin/doom install
and saved the above config as ~/.emacs
, did ./doom/bin/doom run
, and got an error:
Could you give me step-by-step guide to reproduce?
The idea is that you should install doom to either ~/.emacs.d
or ~/.config/emacs
so its init file gets loaded first. In this case your .emacs
file is getting loaded.
Also personal config files for it should go on ~/.config/doom
(~/.config/doom/config.el) or ~/.doom.d
, but to reproduce this issue no config is needed as doom bundles an already configured company mode.
EDIT: Note that doom emacs use vi bindings from evil-mod
good luck with that :eyes: .
@A6GibKm thank you.
I installed doom emacs in ~/.emacs.d/
,
saved the above config as ~/.config/doom/config.el
,
ran ./.emacs.d/bin/doom run
,
did M-x lisp-interaction-mode
,
did M-x company-mode
,
input (des
,
and I got this screenshot:
It is running on wayland.
What to do next?
You do not need any configuration, the entire procedure should be (without any user config file)
$ git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
$ ~/.emacs.d/bin/doom install
$ emacs
then
C-x C-f ~/.emacs.d/init.el
And type (des
or anything which promps company-mode.
NOTE: Incidentally I tried opening the scratch buffer and enable lisp-interaction-mode
but I was not able to reproduce in this setting.
I managed to discover the actual cause of the issue. It was solaire-mode
. It also turns out that this also happens with vanilla emacs (knowing the actual cause made me able to reproduce it). So closing this, sorry for the trouble :(.
While using company mode the area next to the childframe changes its color.
Compare this with the behaviour in company-mode's website
Which coincides with the behaviour when run with emacs 27.1.
Steps to reproduce
This is a bit tricky since I was not able to reproduce this without doom-emacs default configuration.
(des
for company mode to show suggestions.This is not reproducible with the above steps with vanilla emacs 27.1.
Note
I do not know if this is related to childframes or something else.