PowerShellEditorServices
PowerShellEditorServices copied to clipboard
Language service should be able to find variable references inside of strings
This affects references/occurrences finding and variable renaming. An example from Kirk:
function Write-Item($itemCount)
{
$i = 1
while ($i -le $itemCount)
{
$str = "Output ${i}"
Write-Output $str
$i = $i + 1
}
}
If you attempt to rename the variable $i, the instance inside of the output string does not get renamed.
I believe this is working now but I don't quite know how to "rename" unless you mean through the search menu.
I think rename may be broken for us now since the LSP got new message types for performing renames. However, I think finding/renaming variables in strings did work the last time I tried it.