Skip to content

Commit e931a8c

Browse files
committed
Update : Customized Telescope
1 parent 6166b64 commit e931a8c

6 files changed

Lines changed: 121 additions & 10 deletions

File tree

init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ require("lazy").setup({
6464
require("plugins.spotify"),
6565
-- require("plugins.lsp_lens"),
6666
require("plugins.ThemeHub"),
67-
require("plugins.topbar"),
67+
-- require("plugins.topbar"),
6868
require("plugins.todo_comments"),
6969
require("plugins.mdx"),
7070
require("plugins.inline"),
7171
require("plugins.git"),
7272
require("plugins.gitlink"),
7373
require("plugins.chatbot"),
74+
require("plugins.rovo-dev"),
7475

7576
ui = {
7677
-- If you are using a Nerd Font: set icons to an empty table which will use the

lazy-lock.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
5050
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
5151
"render-markdown.nvim": { "branch": "main", "commit": "bfd67f1402b97ac619cb538f4bbaed12a7fa89aa" },
52+
"rovo-dev.nvim": { "branch": "main", "commit": "a85d9c8c113323998bb09eb30f42fd6cb93da89c" },
5253
"smm.nvim": { "branch": "master", "commit": "049daa49fb9a81ab833c0865d9ea50468cff0098" },
5354
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
54-
"tabby.nvim": { "branch": "main", "commit": "b3affa6db7eab80fca2a2db5b73b473144507039" },
5555
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
5656
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
5757
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
@@ -61,7 +61,6 @@
6161
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
6262
"tokyonight.nvim": { "branch": "main", "commit": "4fe1b0c44f5d6ee769cdfbdffc7ccb703f53feda" },
6363
"typr": { "branch": "main", "commit": "bdd9ef7143702851edd1dac85101e0a537056d2f" },
64-
"vim-tpipeline": { "branch": "master", "commit": "bc6dfc10e26a8dd1ec2f0512050a8a0afaa9d090" },
6564
"vimtex": { "branch": "master", "commit": "be9deac3a23eeb145ccf11dd09080795838496ce" },
6665
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
6766
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" },

lua/plugins/color_scheme.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ return {
77
config = function()
88
require("kanagawa").setup({
99
transparent = false,
10+
integrations = {
11+
treesitter = true,
12+
telescope = { enabled = true },
13+
-- This will make your Telescope look even better automatically
14+
},
1015
colors = {
1116
theme = {
1217
all = {
@@ -19,9 +24,8 @@ return {
1924
overrides = function(colors)
2025
local theme = colors.theme
2126
return {
22-
LineNr = { fg = theme.ui.nontext, bg = "NONE" }, -- Line numbers transparent
23-
CursorLineNr = { fg = theme.diag.warning, bold = true, bg = "NONE" }, -- Current line number transparent
24-
SignColumn = { bg = "NONE" }, -- Sign column transparent
27+
LineNr = { fg = theme.ui.nontext }, -- Line numbers
28+
CursorLineNr = { fg = theme.diag.warning, bold = true }, -- Current line number
2529
}
2630
end,
2731
})

lua/plugins/rovo-dev.lua

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
return {
2+
{
3+
"atlassian-labs/rovo-dev.nvim",
4+
opts = {
5+
terminal = {
6+
cmd = { "acli", "rovodev", "run" },
7+
side = "right",
8+
width = 0.33, -- ratio of total columns when 0<width<1, else fixed cols
9+
},
10+
file_refresh = {
11+
enable = true,
12+
refresh_on_terminal_output = true,
13+
refresh_debounce_ms = 200,
14+
},
15+
keymaps = {
16+
toggle = {
17+
normal = "<C-,>",
18+
terminal = "<C-,>",
19+
},
20+
run = {
21+
restore = "<leader>rR",
22+
verbose = "<leader>rV",
23+
shadow = "<leader>rS",
24+
yolo = "<leader>rY",
25+
},
26+
},
27+
window = { number = false, signcolumn = "no", winfixwidth = true },
28+
},
29+
},
30+
}

lua/plugins/telescope.lua

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,97 @@ return { -- Fuzzy Finder (files, lsp, etc)
5959
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
6060
-- },
6161
-- },
62-
-- pickers = {}
62+
defaults = {
63+
prompt_prefix = "",
64+
selection_caret = "",
65+
entry_prefix = " ",
66+
initial_mode = "insert",
67+
selection_strategy = "reset",
68+
sorting_strategy = "ascending",
69+
layout_strategy = "horizontal",
70+
layout_config = {
71+
horizontal = {
72+
prompt_position = "top",
73+
width = 0.9,
74+
height = 0.8,
75+
preview_width = 0.6,
76+
},
77+
},
78+
borderchars = { "", "", "", "", "", "", "", "" },
79+
80+
path_display = { "tail" },
81+
get_status_text = function()
82+
return ""
83+
end,
84+
},
85+
pickers = {
86+
buffers = {
87+
show_all_buffers = true,
88+
sort_lastused = true,
89+
entry_maker = function(entry)
90+
local make_entry = require("telescope.make_entry")
91+
local displayer = require("telescope.pickers.entry_display").create({
92+
separator = " ",
93+
items = {
94+
{ width = 2 },
95+
{ remaining = true },
96+
},
97+
})
98+
99+
local original_entry = make_entry.gen_from_buffer({})(entry)
100+
original_entry.display = function(ent)
101+
local icon, icon_hl = require("nvim-web-devicons").get_icon(
102+
ent.filename,
103+
string.match(ent.filename, "%a+$"),
104+
{ default = true }
105+
)
106+
return displayer({
107+
{ icon, icon_hl },
108+
{ ent.filename, "TelescopeFileName" },
109+
})
110+
end
111+
return original_entry
112+
end,
113+
},
114+
oldfiles = {
115+
path_display = { "tail" },
116+
},
117+
},
63118
extensions = {
64119
["ui-select"] = {
65120
require("telescope.themes").get_dropdown(),
66121
},
67122
},
68123
})
69124

70-
-- Enable Telescope extensions if they are installed
125+
local purple = "#bd93f9"
126+
local bg_dark = "#1e1e2e"
127+
local selection_bg = "#3d375e"
128+
local pink = "#ff79c6"
129+
local green = "#50fa7b"
130+
131+
local hl = vim.api.nvim_set_hl
132+
133+
hl(0, "TelescopeBorder", { fg = pink })
134+
hl(0, "TelescopePromptBorder", { fg = pink })
135+
hl(0, "TelescopeResultsBorder", { fg = pink })
136+
hl(0, "TelescopePreviewBorder", { fg = pink })
137+
138+
hl(0, "TelescopePromptTitle", { fg = bg_dark, bg = purple, bold = true })
139+
hl(0, "TelescopeResultsTitle", { fg = bg_dark, bg = pink, bold = true }) -- Pink for Results
140+
hl(0, "TelescopePreviewTitle", { fg = bg_dark, bg = green, bold = true }) -- Green for Preview
141+
142+
hl(0, "TelescopeSelection", { bg = selection_bg, fg = "#ffffff", bold = true })
143+
hl(0, "TelescopeMatching", { fg = pink, bold = true })
144+
hl(0, "TelescopePromptPrefix", { fg = purple })
145+
hl(0, "TelescopeFileName", { fg = "#ffffff" })
146+
147+
hl(0, "TelescopeResultsNumber", { fg = bg_dark })
148+
hl(0, "TelescopeResultsSpecialComment", { fg = bg_dark })
149+
71150
pcall(require("telescope").load_extension, "fzf")
72151
pcall(require("telescope").load_extension, "ui-select")
73152

74-
-- See `:help telescope.builtin`
75153
local builtin = require("telescope.builtin")
76154

77155
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "󰋖 search help" })

lua/plugins/treesitter.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ return { -- Highlight, edit, and navigate code
3030
indent = { enable = true, disable = { "ruby" } },
3131
},
3232
}
33-

0 commit comments

Comments
 (0)