clojure-fill-paragraph won't break lines at the space in `word :word`

未關閉
#613 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
clojure, emacs-lisp
領域
tooling

研究方向

尋找 issue 中展示的 clojure-fill-paragraph 進入點和 paragraph-start 自訂設定。重現文件中的 Clojure 函式範例,然後驗證填充可以在 word :word 中的空格處換行,同時不會讓其他列出的分隔符產生回歸。

由索引模型根據 Issue 內容生成。

描述

I noticed a, to me, weird behavior of clojure-fill-paragraph. I was listing keyword arguments in a docstrsing, and when I tried to fill it I ended up with something similar to the screenshot below. I tracked it down to the extra stuff that it is adding to paragraph-start, i.e. this code:

(let ((paragraph-start
       (concat paragraph-start
               "\\|\\s-*\\([(:\"[]\\|~@\\|`(\\|#'(\\)"))

I don't understand why the regexp is like that, but I don't like the current result.

Expected behavior

clojure-fill-paragraph can break lines at the space in word :word.

Actual behavior

image

Steps to reproduce the problem

Try to fill the docstring in

(defn some-function
  "word word word word word word word word word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word word word word word word word word word word word word word word word word word word word word word word word word"
[])

Environment & Version information

clojure-mode version 5.13
主要語言
Emacs Lisp
星號
1k
分支
249
平均合併
1 天 6 小時
30 天內合併 PR
6

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

clojure-emacs/clojure-mode 的其他 Issue

查看 clojure-emacs/clojure-mode 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。