mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 18:31:35 +00:00
lsp: fix toggleFormatOnSave (#869)
Co-authored-by: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Co-authored-by: raf <raf@notashelf.dev>
This commit is contained in:
parent
a1806457ca
commit
09f2e1d524
1 changed files with 4 additions and 4 deletions
|
@ -84,13 +84,13 @@ in {
|
||||||
group = augroup,
|
group = augroup,
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
callback = function()
|
callback = function()
|
||||||
|
if vim.b.disableFormatSave then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
${
|
${
|
||||||
if config.vim.lsp.null-ls.enable
|
if config.vim.lsp.null-ls.enable
|
||||||
then ''
|
then ''
|
||||||
if vim.b.disableFormatSave then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local function is_null_ls_formatting_enabled(bufnr)
|
local function is_null_ls_formatting_enabled(bufnr)
|
||||||
local file_type = vim.api.nvim_buf_get_option(bufnr, "filetype")
|
local file_type = vim.api.nvim_buf_get_option(bufnr, "filetype")
|
||||||
local generators = require("null-ls.generators").get_available(
|
local generators = require("null-ls.generators").get_available(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue