updated telescope prompt

This commit is contained in:
Sven Vogel 2024-03-26 11:23:47 +01:00
parent df75ab6508
commit ba78758b9a
5 changed files with 32 additions and 36 deletions

View File

@ -55,6 +55,12 @@ return {
}, },
{ {
{ 'n', 'i' }, '<C-b>', '<cmd>Neotree toggle<CR>', { desc = "Toggle Neotree" } { 'n', 'i' }, '<C-b>', '<cmd>Neotree toggle<CR>', { desc = "Toggle Neotree" }
},
{
{ 'n' }, ':', '<cmd>Telescope cmdline<CR>', { noremap = true, desc = "Open Cmdline" }
},
{
{ 'n' }, '<leader><leader>', '<cmd>Telescope cmdline<CR>', { noremap = true, desc = "Open Cmdline" }
} }
} }

View File

@ -1,25 +0,0 @@
-- Custom keymaps
local map = vim.keymap.set
-- save file on <STRG + S>
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
-- new file
map("n", "<C-t>", "<cmd>enew<cr>", { desc = "New File" })
map({ 'n', 'i' }, '<C-z>', '<cmd>u<CR>') -- undo with STRG + z
map({ 'n', 'i' }, '<C-y>', '<cmd>redo<CR>') -- redo with STRG + y
-- Shift + Tab remove one tab
map({ 'n', 'i' }, '<S-tab>', '<cmd><<CR>')
map({ 'n', 'i' }, '<C-g>', '<cmd>Telescope<CR>', { noremap = true })
-- Scroll sideways with Shift + Scrollwheel like in browsers/other text editors
map({ 'n', 'i' }, '<S-ScrollWheelUp>', '<ScrollWheelLeft>', { noremap = true })
map({ 'n', 'i' }, '<S-ScrollWheelDown>', '<ScrollWheelRight>', { noremap = true })
map({ 'n' }, "q", "<cmd>bd<CR>", { desc = "Close buffer" })

View File

@ -20,13 +20,13 @@ return {
default_hl = { default_hl = {
bg = function(buffer) bg = function(buffer)
if buffer.is_focused then if buffer.is_focused then
return "NeoTreeTabActive" return "BufferCurrent"
end end
return "NeoTreeTabInactive" return "NeoTreeTabInactive"
end, end,
fg = function(buffer) fg = function(buffer)
if buffer.is_focused then if buffer.is_focused then
return "NeoTreeTabActive" return "BufferCurrent"
end end
return "NeoTreeTabInactive" return "NeoTreeTabInactive"
end, end,
@ -186,8 +186,8 @@ return {
vim.cmd("tabnew") vim.cmd("tabnew")
end, 100) end, 100)
end, end,
fg = "NeoTreeTabActive", fg = "BufferCurrent",
bg = "NeoTreeTabActive" bg = "BufferCurrent"
} }
}, },
sidebar = { sidebar = {

View File

@ -4,8 +4,12 @@ return {
dependencies = { dependencies = {
"sharkdp/fd", "sharkdp/fd",
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
'nvim-tree/nvim-web-devicons' 'nvim-tree/nvim-web-devicons',
-- extensionsdiff
'jonarrien/telescope-cmdline.nvim',
"debugloop/telescope-undo.nvim",
}, },
tag = "0.1.6",
opts = { opts = {
defaults = { defaults = {
layout_strategy = "horizontal", layout_strategy = "horizontal",
@ -14,11 +18,22 @@ return {
}, },
sorting_strategy = "ascending", sorting_strategy = "ascending",
winblend = 0, winblend = 0,
theme = "dropdown"
}, },
extensions = { extensions = {
'fzf' cmdline = {
} },
} undo = {
},
},
},
config = function(_, opts)
require('telescope').setup(opts)
require("telescope").load_extension("cmdline")
require("telescope").load_extension("undo")
end
}, },
} }

View File

@ -4,7 +4,7 @@ return {
priority = 1, priority = 1,
opts = { opts = {
style = "dark", style = "dark",
transparent = false, transparent = true,
italic_comments = false italic_comments = false
} }
} }