2023-10-10 00:25:38 +00:00
|
|
|
local opts = { noremap = true, silent = true }
|
2023-10-10 04:15:27 +00:00
|
|
|
local keymap = vim.keymap.set
|
|
|
|
local builtin = require('telescope.builtin')
|
2023-10-10 14:35:46 +00:00
|
|
|
local Terminal = require('toggleterm.terminal').Terminal
|
|
|
|
local term_float = Terminal:new({ direction = 'float', hidden = 'true' })
|
2023-10-10 00:25:38 +00:00
|
|
|
|
|
|
|
vim.g.mapleader = ' '
|
|
|
|
vim.g.maplocalleader = ' '
|
|
|
|
|
|
|
|
keymap('', '<leader>', '<Nop>', opts)
|
2023-10-10 04:15:27 +00:00
|
|
|
keymap('n', '<leader>e', vim.cmd.NvimTreeToggle)
|
|
|
|
keymap('n', '<leader>m', vim.cmd.Mason)
|
|
|
|
keymap('n', '<leader>h', vim.cmd.noh)
|
|
|
|
keymap('n', '<leader>p', vim.cmd.PlugUpdate)
|
2023-10-10 00:25:38 +00:00
|
|
|
keymap('n', '<leader>ff', builtin.find_files, {})
|
|
|
|
keymap('n', '<leader>fg', builtin.live_grep, {})
|
|
|
|
keymap('n', '<leader>fb', builtin.buffers, {})
|
|
|
|
keymap('n', '<leader>fh', builtin.help_tags, {})
|
|
|
|
keymap('n', '<leader>u', vim.cmd.UndotreeToggle)
|
|
|
|
keymap('n', '<leader>gs', vim.cmd.Git)
|
2023-10-10 04:15:27 +00:00
|
|
|
keymap('n', '<leader>t', function() require('trouble').toggle() end)
|
2023-10-26 14:16:42 +00:00
|
|
|
keymap('', '<A-s>', function() term_float:toggle() end)
|