Skip to content

Make fileformat update when it is changed? #1278

Closed Answered by benfrain
benfrain asked this question in Q&A
Discussion options

You must be logged in to vote

Figured this out, I was just using the wrong commands. Lualine updates just fine if using the lualine_x from the wiki:

lualine_x = {
      {
        "fileformat",
        icons_enabled = true,
        symbols = {
          unix = "LF",
          dos = "CRLF",
          mac = "CR",
        },
      },
    },

In case anyone wants a couple of mappings to toggle EOL from LF (unix) to CRLF (dos)

km.set({ "n" }, "<Leader>xl", ":set ff=dos<CR>", { desc = "EOL = CRLF" })
km.set({ "n" }, "<Leader>xu", ":set ff=unix<CR>", { desc = "EOL = LF" })

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by benfrain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant