Suggestion - add additional characters to syntax table to support evil mode word motions
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
Línea de trabajo
Localiza clojure-mode-syntax-table y revisa primero sus entradas existentes de sintaxis de palabras. Reproduce el comportamiento de Evil-mode para w y W con this-symbol?! y compáralo con los caracteres de símbolo de Clojure propuestos, incluidos #, /, : y .. Se considera terminado cuando los caracteres previstos se gestionan de forma coherente mediante los movimientos por palabras, sin absorber incorrectamente los corchetes circundantes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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)
- Lenguaje dominante
- Emacs Lisp
- Estrellas
- 1k
- Forks
- 249
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de clojure-emacs/clojure-mode
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
clojure-emacs/clojure-mode#699 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
clojure-emacs/clojure-mode#660 · 5 comentarios ·
-
bug help wanted indentation
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
clojure-emacs/clojure-mode#620 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
clojure-emacs/clojure-mode#613 · 1 reacción ·
-
Indent very slowAbiertohelp wanted indentation
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
clojure-emacs/clojure-mode#606 · 6 comentarios ·
Todos los issues de clojure-emacs/clojure-mode
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
clojure-emacs/cider#4235 ·
Los mantenedores suelen responder en 1 día
-
[Request]: WincPosiblemente ocupada @chenyme la tomó hoy. Abiertopackage-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ScoopInstaller/Extras#19476 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
promplate/code-review#158 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día