fix(sql): only use cmp if it is available (#4891)
## Description The blink and sql extras are currently conflicting because the sql extra has a hard dependency on nvim-cmp, which is disabled by the blink extra. Introducing a check for cmp in the sql extra resolves this. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: Jakob Pfender <jakob.pfender@safetyio.com>
This commit is contained in:
@ -48,6 +48,7 @@ return {
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = sql_ft,
|
||||
callback = function()
|
||||
if LazyVim.has("cmp") then
|
||||
local cmp = require("cmp")
|
||||
|
||||
-- global sources
|
||||
@ -61,6 +62,7 @@ return {
|
||||
|
||||
-- update sources for the current buffer
|
||||
cmp.setup.buffer({ sources = sources })
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
Reference in New Issue
Block a user