Skip to content

Commit f0255a6

Browse files
committed
fix(godot): remove quickgd.nvim unless telescope is installed
1 parent 76cbb55 commit f0255a6

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

lua/astrocommunity/pack/godot/init.lua

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,40 @@ return {
2929
}
3030
end,
3131
},
32-
{
33-
"QuickGD/quickgd.nvim",
34-
ft = { "gdshader", "gdshaderinc" },
35-
cmd = { "GodotRun", "GodotRunLast", "GodotStart" },
36-
opts = function(_, opts)
37-
local is_available = require("astrocore").is_available
38-
opts.cmp = is_available "nvim-cmp" or is_available "blink.cmp"
39-
opts.telescope = is_available "telescope.nvim"
40-
opts.treesitter = is_available "nvim-treesitter"
41-
end,
32+
{ -- HACK: bug in quickgd.nvim where telescope is a hard dependency
33+
"nvim-telescope/telescope.nvim",
34+
optional = true,
4235
specs = {
4336
{
44-
"hrsh7th/nvim-cmp",
45-
optional = true,
46-
opts = {
47-
sources = { { name = "quickgd", priority = 750 } },
48-
},
49-
},
50-
{
51-
"Saghen/blink.cmp",
52-
optional = true,
53-
dependencies = "QuickGD/quickgd.nvim",
54-
specs = { "Saghen/blink.compat", version = "*", lazy = true, opts = {} },
55-
opts = {
56-
sources = {
57-
default = { "quickgd" },
58-
providers = {
59-
quickgd = { name = "quickgd", module = "blink.compat.source", score_offset = 1 },
37+
"QuickGD/quickgd.nvim",
38+
ft = { "gdshader", "gdshaderinc" },
39+
cmd = { "GodotRun", "GodotRunLast", "GodotStart" },
40+
opts = function(_, opts)
41+
local is_available = require("astrocore").is_available
42+
opts.cmp = is_available "nvim-cmp" or is_available "blink.cmp"
43+
opts.telescope = is_available "telescope.nvim"
44+
opts.treesitter = is_available "nvim-treesitter"
45+
end,
46+
specs = {
47+
{
48+
"hrsh7th/nvim-cmp",
49+
optional = true,
50+
opts = {
51+
sources = { { name = "quickgd", priority = 750 } },
52+
},
53+
},
54+
{
55+
"Saghen/blink.cmp",
56+
optional = true,
57+
dependencies = "QuickGD/quickgd.nvim",
58+
specs = { "Saghen/blink.compat", version = "*", lazy = true, opts = {} },
59+
opts = {
60+
sources = {
61+
default = { "quickgd" },
62+
providers = {
63+
quickgd = { name = "quickgd", module = "blink.compat.source", score_offset = 1 },
64+
},
65+
},
6066
},
6167
},
6268
},

0 commit comments

Comments
 (0)