diff --git a/modules/plugins/lsp/config.nix b/modules/plugins/lsp/config.nix index 3702ac5f..c2320aaf 100644 --- a/modules/plugins/lsp/config.nix +++ b/modules/plugins/lsp/config.nix @@ -84,13 +84,13 @@ in { group = augroup, buffer = bufnr, callback = function() + if vim.b.disableFormatSave then + return + end + ${ if config.vim.lsp.null-ls.enable then '' - if vim.b.disableFormatSave then - return - end - local function is_null_ls_formatting_enabled(bufnr) local file_type = vim.api.nvim_buf_get_option(bufnr, "filetype") local generators = require("null-ls.generators").get_available(