feat: Better provider info and fix LSP deprecated warnings

- Provider priorities can now be configured through `providers.priority`

- Each provider can have a get_status() function that returns a string
  for its status. For LSP it returns the client name.

- :OutlineStatus logic refactored, together with provider checking
  functions in `providers/init.lua`

- Switch from vim.lsp.buf_get_clients to vim.lsp.get_active_clients
  (former was deprecated)

- Fixed a careless mistake from symbols-outline that seems to be an
  unreachable bug (lsp)
This commit is contained in:
hedy
2023-11-16 15:41:37 +08:00
parent 22051b6555
commit 5278eb5b2b
6 changed files with 120 additions and 54 deletions

View File

@@ -1,4 +1,7 @@
local M = {}
local M = {
name = 'coc',
}
function M.should_use_provider(_)
local not_coc_installed = vim.fn.exists '*CocActionAsync' == 0