Skip to content

Commit

Permalink
Fix wrong encoding on new file
Browse files Browse the repository at this point in the history
When 'fileencoding' is empty string it is always equal to `utf-8`.
Add empty string to accepted encodings, so encoding is properly detected
on new files.
  • Loading branch information
monkoose committed Sep 13, 2024
1 parent d2c968c commit bca8208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neocodeium/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ local function enable_autocmds()

local function utf8_or_latin1()
local encoding = vim.o.fileencoding
return encoding == "utf-8" or encoding == "latin1"
return encoding == "" or encoding == "utf-8" or encoding == "latin1"
end

completer.allowed_encoding = utf8_or_latin1()
Expand Down

0 comments on commit bca8208

Please sign in to comment.