summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp/null-ls/services.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-05 08:46:35 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-10-05 08:46:35 +0200
commit77cdf208765ad351e48724ed5ad57e55703eca61 (patch)
tree7f19757b255ab66895d9240a5aca77a35cef8aac /.config/nvim/lua/lsp/null-ls/services.lua
parent4fd170aa9d55b7bcd1f0a9445c9e136b560e3220 (diff)
Add major update to LSP from lunarvim
Diffstat (limited to '.config/nvim/lua/lsp/null-ls/services.lua')
-rw-r--r--.config/nvim/lua/lsp/null-ls/services.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/.config/nvim/lua/lsp/null-ls/services.lua b/.config/nvim/lua/lsp/null-ls/services.lua
index a1e3a06..c62fc70 100644
--- a/.config/nvim/lua/lsp/null-ls/services.lua
+++ b/.config/nvim/lua/lsp/null-ls/services.lua
@@ -28,6 +28,7 @@ local local_providers = {
prettier_d_slim = { find = from_node_modules },
eslint_d = { find = from_node_modules },
eslint = { find = from_node_modules },
+ stylelint = { find = from_node_modules },
}
function M.find_command(command)
@@ -44,4 +45,19 @@ function M.find_command(command)
return nil
end
+function M.list_registered_providers_names(filetype)
+ local u = require "null-ls.utils"
+ local c = require "null-ls.config"
+ local registered = {}
+ for method, source in pairs(c.get()._methods) do
+ for name, filetypes in pairs(source) do
+ if u.filetype_matches(filetypes, filetype) then
+ registered[method] = registered[method] or {}
+ table.insert(registered[method], name)
+ end
+ end
+ end
+ return registered
+end
+
return M