5

I am using lsp-mode and company on top of Pyhton files. When I complete a function I am getting follwing error:

Company: backend company-capf error "[yas] ‘yas-expand-snippet’ needs properly setup ‘yas-minor-mode’" with args (post-completion get_job_block_number(requester_address, key, index))


Completed function example:

self.mongo_broker.get_job_block_number(${1:requester_address}, ${2:key}, ${3:index})$0

which should be just: self.mongo_broker.get_job_block_number()

my setup:

(diminish 'yas-minor-mode)
(add-hook 'python-mode-hook 'lsp)
(add-hook 'python-mode-hook #'lsp-deferred)

(setq company-auto-complete t)
(global-set-key (kbd "C-c C-k") 'company-complete)

What may be the reason of this error and how can I resolve it?


// Could be related with following question: Company: backend company-capf error

1 Answer 1

2

Seems like I was missing (yas-global-mode) call. When I added to my .emacs file problem is resolved.

1
  • 1
    show exactly what you inserted. Because I have this exact problem.
    – pauljohn32
    Commented Oct 9, 2022 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.