I tried to install company and lsp on running on Emacs v28.2 on 5.4.240-1-MANJARO for a handful of languages. Most of the stuff works fine, flycheck, linters,lsp-connection, the popup completion with added documentation. Then i reproduce the config on a other system, but the completion has no more graphic and information in the popup.
On other systems there is the popup more visual informative:
On both Systems lsp-describe-session
points out to ruff and jedi.
The installed related packages are quite similare and load via use-package
:
- all-the-icons-*
- company
- company-quickhelp
- flycheck
- lsp-jedi
- lsp-mode
- lsp-treemacs
- lsp-ui
can't point out where the problem lays.
EDIT:
The code for downloading company via use-package
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/"))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-and-compile
(setq use-package-always-ensure t ; get rid of the :ensure t key
use-package-expand-minimally t))
(use-package company
:config
(global-company-mode t)
(setq company-idle-delay 0.1)
(setq company-minimum-prefix-length 2)
; (setq company-tooltip-align-annotations t)
(setq company-tooltip-offset-display 'lines)
(setq company-tooltip-flip-when-above t)
(define-key company-active-map (kbd "\C-n") 'company-select-next)
(define-key company-active-map (kbd "\C-p") 'company-select-previous)
(define-key company-active-map (kbd "\C-d") 'company-show-doc-buffer)
(define-key company-active-map (kbd "M-.") 'company-show-location))
EDIT II:
Check list-package
and see that company
and company-quickhelp
are still "available" but not "installed" when check it. But when i
check the variable package-selected-packages
it is in the list.
EDIT III:
updated all the installed packages via list-package
, still no progress
EDIT IV:
start with a blank emacs and install all with my init.el and config.org new, still no graphics from company.
EDIT V:
Managed to get correct pop-up completion at other ~prog-mode~ buffers then python i use. the only problem still is the python buffer, where there is no completion at all.
EDIT VI:
I tried to manually do M-x company-capf
, and the pop-up-showed up correctly in python-mode
. so i think there is an issue with the automatic pop-up. I think the problem lays in the function call in python-mode
, which create the popup. Where can i fix this?
(add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/"))
. That is equivalent to"gnu"
.