fix: fix null-ls detection
This commit is contained in:
parent
e0cf9f5cad
commit
0938c972c6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user