"Expand Selection" doesn't expand to strings or scopes
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 65/100
Direção de pesquisa
Comece localizando a implementação de Expand Selection e todos os testes que cobrem a expansão da seleção; a issue não nomeia arquivos ou pontos de entrada específicos. Reproduza os exemplos de strings Lua, escopo de função e Object.property e, em seguida, adicione cobertura mostrando que expansões sucessivas selecionam os construtos esperados.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Lua
- Estrelas
- 4.4k
- Forks
- 446
- Merge médio
- 8d 9h
- PRs com merge (30d)
- 1
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de LuaLS/lua-language-server
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
LuaLS/lua-language-server#1776 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
LuaLS/lua-language-server#3470 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
LuaLS/lua-language-server#3469 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
LuaLS/lua-language-server#3468 ·
-
泛型for迭代器的类型推导漏掉了带__call的类Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 65/100
LuaLS/lua-language-server#3463 · 5 comentários ·
Todas as issues de LuaLS/lua-language-server
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
public-transport/transitous#2569 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
-
bug: (profiler): E484 "Can't open file .../vim/_core/shared" when stopping profiler on Neovim 0.12Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
folke/snacks.nvim#2971 ·
-
severity: low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
luainkernel/lunatik#1853 ·
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue hacktoberfest runner
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100