diff options
| author | William Boman <william@redwill.se> | 2021-11-07 14:34:47 +0100 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2021-11-07 14:34:47 +0100 |
| commit | c7bcff296431a17cda4093e175da5924172201b4 (patch) | |
| tree | 0d1e0d0af71884f50ba801a6a7bcc6918f47baa1 | |
| parent | add language aliases to :LspInstall (#232) (diff) | |
| download | mason-c7bcff296431a17cda4093e175da5924172201b4.tar mason-c7bcff296431a17cda4093e175da5924172201b4.tar.gz mason-c7bcff296431a17cda4093e175da5924172201b4.tar.bz2 mason-c7bcff296431a17cda4093e175da5924172201b4.tar.lz mason-c7bcff296431a17cda4093e175da5924172201b4.tar.xz mason-c7bcff296431a17cda4093e175da5924172201b4.tar.zst mason-c7bcff296431a17cda4093e175da5924172201b4.zip | |
remove deprecated adapters and extras modules
| -rw-r--r-- | lua/nvim-lsp-installer/adapters/nvim-tree.lua | 26 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/extras/tsserver.lua | 34 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/extras/utils.lua | 12 |
3 files changed, 0 insertions, 72 deletions
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 |
