Suggestion - add additional characters to syntax table to support evil mode word motions
还没有人认领这个 Issue。
评估
调研方向
定位 clojure-mode-syntax-table,并首先检查其中现有的单词语法条目。使用 this-symbol?! 复现 Evil-mode 的 w 和 W 行为,并将其与提议的 Clojure 符号字符进行比较,包括 #、/、: 和 .. 当单词移动能够一致地处理预期字符,且不会错误地吸收周围的方括号时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Expected behavior
in evil mode w motion should work on clojure symbols for example: this-symbol?!
Actual behavior
currently the motion will only include 'this' - i.e up to to the hyphen.
Steps to reproduce the problem
std doom-emacs with clojure mode
Environment & Version information
clojure-mode version
clojure-mode (version 5.16.0)
Emacs version
GNU emascs 27.1
Operating system
Linux 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Suggested change
I am not too familiar with emacs lisp or the clojure mode so this is just a suggestion - it has worked for me in my local configs.
add the following extensions to the word syntax definitions in the clojure-mode-syntax-table (there may be a more compact way of expressing that but I am not familiar with required syntax).
you may or may not want to include the # character. I found it useful and it is accepted in symbols
I am not certain how/if to this should be changed where a character is not allowed as the first char of a word....
I note also that motions like yW are a problem because they pick up brackets when at the end of an expression. So I also included # / : and . because these are useful. There may be a better way to include these...
;; word syntax: add clojure symbol characters
;; as per https://clojure.org/reference/reader
(modify-syntax-entry ?* "w" table)
(modify-syntax-entry ?+ "w" table)
(modify-syntax-entry ?! "w" table)
(modify-syntax-entry ?- "w" table)
(modify-syntax-entry ?_ "w" table)
(modify-syntax-entry ?' "w" table)
(modify-syntax-entry ?? "w" table)
(modify-syntax-entry ?< "w" table)
(modify-syntax-entry ?> "w" table)
;; word-syntax: and other characters that
;; are useful in word motions
(modify-syntax-entry ?# "w" table)
(modify-syntax-entry ?/ "w" table)
(modify-syntax-entry ?: "w" table)
(modify-syntax-entry ?. "w" table)
- 主要语言
- Emacs Lisp
- 星标
- 1k
- 派生
- 249
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clojure-emacs/clojure-mode 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
clojure-emacs/clojure-mode#699 ·
-
难度 4/5 3-5 天 新手友好度 35/100
clojure-emacs/clojure-mode#660 · 5 条评论 ·
-
bug help wanted indentation
难度 3/5 1-2 天 新手友好度 42/100
clojure-emacs/clojure-mode#620 ·
-
难度 3/5 1-2 天 新手友好度 45/100
clojure-emacs/clojure-mode#613 · 1 个 reaction ·
-
Indent very slow未关闭help wanted indentation
难度 4/5 3-5 天 新手友好度 35/100
clojure-emacs/clojure-mode#606 · 6 条评论 ·
查看 clojure-emacs/clojure-mode 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
py-econometrics/pyfixest#2114 ·
维护者通常 1 天内回复
-
Verify the Linux Python quick start from a fresh Ubuntu checkout可能已有人在做 @romanv9 今天认领。 未关闭documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 62/100
R0Y00/Xbox2Windows#652 · 1 条评论 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 72/100
Haseeb-MernStack/commune#138 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 70/100
clojure-emacs/cider#4235 ·
维护者通常 1 天内回复