Skip to content

Commit bca8208

Browse files
committed
Fix wrong encoding on new file
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.
1 parent d2c968c commit bca8208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/neocodeium/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ local function enable_autocmds()
4848

4949
local function utf8_or_latin1()
5050
local encoding = vim.o.fileencoding
51-
return encoding == "utf-8" or encoding == "latin1"
51+
return encoding == "" or encoding == "utf-8" or encoding == "latin1"
5252
end
5353

5454
completer.allowed_encoding = utf8_or_latin1()

0 commit comments

Comments
 (0)