This commit is contained in:
2026-06-30 15:54:23 +02:00
parent 5eb695beaa
commit 75222a5f85
8 changed files with 126 additions and 92 deletions
+12 -18
View File
@@ -134,23 +134,17 @@ cmp.setup {
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping {
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
}
else
fallback()
end
end,
s = cmp.mapping.confirm { select = true },
c = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
},
["<CR>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm { select = true }
else
fallback()
end
end, { "i", "s" }),
-- ["<CR>"] = cmp.mapping.confirm {
-- behavior = cmp.ConfirmBehavior.Insert,
-- select = true,
-- },
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
@@ -251,7 +245,7 @@ lspconfig("texlab", {
})
lspconfig("qmlls", {
cmd = { "qmlls6" },
cmd = { "qmlls6", "-E" },
filetypes = { "qml" },
single_file_support = true,
root_dir = function(bufnr, on_dir)
+11 -4
View File
@@ -1,7 +1,14 @@
require("telescope").setup ({
require("telescope").setup {
defaults = {
cache_picker = {
num_pickers = -1,
limit_entries = 1000,
ignore_empty_prompt = true,
},
},
pickers = {
colorscheme = {
enable_preview = true,
}
}
})
},
},
}
+30
View File
@@ -0,0 +1,30 @@
local M = {}
local builtin = require "telescope.builtin"
local state = require "telescope.state"
function M.resume_or_start(picker_name, picker_func, opts)
return function()
opts = opts or {}
local cached_pickers = state.get_global_key "cached_pickers" or {}
local picker_index = nil
for i, cached_picker in ipairs(cached_pickers) do
if
cached_picker.prompt_title == (opts.prompt_title or picker_name)
then
picker_index = i
break
end
end
if picker_index then
builtin.resume { cache_index = picker_index }
else
picker_func(opts)
end
end
end
return M
+10 -10
View File
@@ -6,19 +6,19 @@ local function pick(light, dark)
end
local c = {
bg = "#15130F",
bg_alt = "#1D1B17",
bg_mid = pick("#2C2A25", "#221F1A"),
fg = "#E8E2DA",
fg_muted = "#CEC6B5",
bg = "#1D1013",
bg_alt = "#26181B",
bg_mid = pick("#362629", "#2A1C1F"),
fg = "#F7DCE0",
fg_muted = "#E1BEC4",
fg_strong = pick("#15161A", "#F4F4F8"),
normal = "#514209",
insert = "#51482F",
visual = "#35491F",
normal = "#C5205F",
insert = "#7D2842",
visual = "#007837",
replace = "#93000A",
command = pick("#FFE39D", "#AAAF6E"),
inactive = "#1D1B17",
command = pick("#FFDEDD", "#B3A2D5"),
inactive = "#26181B",
normal_fg = pick("#15161A", "#F4F4F8"),
insert_fg = pick("#15161A", "#F4F4F8"),
+3 -1
View File
@@ -1,4 +1,6 @@
local map = vim.keymap.set
local builtin = require "telescope.builtin"
local pickers = require "functions.telescope-pickers"
map("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>")
map("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>")
@@ -39,7 +41,7 @@ map(
map(
"n",
"<leader>g",
require("telescope.builtin").live_grep,
pickers.resume_or_start("Live Grep", builtin.live_grep),
{ desc = "Telescope grep" }
)
map(
+1
View File
@@ -26,6 +26,7 @@ return {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
},
config = function()
require "config.telescope"
+1 -1
View File
@@ -6,6 +6,6 @@ let g:neoformat_enabled_json = ['prettier']
let g:neoformat_enabled_yaml = ['prettier']
let g:neoformat_enabled_lua = ['stylua']
let g:neoformat_enabled_rust = ['rustfmt']
let g:neoformat_enabled_cpp = ['uncrustify']
let g:neoformat_enabled_cpp = ['clangformat']
let g:neoformat_enabled_markdown = ['prettier']
let g:neoformat_enabled_qml = ['qmlformat']