nvim
This commit is contained in:
		
							parent
							
								
									e7f569e938
								
							
						
					
					
						commit
						7a5bbc1e40
					
				
					 2 changed files with 15 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -4,8 +4,6 @@ if not ok then
 | 
			
		|||
    return
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local nmap = require("my.utils").nmap
 | 
			
		||||
 | 
			
		||||
telescope.setup {
 | 
			
		||||
    extensions = {
 | 
			
		||||
        fzf = {
 | 
			
		||||
| 
						 | 
				
			
			@ -49,10 +47,10 @@ local function dotfiles()
 | 
			
		|||
    }
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
nmap("<C-p>", project, "Find project files")
 | 
			
		||||
nmap("<Leader>fn", dotfiles, "Dotfiles")
 | 
			
		||||
nmap("<Leader><C-p>", builtin.git_files, "Find git files")
 | 
			
		||||
nmap("<Leader>fg", builtin.live_grep, "Live grep")
 | 
			
		||||
nmap("<Leader>gs", builtin.git_status, "Git status")
 | 
			
		||||
 | 
			
		||||
telescope.load_extension("fzf")
 | 
			
		||||
 | 
			
		||||
require("my.keymaps").telescope_keymaps {
 | 
			
		||||
    project = project,
 | 
			
		||||
    dotfiles = dotfiles,
 | 
			
		||||
    builtin = builtin,
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,6 +75,15 @@ local function lsp_keymaps(client, bufnr)
 | 
			
		|||
    end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local function telescope_keymaps(fns)
 | 
			
		||||
    nmap("<C-p>", fns.project, "Find project files")
 | 
			
		||||
    nmap("<Leader>fn", fns.dotfiles, "Dotfiles")
 | 
			
		||||
    nmap("<Leader><C-p>", fns.builtin.git_files, "Find git files")
 | 
			
		||||
    nmap("<Leader>fg", fns.builtin.live_grep, "Live grep")
 | 
			
		||||
    nmap("<Leader>gs", fns.builtin.git_status, "Git status")
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
return {
 | 
			
		||||
    lsp_keymaps = lsp_keymaps,
 | 
			
		||||
    telescope_keymaps = telescope_keymaps,
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue