From a11a0e6861ec3b490e960104978f96153fedb89c Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Mon, 17 Feb 2025 01:43:25 +0200 Subject: [PATCH] exclude zig from auto format --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'