Skip to content

Poor comment continuation character placement #3749

@elondres-mim

Description

@elondres-mim

Description

Ruby LSP Information

I'm running ruby-lsp 0.26.1 on GNU Emacs. I've reproduced this problem using GNU Emacs 29.3 packaged by Debian running on Ubuntu 24.04, as well as on GNU Emacs 30.2 packed via emacs-plus running on macOS Sequoia 15.6.

I have ruby-lsp installed via running gem install ruby-lsp.

I am running lsp via the following configuration:

(use-package lsp-mode
  :config
  (mapcar (lambda (x) (add-to-list 'lsp-disabled-clients x)) '(steep-ls solargraph rubocop-ls ruby-ls))
  :hook (ruby-ts-mode . lsp))

Reproduction steps

  1. Open a new ruby buffer. (With the config listed above, this automatically starts lsp and ruby-lsp.)
  2. Type #. Now the buffer looks like: #<cursor>
  3. Type RET

Now the buffer looks like:

#
<cursor>#

which I think is probably always wrong. Sometimes I may want to continue a block comment, in which case this behavior is perhaps ok except the placement of the cursor and line 2 octothorpe should be switched. Much more commonly however, I don't want to continue the block comment, I want to just start writing ruby; the current behavior means I need to press Delete in order to do that, which is annoying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp-wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions