Skip to content

Faulty auto install #17

Open
Open
@fapdash

Description

@fapdash

This is my config:

(use-package codeium
  :load-path "~/.emacs.d/lisp/codeium.el"
  :init
  (add-hook 'prog-mode-hook
             (lambda ()
               (setq-local completion-at-point-functions '(codeium-completion-at-point))))

  :defer t
  :config
  (setq use-dialog-box nil) ;; do not use popup boxes

  ;; get codeium status in the modeline
  (setq codeium-mode-line-enable
        (lambda (api) (not (memq api '(CancelRequest Heartbeat AcceptCompletion)))))
  (add-to-list 'mode-line-format '(:eval (car-safe codeium-mode-line)) t)
  ;; alternatively for a more extensive mode-line
  ;; (add-to-list 'mode-line-format '(-50 "" codeium-mode-line) t)

  ;; use M-x codeium-diagnose to see apis/fields that would be sent to the local language server
  (setq codeium-api-enabled
        (lambda (api)
          (memq api '(GetCompletions Heartbeat CancelRequest GetAuthToken RegisterUser auth-redirect AcceptCompletion))))

  ;; You can overwrite all the codeium configs!
  ;; for example, we recommend limiting the string sent to codeium for better performance
  (defun my-codeium/document/text ()
    (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (min (+ (point) 1000) (point-max))))
  ;; if you change the text, you should also change the cursor_offset
  ;; warning: this is measured by UTF-8 encoded bytes
  (defun my-codeium/document/cursor_offset ()
    (codeium-utf8-byte-length
     (buffer-substring-no-properties (max (- (point) 3000) (point-min)) (point))))
  (setq codeium/document/text 'my-codeium/document/text)
  (setq codeium/document/cursor_offset 'my-codeium/document/cursor_offset))

This somehow doesn't load codeium, I had to explicitly require it:

(require 'codeium)

Afterwards I ran M-x codeium-init and M-x codeium-install. I never was asked for an API key or was redirected to a URL.
I don't get any completions anymore. Editing a file is incredibly slow, my input is delayed very noticeably.

This error gets printed into *codeium-log* several times per second:

/snap/emacs/1808/usr/bin/emacs: /home/fap/.emacs.d/codeium/codeium_language_server: No such file or directory

Process codeium exited abnormally with code 127

But the file exists:

$ file ~/.emacs.d/codeium/codeium_language_server 
/home/fap/.emacs.d/codeium/codeium_language_server: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, interpreter /ld-linux-x86-64.so.2, missing section headers

Output of codeium-diagnose:

codeium state: default
command: 
/home/fap/.emacs.d/codeium/codeium_language_server --api_server_host server.codeium.com --api_server_port 443 --manager_dir /tmp/codeium_hquefa

GetCompletions
http://localhost/exa.language_server_pb.LanguageServerService/GetCompletions
codeium/metadata/ide_name	"emacs"
codeium/metadata/extension_version	"1.1.38"
codeium/metadata/ide_version	"28.2"
codeium/metadata/request_id	6
codeium/metadata/api_key	nil
codeium/document/text	"re t\n  :after geiser-mode\n  :config (add-hook 'geiser-mode-hook #'macrostep-geiser-setup))\n\n(use-pac..."
codeium/document/cursor_offset	3000
codeium/document/editor_language	"emacs-lisp-mode"
codeium/document/language	60
codeium/document/line_ending	"\n"
codeium/editor_options/tab_size	4
codeium/editor_options/insert_spaces	t

Heartbeat
http://localhost/exa.language_server_pb.LanguageServerService/Heartbeat
codeium/metadata/ide_name	"emacs"
codeium/metadata/extension_version	"1.1.38"
codeium/metadata/ide_version	"28.2"
codeium/metadata/request_id	nil
codeium/metadata/api_key	nil

CancelRequest
http://localhost/exa.language_server_pb.LanguageServerService/CancelRequest
codeium/metadata/ide_name	"emacs"
codeium/metadata/extension_version	"1.1.38"
codeium/metadata/ide_version	"28.2"
codeium/metadata/request_id	nil
codeium/request_id	nil
codeium/metadata/api_key	nil

GetAuthToken
http://localhost/exa.language_server_pb.LanguageServerService/GetAuthToken

RegisterUser
http://localhost/exa.language_server_pb.LanguageServerService/RegisterUser
codeium/firebase_id_token	nil

auth-redirect
http://localhost/auth

AcceptCompletion
http://localhost/exa.language_server_pb.LanguageServerService/AcceptCompletion
codeium/metadata/ide_name	"emacs"
codeium/metadata/extension_version	"1.1.38"
codeium/metadata/ide_version	"28.2"
codeium/metadata/request_id	nil
codeium/completion_id	nil
codeium/metadata/api_key	nil

Emacs Version:

GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2023-01-30

Let me know if you need any other information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions