How to setup snippets with kickstart.nvim

Hello, it is my first post here

I am using kickstart.nvim but I can’t figure out how to use snippets with it. I seems like not include a snippet plugin and I am not sure which one is better to use with this setup. unfortunately kickstart don’t have any type of forum to ask about this stuff, hope someone here know about it

Thanks

You might want to try LazyVim, which comes with everything set up for snippets.

Open your .config/nvim/init.lua file provided by KickStart. In neovim you can “e $MYVIMRC”. There’s a section of the configuration that provides snippets but is commented out. Just uncomment the section and restart nvim.

I moved plugin config in separate files and because of that could not find it. In the commented part it says it adds some premade snippets. Is this plugin needed if I just want to add some custom snippets myself instead of using premade ones?

Thanks

I thnk that plugin is only for premade snippets by the plugin creator. How are you creating your own snippets? I’d originally just had a few of my own, e.g.

1 Like

The rafamadriz/friendly-snippets plugin is just a repo for precreated snippets which you can use with LuaSnip (which is configured in kickstarter already). So if you want to create your own snippets you’d want to use them through the LuaSnip plugin. It supports many different snippet styles from vscode style, SnipMate, and using lua to create your snippet.

How you load and add them seems slightly different depending on which style of snippet you want to write. You should read their Readme’s Add Snippet section it talks through how to add custom snippets for each of the different styles with a lot of links to examples. Also TJ DeVries’s Intro Video is excellent as well.