Suggestion - add additional characters to syntax table to support evil mode word motions
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
調査の方向性
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時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 ·
-
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時間未満 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
clojure-emacs/cider#4235 ·
メンテナーはふだん 1 日以内に返信
-
[Request]: Winc対応中かも @chenyme が今日担当しました。 オープンpackage-request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ScoopInstaller/Extras#19476 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
promplate/code-review#158 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信