exclude zig from auto format
This commit is contained in:
parent
2661d89ed8
commit
a11a0e6861
4
init.lua
4
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'
|
||||
|
Loading…
Reference in New Issue
Block a user