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

Inline should support indentation sensitive blocks #7137

Closed
kasiaMarek opened this issue Jan 18, 2025 · 0 comments · Fixed by scala/scala3#22915
Closed

Inline should support indentation sensitive blocks #7137

kasiaMarek opened this issue Jan 18, 2025 · 0 comments · Fixed by scala/scala3#22915
Assignees
Labels
bug Something that is making a piece of functionality unusable code action Related to LSP code actions presentation-compiler Something relating to the presentation compiler Scala 3 Generic ticket relating to Scala 3 spree

Comments

@kasiaMarek
Copy link
Member

kasiaMarek commented Jan 18, 2025

Describe the bug

Inlining newValue in the following code:

def foo =
    val newValue =
      val x = true
      x
    val xx = newValue // inline this value

Results in:

def foo =
  val xx = val x = true
    x

Expected behavior

def foo =
  val xx =
    val x = true
    x

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.4.2

Extra context or search terms

inline value

@kasiaMarek kasiaMarek added bug Something that is making a piece of functionality unusable presentation-compiler Something relating to the presentation compiler Scala 3 Generic ticket relating to Scala 3 code action Related to LSP code actions spree labels Jan 18, 2025
KacperFKorban added a commit to KacperFKorban/metals that referenced this issue Feb 20, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
…code action

- it's ugly but it works-ish

can resolve scalameta#7137

Co-Authored-By: Hamza Remmal <[email protected]>
Co-Authored-By: Abdullah Arif Jafri <[email protected]>
tgodzik pushed a commit to scala/scala3 that referenced this issue Apr 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
closes scalameta/metals#7137

---------

Co-authored-by: Katarzyna Marek <[email protected]>
Co-authored-by: Robert Marek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable code action Related to LSP code actions presentation-compiler Something relating to the presentation compiler Scala 3 Generic ticket relating to Scala 3 spree
Projects
None yet
2 participants