pojokcodeid.nvim-lazy/lua/user/utils/formatter.lua

17 lines
495 B
Lua
Raw Normal View History

2024-06-29 08:00:30 +07:00
local null_ls = require("null-ls")
2024-05-21 08:33:21 +07:00
local M = {}
M.list_registered = function(filetype)
2024-06-29 08:00:30 +07:00
local method = null_ls.methods.FORMATTING
local registered_providers = require("user.utils.lsp").list_registered_providers_names(filetype)
return registered_providers[method] or {}
2024-05-21 08:33:21 +07:00
end
2024-06-24 15:35:26 +07:00
M.list_registered_all = function()
local registered_providers = require("user.utils.lsp").list_all_registerd()
local method = null_ls.methods.FORMATTING
return registered_providers[method] or {}
end
2024-05-21 08:33:21 +07:00
return M