Poor comment continuation character placement
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Reproduce the behavior in a Ruby buffer using GNU Emacs and the provided lsp-mode configuration, starting from the ruby-lsp comment continuation entry point. Compare pressing RET after # with the expected cursor and octothorpe placement, and confirm that ordinary Ruby writing does not require pressing Delete.
Written by the indexing model from the issue text.
Description
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
- Open a new ruby buffer. (With the config listed above, this automatically starts lsp and ruby-lsp.)
- Type
#. Now the buffer looks like:#<cursor> - 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.
- Dominant language
- Ruby
- Stars
- 2k
- Forks
- 281
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/ruby-lsp
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug help-wanted pinned
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug pinned
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in Shopify/ruby-lsp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
riscv/riscv-unified-db#2626 ·
-
Component: GLib
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
ds-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
we-promise/sure#3693 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
simp/pupmod-simp-simp#395 ·