diff --git a/init.lua b/init.lua index f70fd40..6d55f76 100644 --- a/init.lua +++ b/init.lua @@ -154,7 +154,7 @@ vim.api.nvim_create_autocmd('FileType', { pattern = 'cpp', callback = function(data) if data.file:match '%.h$' then - vim.api.nvim_buf_set_option_value(data.buf, 'ft', 'c') + vim.api.nvim_set_option_value('ft', 'c', { buf = data.buf }) end end, }) @@ -772,7 +772,7 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } + local disable_filetypes = { c = true, cpp = true, zig = true } local lsp_format_opt if disable_filetypes[vim.bo[bufnr].filetype] then lsp_format_opt = 'never'