0

I have the "bsd" style selected for C++ programming but when I go to define a function and enter the curly braces on the new line this happens:

enter image description here enter image description here Press RET enter image description here

Is there any way to stop this behaviour so that I end up with this instead:

enter image description here

Update 1

I looked in the messages buffer after typing some curly brackets and found the following two messages:

LSP :: Applying 3 edits to `test.cpp' ...
Applying 3 edits to `test.cpp' ...done

Therefore I suspect that lsp-mode is to blame for this issue. There is little in the Emacs graphical configuration to do with this and I don't know whether the lsp-mode files would be written in C++ or Elisp; can anyone point me in the direction of the relevant files so that they may be changed?

  • I should note that I followed the instructions on this website https://emacs-lsp.github.io/lsp-mode/tutorials/CPP-guide/ to make C++ programming easier. I'm assuming this has changed my configuration in a way I don't want – osilverstone96 Aug 05 '22 at 13:19
  • I have looked in the messages buffer and there are couple of messages saying

    LSP :: Applying 3 edits to 'test.cpp' ... Applying 3 edits to 'test.cpp' ...done

    This leads me to suspect that, in order to fix it, the lsp-mode configuration or code needs to change.

    – osilverstone96 Jan 27 '23 at 11:52

0 Answers0