feat: add blink.cmp and disable custom completion pipeline
This commit is contained in:
@@ -6,16 +6,9 @@ local GROUP = vim.api.nvim_create_augroup("ow.lsp.completion", { clear = true })
|
||||
|
||||
local popup = Popup.new()
|
||||
|
||||
local M = {}
|
||||
|
||||
---@param capabilities lsp.ClientCapabilities
|
||||
function M.apply_capabilities(capabilities)
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
end
|
||||
|
||||
---@param client vim.lsp.Client
|
||||
---@param buf integer
|
||||
function M.on_attach(client, buf)
|
||||
local function on_attach(client, buf)
|
||||
if
|
||||
not client:supports_method(
|
||||
vim.lsp.protocol.Methods.textDocument_completion
|
||||
@@ -34,7 +27,29 @@ function M.on_attach(client, buf)
|
||||
})
|
||||
end
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
vim.lsp.config("*", {
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
completion = {
|
||||
completionItem = { snippetSupport = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = GROUP,
|
||||
callback = function(ev)
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
if client then
|
||||
on_attach(client, ev.buf)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("CompleteChanged", {
|
||||
group = GROUP,
|
||||
callback = function(ev)
|
||||
|
||||
Reference in New Issue
Block a user