Suggestion - add additional characters to syntax table to support evil mode word motions
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Finde clojure-mode-syntax-table und prüfe zuerst die vorhandenen Einträge für die Wortsyntax. Reproduziere das Verhalten von Evil-mode bei w und W mit this-symbol?! und vergleiche es mit den vorgeschlagenen Clojure-Symbolzeichen, einschließlich #, /, : und .. Als erledigt gilt die Aufgabe, wenn die vorgesehenen Zeichen von den Wortbewegungen konsistent behandelt werden, ohne fälschlicherweise umgebende Klammern einzubeziehen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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)
- Vorherrschende Sprache
- Emacs Lisp
- Sterne
- 1k
- Forks
- 249
- Ø Merge
- 1 T. 6 Std.
- Gemergte PRs (30 T.)
- 6
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus clojure-emacs/clojure-mode
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
clojure-emacs/clojure-mode#699 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
clojure-emacs/clojure-mode#660 · 5 Kommentare ·
-
bug help wanted indentation
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
clojure-emacs/clojure-mode#620 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
clojure-emacs/clojure-mode#613 · 1 Reaktion ·
-
Indent very slowOffenhelp wanted indentation
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
clojure-emacs/clojure-mode#606 · 6 Kommentare ·
Alle Issues in clojure-emacs/clojure-mode
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
py-econometrics/pyfixest#2114 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Verify the Linux Python quick start from a fresh Ubuntu checkoutEvtl. vergeben @romanv9 hat das heute übernommen. Offendocumentation good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
R0Y00/Xbox2Windows#652 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Haseeb-MernStack/commune#138 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 62/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
clojure-emacs/cider#4235 ·
Maintainer antworten meist innerhalb von 1 Tag