1
0
Fork 0
mirror of https://codeberg.org/Mo8it/dotfiles.git synced 2024-12-29 20:13:43 +00:00

Add hover

This commit is contained in:
Mo8it 2022-04-07 02:24:05 +02:00
parent 5b6cee612c
commit 25f3ffb596

View file

@ -9,6 +9,11 @@ local e_opts = {
expr = true,
}
-- cmd string
local function cmd(command)
return "<cmd>" .. command .. "<CR>"
end
--
map("", "<Space>", "<Nop>", opts)
@ -21,20 +26,26 @@ map("n", "k", "v:count == 0 ? 'gk' : 'k'", e_opts)
--
map("n", "<C-k>", ":BufferLineCycleNext<CR>", opts)
map("n", "<C-j>", ":BufferLineCyclePrev<CR>", opts)
map("n", "<C-k>", cmd("BufferLineCycleNext"), opts)
map("n", "<C-j>", cmd("BufferLineCyclePrev"), opts)
map("n", "<C-b>", ":Neotree<CR>", opts)
map("n", "<C-b>", cmd("Neotree"), opts)
-- Telescope
map("n", "<C-p>", "<cmd>lua require('plugins.telescope').custom_find_files()<CR>", opts)
map("n", "<C-h>", "<cmd>lua require('plugins.telescope').custom_find_hidden_files()<CR>", opts)
map("n", "<C-f>", "<cmd>lua require('telescope.builtin').current_buffer_fuzzy_find()<CR>", opts)
map("n", "<C-p>", cmd("lua require('plugins.telescope').custom_find_files()"), opts)
map("n", "<C-h>", cmd("lua require('plugins.telescope').custom_find_hidden_files()"), opts)
map("n", "<C-f>", cmd("lua require('telescope.builtin').current_buffer_fuzzy_find()"), opts)
--
map("n", "<space>s", "<cmd>lua require('telescope.builtin').lsp_document_symbols()<CR>", opts)
map("n", "<space>f", "<cmd>lua require('telescope.builtin').live_grep()<CR>", opts)
map("n", "<space>d", "<cmd>lua require('telescope.builtin').lsp_definitions()<CR>", opts)
map("n", "<space>r", "<cmd>lua require('telescope.builtin').lsp_references()<CR>", opts)
map("n", "<space>f", cmd("lua require('telescope.builtin').live_grep()"), opts)
map("n", "<space>s", cmd("lua require('telescope.builtin').lsp_document_symbols()"), opts)
map("n", "<space>d", cmd("lua require('telescope.builtin').lsp_definitions()"), opts)
map("n", "<space>r", cmd("lua require('telescope.builtin').lsp_references()"), opts)
-- LSP
map("n", "<space>h", cmd("lua vim.lsp.buf.hover()"), opts)
-- Focus
vim.api.nvim_set_keymap("n", "<C-l>", cmd("lua require('focus').split_cycle()"), opts)
-- hlslens
map("n", "n", [[<Cmd>execute('normal! ' . v:count1 . 'n')<CR><Cmd>lua require('hlslens').start()<CR>]], opts)
@ -48,6 +59,3 @@ map("x", "*", [[*<Cmd>lua require('hlslens').start()<CR>]], opts)
map("x", "#", [[#<Cmd>lua require('hlslens').start()<CR>]], opts)
map("x", "g*", [[g*<Cmd>lua require('hlslens').start()<CR>]], opts)
map("x", "g#", [[g#<Cmd>lua require('hlslens').start()<CR>]], opts)
-- Focus
vim.api.nvim_set_keymap("n", "<C-l>", ":lua require('focus').split_cycle()<CR>", opts)