From c7bcff296431a17cda4093e175da5924172201b4 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 7 Nov 2021 14:34:47 +0100 Subject: remove deprecated adapters and extras modules --- lua/nvim-lsp-installer/adapters/nvim-tree.lua | 26 -------------------- lua/nvim-lsp-installer/extras/tsserver.lua | 34 --------------------------- lua/nvim-lsp-installer/extras/utils.lua | 12 ---------- 3 files changed, 72 deletions(-) delete mode 100644 lua/nvim-lsp-installer/adapters/nvim-tree.lua delete mode 100644 lua/nvim-lsp-installer/extras/tsserver.lua delete mode 100644 lua/nvim-lsp-installer/extras/utils.lua (limited to 'lua') diff --git a/lua/nvim-lsp-installer/adapters/nvim-tree.lua b/lua/nvim-lsp-installer/adapters/nvim-tree.lua deleted file mode 100644 index fa1fdd24..00000000 --- a/lua/nvim-lsp-installer/adapters/nvim-tree.lua +++ /dev/null @@ -1,26 +0,0 @@ -local notify = require "nvim-lsp-installer.notify" -local tsserverExtras = require "nvim-lsp-installer.extras.tsserver" - -notify("nvim-tree adapter has been deprecated. More information: https://git.io/J6San.", vim.log.levels.WARN) - --- @deprecated -local M = {} - --- @deprecated -function M.connect() - local ok, events = pcall(require, "nvim-tree.events") - if not ok then - return notify( - "Unable to import nvim-tree module when connecting nvim-lsp-installer adapter.", - vim.log.levels.ERROR - ) - end - - events.on_node_renamed(function(payload) - -- TODO: not do this when renaming folders - tsserverExtras.rename_file(payload.old_name, payload.new_name) - end) -end - --- @deprecated -return M diff --git a/lua/nvim-lsp-installer/extras/tsserver.lua b/lua/nvim-lsp-installer/extras/tsserver.lua deleted file mode 100644 index 51ba4fc1..00000000 --- a/lua/nvim-lsp-installer/extras/tsserver.lua +++ /dev/null @@ -1,34 +0,0 @@ -local extras = require "nvim-lsp-installer.extras.utils" -local notify = require "nvim-lsp-installer.notify" - -local M = {} - -notify("tsserver extras has been deprecated. More information: https://git.io/J6San.", vim.log.levels.WARN) - --- @deprecated -function M.rename_file(old, new) - local old_uri = vim.uri_from_fname(old) - local new_uri = vim.uri_from_fname(new) - - extras.send_client_request("tsserver", "workspace/executeCommand", { - command = "_typescript.applyRenameFile", - arguments = { - { - sourceUri = old_uri, - targetUri = new_uri, - }, - }, - }) -end - --- @deprecated -function M.organize_imports(bufname) - bufname = bufname or vim.api.nvim_buf_get_name(0) - - extras.send_client_request("tsserver", "workspace/executeCommand", { - command = "_typescript.organizeImports", - arguments = { bufname }, - }) -end - -return M diff --git a/lua/nvim-lsp-installer/extras/utils.lua b/lua/nvim-lsp-installer/extras/utils.lua deleted file mode 100644 index c032b5ac..00000000 --- a/lua/nvim-lsp-installer/extras/utils.lua +++ /dev/null @@ -1,12 +0,0 @@ -local M = {} - --- @deprecated -function M.send_client_request(client_name, ...) - for _, client in pairs(vim.lsp.get_active_clients()) do - if client.name == client_name then - client.request(...) - end - end -end - -return M -- cgit v1.2.3-70-g09d2