diff options
| author | Vsevolod <kefirchik3@gmail.com> | 2021-10-18 02:13:21 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-17 16:13:21 -0700 |
| commit | a209627886c3edc6926bede732543f9c09aaf22c (patch) | |
| tree | 088da10576a493acb63740a19b1dbd2ce95474e2 /plugin | |
| parent | docs: update CONFIG.md (diff) | |
| download | nvim-lspconfig-a209627886c3edc6926bede732543f9c09aaf22c.tar nvim-lspconfig-a209627886c3edc6926bede732543f9c09aaf22c.tar.gz nvim-lspconfig-a209627886c3edc6926bede732543f9c09aaf22c.tar.bz2 nvim-lspconfig-a209627886c3edc6926bede732543f9c09aaf22c.tar.lz nvim-lspconfig-a209627886c3edc6926bede732543f9c09aaf22c.tar.xz nvim-lspconfig-a209627886c3edc6926bede732543f9c09aaf22c.tar.zst nvim-lspconfig-a209627886c3edc6926bede732543f9c09aaf22c.zip | |
feat: improve interface for `:Lsp*` commands (#1324)
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/lspconfig.vim | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugin/lspconfig.vim b/plugin/lspconfig.vim index a9e947c6..7b7ee55a 100644 --- a/plugin/lspconfig.vim +++ b/plugin/lspconfig.vim @@ -8,11 +8,9 @@ lsp_complete_configured_servers = function() return table.concat(require'lspconfig'.available_servers(), '\n') end lsp_get_active_client_ids = function() - client_ids = {} - for idx, client in ipairs(vim.lsp.get_active_clients()) do - table.insert(client_ids, tostring(client.id)) - end - return client_ids + return vim.tbl_map(function(client) + return ("%d (%s)"):format(client.id, client.name) + end, vim.lsp.get_active_clients()) end require'lspconfig'._root._setup() EOF |
