diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2023-10-12 11:17:16 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2023-10-12 11:17:16 -0400 |
commit | 2b0efdf448f3e8778efa2fe355e9abf495d440c7 (patch) | |
tree | 9f12b82c6252f683369ef25737a648a11690a670 | |
parent | 26070620649e1655f60949da81f8ca399001ca9d (diff) |
Use fzf to generate gitignore
-rw-r--r-- | .gitignore | 47 | ||||
-rw-r--r-- | lua/ben/plugins/gitignore.lua | 18 |
2 files changed, 20 insertions, 45 deletions
@@ -1,5 +1,5 @@ -# Created by https://www.toptal.com/developers/gitignore/api/vim,lua,tags -# Edit at https://www.toptal.com/developers/gitignore?templates=vim,lua,tags +# Created by https://www.toptal.com/developers/gitignore/api/lua +# Edit at https://www.toptal.com/developers/gitignore?templates=lua ### Lua ### # Compiled Lua sources @@ -43,46 +43,3 @@ luac.out *.x86_64 *.hex - -### Tags ### -# Ignore tags created by etags, ctags, gtags (GNU global) and cscope -TAGS -.TAGS -!TAGS/ -tags -.tags -!tags/ -gtags.files -GTAGS -GRTAGS -GPATH -GSYMS -cscope.files -cscope.out -cscope.in.out -cscope.po.out - - -### Vim ### -# Swap -[._]*.s[a-v][a-z] -!*.svg # comment out if you don't need vector files -[._]*.sw[a-p] -[._]s[a-rt-v][a-z] -[._]ss[a-gi-z] -[._]sw[a-p] - -# Session -Session.vim -Sessionx.vim - -# Temporary -.netrwhist -*~ -# Auto-generated tag files -# Persistent undo -[._]*.un~ - -# End of https://www.toptal.com/developers/gitignore/api/vim,lua,tags - -lazy-lock.json diff --git a/lua/ben/plugins/gitignore.lua b/lua/ben/plugins/gitignore.lua new file mode 100644 index 0000000..43ada5a --- /dev/null +++ b/lua/ben/plugins/gitignore.lua @@ -0,0 +1,18 @@ +return { + "theniceboy/fzf-gitignore", + dependencies = { + { + "junegunn/fzf", + build = function() + vim.fn["fzf#install"]() + end, + }, + }, + build = function() + vim.cmd([[UpdateRemotePlugins]]) + end, + filetype = "gitignore", + keys = { + { "<leader>gi", "<cmd>FzfGitignore<cr>" }, + }, +} |