Docs: fix README.md by adding setup for cmp-git (#1914)

This commit is contained in:
Ilan Schemoul 2024-05-08 11:33:32 +02:00 committed by GitHub
parent 8f3c541407
commit cd2cf0c124
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -93,14 +93,16 @@ lua <<EOF
}) })
}) })
-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below
-- Set configuration for specific filetype. -- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', { --[[ cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). { name = 'git' },
}, { }, {
{ name = 'buffer' }, { name = 'buffer' },
}) })
}) })
require("cmp_git").setup() ]]--
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, { cmp.setup.cmdline({ '/', '?' }, {