diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
| commit | 07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch) | |
| tree | a6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/LunarVim/lua/lvim/lsp/null-ls/code_actions.lua | |
| parent | 6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff) | |
updates
Diffstat (limited to 'mac/.config/LunarVim/lua/lvim/lsp/null-ls/code_actions.lua')
| -rw-r--r-- | mac/.config/LunarVim/lua/lvim/lsp/null-ls/code_actions.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mac/.config/LunarVim/lua/lvim/lsp/null-ls/code_actions.lua b/mac/.config/LunarVim/lua/lvim/lsp/null-ls/code_actions.lua new file mode 100644 index 0000000..50f4cfb --- /dev/null +++ b/mac/.config/LunarVim/lua/lvim/lsp/null-ls/code_actions.lua @@ -0,0 +1,26 @@ +local M = {} + +local Log = require "lvim.core.log" + +local null_ls = require "null-ls" +local services = require "lvim.lsp.null-ls.services" +local method = null_ls.methods.CODE_ACTION + +function M.list_registered(filetype) + local registered_providers = services.list_registered_providers_names(filetype) + return registered_providers[method] or {} +end + +function M.setup(actions_configs) + if vim.tbl_isempty(actions_configs) then + return + end + + local registered = services.register_sources(actions_configs, method) + + if #registered > 0 then + Log:debug("Registered the following action-handlers: " .. unpack(registered)) + end +end + +return M |
