mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 15:19:26 +02:00
refactor: remove unused old language configs (#2094)
This commit is contained in:
parent
ccb5a6f060
commit
f1ca79e628
9 changed files with 23 additions and 324 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue