Suggestion - add additional characters to syntax table to support evil mode word motions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
Direzione di ricerca
Individua clojure-mode-syntax-table e rivedi innanzitutto le voci esistenti per la sintassi delle parole. Riproduci il comportamento di Evil-mode per w e W con this-symbol?! e confrontalo con i caratteri di simbolo Clojure proposti, inclusi #, /, : e .. Il lavoro è completato quando i caratteri previsti vengono gestiti in modo coerente dai movimenti per parole, senza assorbire erroneamente le parentesi circostanti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Emacs Lisp
- Stelle
- 1k
- Fork
- 249
- Merge medio
- 1g 6h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di clojure-emacs/clojure-mode
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
clojure-emacs/clojure-mode#699 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
clojure-emacs/clojure-mode#660 · 5 commenti ·
-
bug help wanted indentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
clojure-emacs/clojure-mode#620 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
clojure-emacs/clojure-mode#613 · 1 reazione ·
-
Indent very slowApertahelp wanted indentation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
clojure-emacs/clojure-mode#606 · 6 commenti ·
Tutte le issue di clojure-emacs/clojure-mode
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
clojure-emacs/cider#4235 ·
I maintainer di solito rispondono entro 1 giorno
-
[Request]: WincForse già presa @chenyme l’ha presa oggi. Apertapackage-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ScoopInstaller/Extras#19476 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
promplate/code-review#158 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno