Given a file named demo.lua with this content:
local foobar = "🙂"
local hello = foobar
local world
Using the cli via stylua demo.lua results in this the deletion of the excess line, as expected:
local foobar = "🙂"
local hello = foobar
local world
However, when formatting via the LSP (in my case, I use nvim and run :lua vim.lsp.buf.format()), we get:
local foobar = "🙂"
local hello = fooba
local world
Basically, instead of the excess line break, the r is deleted.
edit: the same also occurs when the file contains a nerdfont glyph.
Given a file named
demo.luawith this content:Using the cli via
stylua demo.luaresults in this the deletion of the excess line, as expected:However, when formatting via the LSP (in my case, I use nvim and run
:lua vim.lsp.buf.format()), we get:Basically, instead of the excess line break, the
ris deleted.edit: the same also occurs when the file contains a nerdfont glyph.