Merge pull request #302 from mech-a/mech-a-patch-1
change luasnip tab jumping to locally jumpable
This commit is contained in:
		
						commit
						ce2981db4b
					
				
							
								
								
									
										4
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										4
									
								
								init.lua
								
								
								
								
							| 
						 | 
					@ -475,7 +475,7 @@ cmp.setup {
 | 
				
			||||||
    ['<Tab>'] = cmp.mapping(function(fallback)
 | 
					    ['<Tab>'] = cmp.mapping(function(fallback)
 | 
				
			||||||
      if cmp.visible() then
 | 
					      if cmp.visible() then
 | 
				
			||||||
        cmp.select_next_item()
 | 
					        cmp.select_next_item()
 | 
				
			||||||
      elseif luasnip.expand_or_jumpable() then
 | 
					      elseif luasnip.expand_or_locally_jumpable() then
 | 
				
			||||||
        luasnip.expand_or_jump()
 | 
					        luasnip.expand_or_jump()
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
        fallback()
 | 
					        fallback()
 | 
				
			||||||
| 
						 | 
					@ -484,7 +484,7 @@ cmp.setup {
 | 
				
			||||||
    ['<S-Tab>'] = cmp.mapping(function(fallback)
 | 
					    ['<S-Tab>'] = cmp.mapping(function(fallback)
 | 
				
			||||||
      if cmp.visible() then
 | 
					      if cmp.visible() then
 | 
				
			||||||
        cmp.select_prev_item()
 | 
					        cmp.select_prev_item()
 | 
				
			||||||
      elseif luasnip.jumpable(-1) then
 | 
					      elseif luasnip.locally_jumpable(-1) then
 | 
				
			||||||
        luasnip.jump(-1)
 | 
					        luasnip.jump(-1)
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
        fallback()
 | 
					        fallback()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue