Closed
Description
Thank you for creating bash-lsp. I use LSPs with Golang, Rust etc. and have missed the functionality when writing Bash.
I was delighted when I inadvertently hovered over a variable in a script and its declaration was documented but these variable (re)declarations appear to not be identified correctly.
#!/usr/bin/env bash
X="Freddie"
X="Frederik"
function test () {
local X="Dog"
printf "${X}"
}
In the above, the use of X
in printf "${X}"
(IMO) refers to its definition in local X="Dog"
but bash-lsp reports line #3 (X="Freddie"
).
If I comment local X="Dog"
, I expect (perhaps incorrectly) that the redefinition X="Frederik"
should be used but it continues to refer back to line #3 (X="Freddie"
)