Skip to content

Language server mode deletes character when file contains emojis #1045

@chrisgrieser

Description

@chrisgrieser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions