mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 01:38:54 +02:00
fix(haskell): Make Haskell-snippets lazy load for performance (#2676)
* fix(haskell): add filetype to haskell-snippets for lazy load * format haskell.lua --------- Co-authored-by: Uthman Mohamed <83053931+1239uth@users.noreply.github.com>
This commit is contained in:
parent
c0ad2209b6
commit
04bc5718a5
1 changed files with 14 additions and 13 deletions
|
@ -13,14 +13,14 @@ return {
|
||||||
{
|
{
|
||||||
"mrcjkb/haskell-tools.nvim",
|
"mrcjkb/haskell-tools.nvim",
|
||||||
version = "^3",
|
version = "^3",
|
||||||
ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
|
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-telescope/telescope.nvim", optional = true },
|
{ "nvim-telescope/telescope.nvim", optional = true },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local ok, telescope = pcall(require, 'telescope')
|
local ok, telescope = pcall(require, "telescope")
|
||||||
if ok then
|
if ok then
|
||||||
telescope.load_extension('ht')
|
telescope.load_extension("ht")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -51,7 +51,7 @@ return {
|
||||||
"nvim-neotest/neotest",
|
"nvim-neotest/neotest",
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "mrcjkb/neotest-haskell", }
|
{ "mrcjkb/neotest-haskell" },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
adapters = {
|
adapters = {
|
||||||
|
@ -62,23 +62,24 @@ return {
|
||||||
|
|
||||||
{
|
{
|
||||||
"mrcjkb/haskell-snippets.nvim",
|
"mrcjkb/haskell-snippets.nvim",
|
||||||
dependencies = { "L3MON4D3/LuaSnip", },
|
dependencies = { "L3MON4D3/LuaSnip" },
|
||||||
|
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||||
config = function()
|
config = function()
|
||||||
local haskell_snippets = require('haskell-snippets').all
|
local haskell_snippets = require("haskell-snippets").all
|
||||||
require('luasnip').add_snippets('haskell', haskell_snippets, { key = 'haskell' })
|
require("luasnip").add_snippets("haskell", haskell_snippets, { key = "haskell" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"luc-tielen/telescope_hoogle",
|
"luc-tielen/telescope_hoogle",
|
||||||
ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
|
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-telescope/telescope.nvim" },
|
{ "nvim-telescope/telescope.nvim" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local ok, telescope = pcall(require, 'telescope')
|
local ok, telescope = pcall(require, "telescope")
|
||||||
if ok then
|
if ok then
|
||||||
telescope.load_extension('hoogle')
|
telescope.load_extension("hoogle")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue