From 77cdf208765ad351e48724ed5ad57e55703eca61 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 5 Oct 2021 08:46:35 +0200 Subject: Add major update to LSP from lunarvim --- .config/nvim/lua/lsp/null-ls/services.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.config/nvim/lua/lsp/null-ls/services.lua') 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 -- cgit v1.2.3-70-g09d2