1+ local has_git = vim .fn .executable (" git" ) == 1
2+
13vim .pack .add ({
24 -- optional: provides snippets for the snippet source
35 " https://github.com/rafamadriz/friendly-snippets" ,
@@ -18,7 +20,7 @@ vim.pack.add({
1820 },
1921})
2022
21- require ( " blink.cmp " ). setup ( {
23+ local blink_cmp_opts = {
2224 keymap = {
2325 preset = ' enter' ,
2426 [' <C-x>' ] = { ' show' , ' show_documentation' , ' hide_documentation' },
@@ -46,25 +48,35 @@ require("blink.cmp").setup({
4648 documentation = { auto_show = true },
4749 },
4850
49- })
51+ }
5052
51- require (" blink.pairs" ).setup ({
52- mappings = {
53- enabled = true ,
54- disabled_filetypes = {},
55- pairs = {},
56- },
57- highlights = {
58- enabled = true ,
59- groups = {
60- " RainbowDelimiterRed" ,
61- " RainbowDelimiterYellow" ,
62- " RainbowDelimiterGreen" ,
63- " RainbowDelimiterCyan" ,
64- " RainbowDelimiterBlue" ,
65- " RainbowDelimiterViolet" ,
66- " RainbowDelimiterGreen" ,
53+ if not has_git then
54+ blink_cmp_opts .fuzzy = {
55+ implementation = " lua" ,
56+ }
57+ end
58+
59+ require (" blink.cmp" ).setup (blink_cmp_opts )
60+
61+ if has_git then
62+ require (" blink.pairs" ).setup ({
63+ mappings = {
64+ enabled = true ,
65+ disabled_filetypes = {},
66+ pairs = {},
6767 },
68- },
69- debug = false ,
70- })
68+ highlights = {
69+ enabled = true ,
70+ groups = {
71+ " RainbowDelimiterRed" ,
72+ " RainbowDelimiterYellow" ,
73+ " RainbowDelimiterGreen" ,
74+ " RainbowDelimiterCyan" ,
75+ " RainbowDelimiterBlue" ,
76+ " RainbowDelimiterViolet" ,
77+ " RainbowDelimiterGreen" ,
78+ },
79+ },
80+ debug = false ,
81+ })
82+ end
0 commit comments