Skip to content

Commit

Permalink
fix(haskell): don't use astrocore in enabled function
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed May 2, 2024
1 parent 6697927 commit 804a1af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/astrocommunity/pack/haskell/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
local is_available = function(plugin)
local lazy_config_avail, lazy_config = pcall(require, "lazy.core.config")
return (lazy_config_avail and lazy_config.spec.plugins[plugin] or nil) ~= nil
end
local haskell_ft = { "haskell", "lhaskell", "cabal", "cabalproject" }

return {
Expand Down Expand Up @@ -66,7 +70,7 @@ return {
},
{
"mrcjkb/haskell-snippets.nvim",
enabled = function() return require("astrocore").is_available "LuaSnip" end,
enabled = function() return is_available "LuaSnip" end,
ft = haskell_ft,
dependencies = { "L3MON4D3/LuaSnip" },
config = function()
Expand All @@ -76,7 +80,7 @@ return {
},
{
"luc-tielen/telescope_hoogle",
enabled = function() return require("astrocore").is_available "telescope.nvim" end,
enabled = function() return is_available "telescope.nvim" end,
ft = haskell_ft,
dependencies = {
{ "nvim-telescope/telescope.nvim" },
Expand Down

0 comments on commit 804a1af

Please sign in to comment.