Closed jcubic closed 1 year ago
I think this is because of electric-indent-mode
that doesn't work together with graphql-mode
.
I have this hack to fix the issue:
(defun new-line-and-indent-fix ()
(interactive)
(newline)
(indent-for-tab-command))
(defun after-major-mode ()
(if (memql major-mode '(yaml-mode
python-mode
nxml-mode
graphql-mode-hook
lisp-interaction-mode))
(electric-indent-mode -1))
(if (not (memql major-mode
'(fundamental-mode
erc-mode
text-mode
eshell-mode
shell-mode
minibuffer-mode
inferior-js-mode
nodejs-repl-mode
change-log-mode
comint-mode
lisp-interaction-mode
inferior-scheme-mode
sql-mode)))
(progn
(local-set-key (kbd "<RET>")
'new-line-and-indent-fix))))
(add-hook 'after-change-major-mode-hook 'after-major-mode)
I had to add graphql-mode to the list, the code was turned off in my .emacs not sure why.
I do have electric-indent-mode
with graphql-mode
without that error.
Could you try isolating it from the rest of the config? It might be a conflict with another package.
Oh I see in the new issue you mention selecting a region. That reproduced it for me. Closing this one.
Got this error when pressing TAB key: