From 75222a5f85bd0ae759df578b3d81974a40ff9ee2 Mon Sep 17 00:00:00 2001 From: zach Date: Tue, 30 Jun 2026 15:54:23 +0200 Subject: [PATCH] stuff --- colors/zshell.lua | 116 ++++++++++++++-------------- lua/config/lspconfig.lua | 30 +++---- lua/config/telescope.lua | 15 +++- lua/functions/telescope-pickers.lua | 30 +++++++ lua/lualine/themes/zshell.lua | 20 ++--- lua/mappings.lua | 4 +- lua/plugins/init.lua | 1 + lua/plugins/neoformat.vim | 2 +- 8 files changed, 126 insertions(+), 92 deletions(-) create mode 100644 lua/functions/telescope-pickers.lua diff --git a/colors/zshell.lua b/colors/zshell.lua index 1aa5c65..b76b59c 100644 --- a/colors/zshell.lua +++ b/colors/zshell.lua @@ -27,82 +27,82 @@ local function pick(light, dark) end local c = { - bg = "#15130F", - bg_alt = "#1D1B17", - bg_float = "#221F1A", - bg_popup = "#2C2A25", - bg_cursorline = pick("#2C2A25", "#37342F"), - bg_fold = "#1D1B17", - bg_visual = "#51482F", - bg_search = pick("#35491F", "#51482F"), - bg_incsearch = "#514209", - bg_selection = "#514209", - bg_statusline = pick("#2C2A25", "#221F1A"), - bg_statusline_nc = "#1D1B17", - bg_tabline = "#1D1B17", - bg_tabsel = "#2C2A25", + bg = "#1D1013", + bg_alt = "#26181B", + bg_float = "#2A1C1F", + bg_popup = "#362629", + bg_cursorline = pick("#362629", "#413034"), + bg_fold = "#26181B", + bg_visual = "#7D2842", + bg_search = pick("#007837", "#7D2842"), + bg_incsearch = "#C5205F", + bg_selection = "#C5205F", + bg_statusline = pick("#362629", "#2A1C1F"), + bg_statusline_nc = "#26181B", + bg_tabline = "#26181B", + bg_tabsel = "#362629", - fg = "#E8E2DA", - fg_muted = "#CEC6B5", - fg_subtle = "#979081", - fg_comment = pick("#979081", "#4B463A"), + fg = "#F7DCE0", + fg_muted = "#E1BEC4", + fg_subtle = "#A8898E", + fg_comment = pick("#A8898E", "#594045"), fg_strong = pick("#1A1B1F", "#F2F2F7"), fg_on_soft = pick("#17181C", "#F4F4F8"), - border = "#4B463A", - accent = "#DCC580", - accent_container = "#514209", - accent_fg = "#C5AF6D", - accent_solid_fg = "#3C2F00", + border = "#594045", + accent = "#FFB1C2", + accent_container = "#C5205F", + accent_fg = "#FFE0E5", + accent_solid_fg = "#66002B", - secondary = "#D2C6A5", - secondary_container = "#51482F", - secondary_fg = "#C4B897", - secondary_solid_fg = "#373019", + secondary = "#FFB1C2", + secondary_container = "#7D2842", + secondary_fg = "#FF96AF", + secondary_solid_fg = "#5F102C", - tertiary = "#B6CF98", - tertiary_container = "#35491F", - tertiary_fg = "#A0B883", - tertiary_solid_fg = "#23360E", + tertiary = "#79DB8E", + tertiary_container = "#007837", + tertiary_fg = "#99FDAC", + tertiary_solid_fg = "#003917", error = "#FFB4AB", error_container = "#93000A", error_fg = "#FFDAD6", error_solid_fg = "#690005", - ok = "#E8CB46", - warn = "#FFE39D", - info = "#AAAF6E", - hint = "#D6CC72", - add = "#E8CB46", - change = "#AAAF6E", - delete = "#BE8700", + ok = "#FFBBB2", + warn = "#FFDEDD", + info = "#B3A2D5", + hint = "#FFBA93", + add = "#FFBBB2", + change = "#B3A2D5", + delete = "#FF4F7A", - cursor_fg = "#3C2F00", - cursor_bg = "#DCC580", - match_bg = "#35491F", - match_fg = "#A0B883", - todo_bg = "#35491F", - todo_fg = "#A0B883", + cursor_fg = "#66002B", + cursor_bg = "#FFB1C2", + match_bg = "#007837", + match_fg = "#99FDAC", + todo_bg = "#007837", + todo_fg = "#99FDAC", -- Syntax accents must stay dynamic. These come from your generated palette -- instead of fixed hex values, so foregrounds change with the wallpaper too. - code_keyword = "#DB9F46", - code_func = "#D6CC72", - code_string = "#E8CB46", - code_number = "#FFE39D", - code_const = "#BE8700", - code_type = "#DCC580", - code_special = "#B6CF98", - code_preproc = "#D2C6A5", - code_builtin = "#DCC580", - code_param = "#FFE39D", - code_field = "#D2C6A5", - code_namespace = "#B6CF98", - code_operator = pick("#DCC580", "#D2C6A5"), + code_keyword = "#EC8FA9", + code_func = "#FFBA93", + code_string = "#FFBBB2", + code_number = "#FFDEDD", + code_const = "#FF4F7A", + code_type = "#FFB1C2", + code_special = "#79DB8E", + code_preproc = "#FFB1C2", + code_builtin = "#FFB1C2", + code_param = "#FFDEDD", + code_field = "#FFB1C2", + code_namespace = "#79DB8E", + code_operator = pick("#FFB1C2", "#FFB1C2"), line_current = pick("#232428", "#E7E7EC"), - ref_bg = pick("#37342F", "#2C2A25"), + ref_bg = pick("#413034", "#362629"), } -- Core UI ------------------------------------------------------------------- diff --git a/lua/config/lspconfig.lua b/lua/config/lspconfig.lua index fc68cf2..641a3d7 100644 --- a/lua/config/lspconfig.lua +++ b/lua/config/lspconfig.lua @@ -134,23 +134,17 @@ cmp.setup { [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.close(), - [""] = 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, - }, - }, + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.confirm { select = true } + else + fallback() + end + end, { "i", "s" }), + -- [""] = cmp.mapping.confirm { + -- behavior = cmp.ConfirmBehavior.Insert, + -- select = true, + -- }, [""] = 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) diff --git a/lua/config/telescope.lua b/lua/config/telescope.lua index 88766ee..12f1948 100644 --- a/lua/config/telescope.lua +++ b/lua/config/telescope.lua @@ -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, - } - } -}) + }, + }, +} diff --git a/lua/functions/telescope-pickers.lua b/lua/functions/telescope-pickers.lua new file mode 100644 index 0000000..a830fc9 --- /dev/null +++ b/lua/functions/telescope-pickers.lua @@ -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 diff --git a/lua/lualine/themes/zshell.lua b/lua/lualine/themes/zshell.lua index eb83b64..dc7c425 100644 --- a/lua/lualine/themes/zshell.lua +++ b/lua/lualine/themes/zshell.lua @@ -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"), diff --git a/lua/mappings.lua b/lua/mappings.lua index b52bc03..d2ab144 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,4 +1,6 @@ local map = vim.keymap.set +local builtin = require "telescope.builtin" +local pickers = require "functions.telescope-pickers" map("n", "", "BufferLineCycleNext") map("n", "", "BufferLineCyclePrev") @@ -39,7 +41,7 @@ map( map( "n", "g", - require("telescope.builtin").live_grep, + pickers.resume_or_start("Live Grep", builtin.live_grep), { desc = "Telescope grep" } ) map( diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 81c2f14..363e714 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -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" diff --git a/lua/plugins/neoformat.vim b/lua/plugins/neoformat.vim index 9b24ae5..e21751b 100644 --- a/lua/plugins/neoformat.vim +++ b/lua/plugins/neoformat.vim @@ -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']