1

This question is exactly opposite to the below question.

Stack Overflow.

When I use Slime inside Doom Emacs, I am not able to type

(defun square (x)
   (* x x))

By the time I type (defun square (x)), two brackets are auto-completed, and when I etype enter, slime REPL is showing:

CL-USER> (defun square (x))
; in: DEFUN SQUARE
;     (SB-INT:NAMED-LAMBDA SQUARE
;         (X)
;       (BLOCK SQUARE))
; 
; caught STYLE-WARNING:
;   The variable X is defined but never used.
; 
; compilation unit finished
;   caught 1 STYLE-WARNING condition
SQUARE 

I don't know, which package DOOM is using for auto-complete and how to disable it?

Sreekumar R
  • 573
  • 6
  • 24
  • 1
    it sounds like you want to disable just matching parens, not general autocompletion? It looks like it uses `smartparens`, so try `M-x smartparens-mode` in the slime buffer. Also, you should be able to use `open-line`, bound to `C-o` in normal emacs to get a newline even with smartparens – Rorschach Jan 11 '21 at 09:30
  • 1
    I press `C-j` to add newlines, see https://stackoverflow.com/q/47283937/124319 – coredump Jan 11 '21 at 09:50
  • 2
    Answer is in Doom's FAQ. https://github.com/hlissner/doom-emacs/blob/develop/docs/faq.org#how-to-disable-smartparensautomatic-parentheses-completion – Henrik Jan 11 '21 at 10:32
  • 1
    Thank you all. Now I have three solutions. – Sreekumar R Jan 11 '21 at 14:06
  • `C-o` is not working for me. But `C-j` is working. For the third answer, when we disable globally using `(after! smartparens (smartparens-global-mode -1))`, I am not getting smart parenthesis even in normal lisp editor. I prefer the first answer. – Sreekumar R Jan 11 '21 at 14:14
  • 1
    @SreekumarR -- the the link from the third comment above explicitly says _not_ to use `after!` as that is an outdated method. The link suggests using `(remove-hook 'doom-first-buffer-hook #'smartparens-global-mode)` instead. – ad absurdum Jan 11 '21 at 16:42

0 Answers0