Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Change All Occurrences (CTRL+F2)" matches too much #1574

Closed
brikken opened this issue Mar 14, 2021 · 3 comments
Closed

"Change All Occurrences (CTRL+F2)" matches too much #1574

brikken opened this issue Mar 14, 2021 · 3 comments

Comments

@brikken
Copy link

brikken commented Mar 14, 2021

When using "Change All Occurrences (CTRL+F2)" it appears to match too much. It looks like it's doing a basic "search/replace" rather than matching on the selected symbol.

Code to reproduce

module Main where

import qualified Data.Time as Time ( Day, fromGregorian )

data Day = Day Int Int Int

myDay :: Day
myDay = Day 2021 3 14

myRealDay :: Time.Day 
myRealDay = Time.fromGregorian 2021 3 14

main :: IO ()
main = putStrLn "Hello, Haskell!"

Place the caret on the data definition of Day. Notice that only the relevant symbols are now highlighted by the editor (ie. the data definition and the type declaration of myDay).

image

Now hit CTRL+F2. Notice that now all simple text matches of Day are selected and updated when changing the text.

image

Version: 1.54.2 (user setup)
Commit: fd6f3bce6709b121a895d042d343d71f317d74e7
Date: 2021-03-11T00:56:19.848Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19041

Extension v1.2.0

output.txt

@fendor
Copy link
Collaborator

fendor commented Mar 14, 2021

Hi, thank you for the bug report!

That is indeed correct, there is no Rename Symbol feature yet, which would perform the action you want (actually we all want).

@jneira jneira transferred this issue from haskell/vscode-haskell Mar 15, 2021
@jneira
Copy link
Member

jneira commented Mar 15, 2021

I've moved the issue to haskell-language-server as the bad behaviour is caused by the server as @fendor mentioned.
The main issue about add renaming (via retrie plugin) would be: #282

@jneira
Copy link
Member

jneira commented Mar 22, 2021

Ok, i am gonna close this one, @brikken you could track the progress of the feature in the mentioned issue #282

@jneira jneira closed this as completed Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants