fix: fix null-ls detection

This commit is contained in:
fiplox 2023-04-22 20:25:30 +02:00
parent e0cf9f5cad
commit 0938c972c6
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,6 @@ M.feline_c = {
}
function M.on_attach(client, bufnr)
local has_formatter = #require("null-ls.sources").get_available(ft, "NULL_LS_FORMATTING") > 0
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
if client.name == 'jdt.ls' then
client.server_capabilities.documentFormattingProvider = false
@ -248,6 +247,7 @@ function M.on_attach(client, bufnr)
end
end
local ft = vim.api.nvim_buf_get_option(bufnr, 'filetype')
local has_formatter = require('null-ls.sources').get_available(ft, 'NULL_LS_FORMATTING') > 0
local enable = false
if has_formatter and not client.name == 'clangd' then