-
Notifications
You must be signed in to change notification settings - Fork 17
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
suggetions are visible only with commented lines #82
Comments
Seeing the same in Doom Emacs. I suspect this isn't working with a language server that's running. |
(defun complete-codeium ()
"Codeium." ; Doc string.
(interactive) ; Specify is command.
(setq completion-at-point-bkp completion-at-point-functions)
(setq completion-at-point-functions '(codeium-completion-at-point t))
(call-interactively 'company-complete)
(setq completion-at-point-functions completion-at-point-bkp)
) Having the same issue, it seems that configuration to add codeium completion to Here's a (probably very hacky) function to perform explicit codeium completion (my first elisp interactive function !) (for some reason, a local override of (defun complete-codeium-bis ()
"Codeium - this does not work ??"
(interactive) ; Specify is command.
(let (
(completion-at-point-functions '(codeium-completion-at-point t)
)
(call-interactively 'company-complete)
)
)
) |
Should work... here's fixed version: (defun complete-codeium-bis ()
(interactive) ; Specify is command.
(let ((completion-at-point-functions #'codeium-completion-at-point))
(call-interactively 'company-complete))) You had |
I moved to Corfu from company. Any idea how we can use it with Corfu? Thank you for your suggestions! |
Yepper, here you go... If using This part matches above, if just wanted to run (defun my/cape-codeium (&optional interactive)
"Allow codeium capf to be run by itself"
(interactive (list t))
(when interactive
;; if also testing copilot, clear their overlay before showing capf popup
(when (bound-and-true-p copilot-mode) (copilot-clear-overlay))
(cape-interactive #'codeium-completion-at-point)))
(keymap-global-set "C-c p c" #'my/cape-codeium) For full gory effect, this is my setup for This merges ;; Turn on/off if want to use codeium completions
(defvar my/codeium-is-enabled t)
(defalias 'my/capf-eglot+et-al
(cape-capf-super
(cape-capf-silent
(when (bound-and-true-p my/codeium-is-enabled)
(cape-capf-properties #'codeium-completion-at-point
:annotation-function
#'(lambda (_) (propertize " Codeium"
'face font-lock-comment-face))
:company-kind (lambda (_) 'magic))))
(cape-capf-buster #'eglot-completion-at-point 'equal)
(cape-capf-properties #'cape-dabbrev
:annotation-function
#'(lambda (_) (propertize " Dabbrev"
'face font-lock-comment-face)))
;; if line gets too chatty
(cape-capf-silent
(cape-capf-properties #'cape-line
:annotation-function
#'(lambda (_) (propertize " Line"
'face font-lock-comment-face))))))
;; eglot, just to validate with just eglot
(defun my/cape-eglot(&optional interactive)
(interactive (list t))
(when interactive
;; if also testing copilot, clear their overlay before showing capf popup
(when (bound-and-true-p copilot-mode) (copilot-clear-overlay))
(cape-capf-buster (cape-interactive #'eglot-completion-at-point) 'equal)))
(keymap-set eglot-mode-map "C-c p g" #'my/cape-eglot)
;; Since merging eglot and others, assign a key binding to test
;; can remove if feel good
(defun my/cape-eglot+et-al(&optional interactive)
(interactive (list t))
(when interactive
;; if also testing copilot, clear their overlay before showing capf popup
(when (bound-and-true-p copilot-mode) (copilot-clear-overlay))
(cape-interactive #'my/capf-eglot+et-al)))
(keymap-set eglot-mode-map "C-c p z" #'my/cape-eglot+et-al)
(defun my/eglot-capf-config()
(setq-local completion-category-overrides '((file (styles partial-completion)))
completion-category-defaults nil
completion-styles '(orderless partial-completion basic)
;; add in file first, capf will know when in file mode
completion-at-point-functions (list #'cape-file #'my/capf-eglot+et-al)))
(add-hook 'eglot-managed-mode-hook #'my/eglot-capf-config) You can do about the same for Also, |
Awesome! Yeah, actually my setup is with Corfu + Cape but not with Eglot. Thank you so much! |
I just wanted to edit previous post whi is below as not disconnect from the subject. Now that kind of error when run codeium init "Doing vfork: Exec format error: I have API key already in my config. No completions appear. No error in codeium diagnose. Just basic config as it's adviced in readme. I am confused. |
Good-o, glad it's working. Probably should close this issue. |
Hi, I reopened this as this is not a bug and related to my first question, Corfu, cape etc. |
Since nothing to do with Codeium, you should probably start by looking at Corfu's repo for info and help, googling, etc. 🙂 With that said, I believe what you are looking for is |
It is not codeium bug or faulty , but it is related to codeium . Codeium gives brief instructions to work with company but not with Corfu and Cape . That would be really useful for people if they write into readme how to integrate as many folks use Corfu and Cape . Anyway, thank you so much! |
I close now. Thank you! |
.. |
Hi,
I read the issues and there similar cases to mine like, I can see the completions only in commented line. Those issues are closed but this bug or feature still exist. Is there any solution for this? Thank you!
I use spacemacs, auto-completions, lsp-mode with company. I tried with corfu, cape and it didn't work, not even with commented line. Below is my config.
;; Codeium config stats
;; we recommend using use-package to organize your init.el
(use-package codeium
;; if you use straight
;; :straight '(:type git :host github :repo "Exafunction/codeium.el")
;; otherwise, make sure that the codeium.el file is on load-path
The text was updated successfully, but these errors were encountered: