From 21ac88b9551072f49ba994f461f78794af43a5aa Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Fri, 15 Apr 2022 22:01:02 +0200 Subject: chore!: remove compat module for vim.ui --- lua/nvim-treesitter/configs.lua | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/configs.lua b/lua/nvim-treesitter/configs.lua index d4aa98e89..cc7413560 100644 --- a/lua/nvim-treesitter/configs.lua +++ b/lua/nvim-treesitter/configs.lua @@ -237,29 +237,6 @@ local function config_info(process_function) print(vim.inspect(config, { process = process_function })) end -if not vim.ui then - vim.ui = { - select = function(items, opts, on_choice) - vim.validate { - items = { items, "table", false }, - on_choice = { on_choice, "function", false }, - } - opts = opts or {} - local choices = { opts.prompt or "Select one of:" } - local format_item = opts.format_item or tostring - for i, item in pairs(items) do - table.insert(choices, string.format("%d: %s", i, format_item(item))) - end - local choice = vim.fn.inputlist(choices) - if choice < 1 or choice > #items then - on_choice(nil, nil) - else - on_choice(items[choice], choice) - end - end, - } -end - function M.edit_query_file(query_group, lang) lang = lang or parsers.get_buf_lang() local files = ts_query.get_query_files(lang, query_group, true) -- cgit v1.2.3-70-g09d2