From ba78758b9a0629b6abe3c77d4772e8659ff9bdf1 Mon Sep 17 00:00:00 2001 From: servostar Date: Tue, 26 Mar 2024 11:23:47 +0100 Subject: [PATCH] updated telescope prompt --- lua/keymap.lua | 6 ++++++ lua/keymaps.lua | 25 ------------------------- lua/plugins/cokeline.lua | 12 ++++++------ lua/plugins/telescope.lua | 23 +++++++++++++++++++---- lua/plugins/vscode-theme.lua | 2 +- 5 files changed, 32 insertions(+), 36 deletions(-) delete mode 100644 lua/keymaps.lua diff --git a/lua/keymap.lua b/lua/keymap.lua index 9691c5b..a5d7ce2 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -55,6 +55,12 @@ return { }, { { 'n', 'i' }, '', 'Neotree toggle', { desc = "Toggle Neotree" } + }, + { + { 'n' }, ':', 'Telescope cmdline', { noremap = true, desc = "Open Cmdline" } + }, + { + { 'n' }, '', 'Telescope cmdline', { noremap = true, desc = "Open Cmdline" } } } diff --git a/lua/keymaps.lua b/lua/keymaps.lua deleted file mode 100644 index b976881..0000000 --- a/lua/keymaps.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Custom keymaps - -local map = vim.keymap.set - --- save file on -map({ "i", "x", "n", "s" }, "", "w", { desc = "Save file" }) - --- new file -map("n", "", "enew", { desc = "New File" }) - -map({ 'n', 'i' }, '', 'u') -- undo with STRG + z -map({ 'n', 'i' }, '', 'redo') -- redo with STRG + y - --- Shift + Tab remove one tab -map({ 'n', 'i' }, '', '<') - -map({ 'n', 'i' }, '', 'Telescope', { noremap = true }) - --- Scroll sideways with Shift + Scrollwheel like in browsers/other text editors -map({ 'n', 'i' }, '', '', { noremap = true }) -map({ 'n', 'i' }, '', '', { noremap = true }) - -map({ 'n' }, "q", "bd", { desc = "Close buffer" }) - - diff --git a/lua/plugins/cokeline.lua b/lua/plugins/cokeline.lua index 34064e6..ba32ea7 100644 --- a/lua/plugins/cokeline.lua +++ b/lua/plugins/cokeline.lua @@ -20,13 +20,13 @@ return { default_hl = { bg = function(buffer) if buffer.is_focused then - return "NeoTreeTabActive" + return "BufferCurrent" end return "NeoTreeTabInactive" end, fg = function(buffer) if buffer.is_focused then - return "NeoTreeTabActive" + return "BufferCurrent" end return "NeoTreeTabInactive" end, @@ -43,7 +43,7 @@ return { fg = function(buffer) return buffer.devicon.color end }, { - text = function(buffer) return ' ' .. buffer.devicon.icon end, + text = function(buffer) return ' ' .. buffer.devicon.icon end, fg = function(buffer) return buffer.devicon.color end, }, { @@ -121,7 +121,7 @@ return { end }, { - text = ' ', + text = ' ', }, { text = function(buffer) @@ -186,8 +186,8 @@ return { vim.cmd("tabnew") end, 100) end, - fg = "NeoTreeTabActive", - bg = "NeoTreeTabActive" + fg = "BufferCurrent", + bg = "BufferCurrent" } }, sidebar = { diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 80d0ab5..d0bca07 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -4,8 +4,12 @@ return { dependencies = { "sharkdp/fd", "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 = { defaults = { layout_strategy = "horizontal", @@ -14,11 +18,22 @@ return { }, sorting_strategy = "ascending", winblend = 0, + theme = "dropdown" }, extensions = { - 'fzf' - } - } + cmdline = { + }, + undo = { + + }, + }, + }, + config = function(_, opts) + require('telescope').setup(opts) + + require("telescope").load_extension("cmdline") + require("telescope").load_extension("undo") + end }, } diff --git a/lua/plugins/vscode-theme.lua b/lua/plugins/vscode-theme.lua index c340379..ce2cfb7 100644 --- a/lua/plugins/vscode-theme.lua +++ b/lua/plugins/vscode-theme.lua @@ -4,7 +4,7 @@ return { priority = 1, opts = { style = "dark", - transparent = false, + transparent = true, italic_comments = false } }