summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp/null-ls/formatters.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/lsp/null-ls/formatters.lua')
-rw-r--r--.config/nvim/lua/lsp/null-ls/formatters.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/.config/nvim/lua/lsp/null-ls/formatters.lua b/.config/nvim/lua/lsp/null-ls/formatters.lua
index 7bd4dc4..72d622a 100644
--- a/.config/nvim/lua/lsp/null-ls/formatters.lua
+++ b/.config/nvim/lua/lsp/null-ls/formatters.lua
@@ -4,7 +4,13 @@ local null_ls = require "null-ls"
local services = require "lsp.null-ls.services"
local Log = require "core.log"
-local is_registered = require("null-ls.sources").is_registered
+local is_registered = function(name)
+ local query = {
+ name = name,
+ method = require("null-ls").methods.FORMATTING,
+ }
+ return require("null-ls.sources").is_registered(query)
+end
function M.list_registered_providers(filetype)
local null_ls_methods = require "null-ls.methods"