Skip to content

Entire file gets formatted when the range refers to the top most text-block of code #1187

@mroavi

Description

@mroavi

I'm using Neovim 0.8 together with Julia's LSP server (LanguageServer 4.3.1)

Before:

 
function hi()
println("Hi, World")
end

function hello()
println("Hello, World")
end

After: :lua vim.lsp.buf.format({ range = { ['start'] = {2,0}, ['end'] = {4,0} } })

 
function hi()
  println("Hi, World")
end

function hello()
  println("Hello, World")
end

Expected:

 
function hi()
  println("Hi, World")
end

function hello()
println("Hello, World")
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions