"Expand Selection" doesn't expand to strings or scopes
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 65/100
Línea de trabajo
Comienza localizando la implementación de Expand Selection y cualquier prueba que cubra la expansión de la selección; el issue no nombra archivos ni puntos de entrada específicos. Reproduce los ejemplos de cadenas de Lua, ámbito de función y Object.property, y luego añade cobertura que muestre que las expansiones sucesivas seleccionan las construcciones esperadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I use VScode's "Expand Selection" command a lot to copy strings around, but when I try to use it on Lua strings, it expands the selection a lot more than just the string I'm on.
Actual behavior
Suppose my cursor is inside the word example:
hs.alert(prefix .. " an exam
|ple string " .. suffix)
1st call to Expand Selection selects the word:
hs.alert(prefix .. " an
examplestring " .. suffix)
2nd call to Expand Selection selects everything between () instead of the full string:
hs.alert(
prefix .. " an example string " .. suffix)
Expected behavior
2nd call to Expand Selection should select just the string:
hs.alert(prefix ..
" an example string ".. suffix)
In JavaScript, I noticed it even has two steps for the string, the inner part of the string, then the outer:
alert(prefix + " an
examplestring " + suffix)
alert(prefix + "
an example string" + suffix)
alert(prefix +
" an example string "+ suffix)
That would also work!
Similar scenarios
Scopes are also currently skipped:
local myFunction = function () ret
|urn true end
local myFunction = function ()
returntrue end <- 1st call selects the word
local myFunction =
function () return true end<- expected: 2nd call selects the function scope
local myFunction = function () return true end<- actual: 2nd call selects the line instead
Same for Object.property:
Object.
property= true
Object.property= true <- expected
Object.property = true<- actual
- Lenguaje dominante
- Lua
- Estrellas
- 4.4k
- Forks
- 442
- Merge medio
- 8 d 9 h
- PR fusionados (30 d)
- 1
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 LuaLS/lua-language-server
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
LuaLS/lua-language-server#1776 ·
-
泛型for迭代器的类型推导漏掉了带__call的类 Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
LuaLS/lua-language-server#3463 · 5 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
LuaLS/lua-language-server#3461 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
LuaLS/lua-language-server#3460 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
LuaLS/lua-language-server#3459 · 1 reacción ·
Todos los issues de LuaLS/lua-language-server
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
LandSandBoat/server#11579 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ArchiveTeam/sinavideo-grab#7 · 3 reacciones ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
mailcow/mailcow-dockerized#7480 ·
-
Mapper: a failed area image export crashes Mudlet if the profile closed while it was running Abiertomapper bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100