mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-19 00:39:45 +02:00
feat(cmp): add option to disable friendly-snippets (#2660)
authored-by: Emerson Max de Medeiros Silva <emersonmx@gmail.com>
This commit is contained in:
parent
a11c46c29a
commit
7220f1f204
2 changed files with 11 additions and 4 deletions
|
@ -58,19 +58,20 @@ local core_plugins = {
|
|||
end,
|
||||
requires = {
|
||||
"L3MON4D3/LuaSnip",
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
},
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
disable = not lvim.builtin.luasnip.sources.friendly_snippets,
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function()
|
||||
local utils = require "lvim.utils"
|
||||
local paths = {
|
||||
utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets"),
|
||||
}
|
||||
local paths = {}
|
||||
if lvim.builtin.luasnip.sources.friendly_snippets then
|
||||
paths[#paths + 1] = utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets")
|
||||
end
|
||||
local user_snippets = utils.join_paths(get_config_dir(), "snippets")
|
||||
if utils.is_directory(user_snippets) then
|
||||
paths[#paths + 1] = user_snippets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue