refactor: remove unused old language configs (#2094)

This commit is contained in:
kylo252 2021-12-20 08:59:47 +01:00 committed by GitHub
parent ccb5a6f060
commit f1ca79e628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 23 additions and 324 deletions

View file

@ -49,12 +49,15 @@ function M.get_client_capabilities(client_id)
return enabled_caps
end
---Get supported filetypes per server
---@param server_name string can be any server supported by nvim-lsp-installer
---@return table supported filestypes as a list of strings
function M.get_supported_filetypes(server_name)
-- temporary workaround: https://github.com/neovim/nvim-lspconfig/pull/1358
if server_name == "dockerls" then
return { "dockerfile" }
local status_ok, lsp_installer_servers = pcall(require, "nvim-lsp-installer.servers")
if not status_ok then
return {}
end
local lsp_installer_servers = require "nvim-lsp-installer.servers"
local server_available, requested_server = lsp_installer_servers.get_server(server_name)
if not server_available then
return {}
@ -63,4 +66,14 @@ function M.get_supported_filetypes(server_name)
return requested_server:get_supported_filetypes()
end
---Get all supported filetypes by nvim-lsp-installer
---@return table supported filestypes as a list of strings
function M.get_all_supported_filetypes()
local status_ok, lsp_installer_filetypes = pcall(require, "nvim-lsp-installer._generated.filetype_map")
if not status_ok then
return {}
end
return vim.tbl_keys(lsp_installer_filetypes or {})
end
return M