0

I am on Emacs 27.2 configured with the latest commit of Spacemacs, develop branch.

I have both ocaml and lsp layer enabled. Sadly, I find lsp-mode's auto-completion with the ocaml-lsp too slow to use, so I want to disable this feature only for tuareg-mode.

So far, I only found global solutions like this, but I want a buffer-local, major-mode sensitive behavior. So, building on the previous solution, I have tried:

(add-hook 'tuareg-mode-hook 'spacemacs/toggle-auto-completion-off)

However, this fails to disable autocompletion on buffers of tuareg-mode, maybe because lsp mode enables it back.

So, I concluded that I have to tackle lsp, not tuareg. What settings should I set in order to achieve my goal?

0
0

You may try something like:

(add-hook 'tuareg-mode-hook (lambda ()
                              (setq-local lsp-completion-enable nil)))

but make sure that this runs before lsp itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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