Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnipLua break rule of one file one plugin. #1

Open
xoac opened this issue Dec 15, 2021 · 3 comments
Open

SnipLua break rule of one file one plugin. #1

xoac opened this issue Dec 15, 2021 · 3 comments

Comments

@xoac
Copy link
Owner

xoac commented Dec 15, 2021

LuaSnip is defined in LSP/init.lua but should have a separate file (according to rule one file one plugin):

{
"L3MON4D3/LuaSnip",
requires = {
{ "saadparwaiz1/cmp_luasnip" }, -- Snippets source for nvim-cmp
{ "rafamadriz/friendly-snippets" }, -- Snippets collection for a set of different programming languages for faster development.
},
config = function()
require("luasnip/loaders/from_vscode").lazy_load()
end,
}, -- Snippets plugin

I do not know how to achieve it at this moment since I can call cmp.setup() only once and I want to register snippets with LSP.

@ur4ltz
Copy link

ur4ltz commented Dec 17, 2021

Many plugins are dependent. You will not be able to do what you are going to do.

You have chosen a complex folder layout.

Use something simpler.
lua / plugin /
lua / config /

P.S.
Life is so short to waste on shit!

@ur4ltz
Copy link

ur4ltz commented Dec 17, 2021

{
cmp_luasnip require LuaSnip,
LuaSnip require friendly-snippets
}

@LudoPinelli
Copy link

LudoPinelli commented Jan 1, 2022

Ideally, to follow the rule one plugin one file, lspconfig and cmp should be separated as well but it's very unlikely that you want an lsp without a completion system so it makes sense. I think it's better to break one rule to keep the benefits you're looking for! Similarly, someone working on Neovim who wants to have a snippet engine but no completion system it's probably uncommon.

Many plugins are dependent. You will not be able to do what you are going to do.

You have chosen a complex folder layout.

Use something simpler. lua / plugin / lua / config /

P.S. Life is so short to waste on shit!

I find that this system is on the contrary easier to understand and very clever. It makes maintaining and updating the configuration much simpler than the usual mess where you have to grep things to find every mention of a plugin scattered trhough the all config folder each time you just want to change the setting/disable/uninstall it.
Simplifying the Neovim lua configuration is far to be a "waste on shit" in my opinion (whereas useless comments probably are ;) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants