From 98bb9ad4d4f41cf33269312188073f3cd3a62bdd Mon Sep 17 00:00:00 2001 From: lucy Date: Thu, 4 Jun 2026 13:37:53 +0200 Subject: [PATCH] replace stuff with mini equivalent and move to tinted-nvim --- init.lua | 67 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index e3226e1..cd930a1 100644 --- a/init.lua +++ b/init.lua @@ -1,14 +1,9 @@ local opt = vim.opt - -opt.termguicolors = true opt.relativenumber = true -opt.signcolumn = "yes" vim.lsp.inlay_hint.enable = true opt.tabstop = 8 vim.opt.expandtab = true -vim.g.tinted_background_transparent = 1 opt.swapfile = false - opt.shiftwidth = 8 vim.diagnostic.config({ virtual_text = { @@ -18,20 +13,72 @@ vim.diagnostic.config({ }) -- add plugins vim.pack.add({ - "https://github.com/tinted-theming/tinted-vim", + "https://github.com/tinted-theming/tinted-nvim.git", "https://github.com/neovim/nvim-lspconfig", - "https://github.com/nvim-treesitter/nvim-treesitter", "https://github.com/vyfor/cord.nvim", "https://github.com/nvim-mini/mini.nvim" }) +-- function to set colorsceme +require('tinted-nvim').setup({ + ui = { + transparent = true + }, + highlights = { + overrides = function(palette) + return { + MiniStatuslineModeNormal = { fg = palette.base00, bg = palette.base0D, bold = true }, + MiniStatuslineModeInsert = { fg = palette.base00, bg = palette.base0B, bold = true }, + MiniStatuslineModeVisual = { fg = palette.base00, bg = palette.base0E, bold = true }, + MiniStatuslineModeReplace = { fg = palette.base00, bg = palette.base08, bold = true }, + MiniStatuslineModeCommand = { fg = palette.base00, bg = palette.base0A, bold = true }, + MiniStatuslineModeOther = { fg = palette.base00, bg = palette.base0C, bold = true }, + MiniStatuslineDevinfo = { fg = palette.base05, bg = palette.base02 }, + MiniStatuslineFilename = { fg = palette.base04, bg = palette.base01 }, + MiniStatuslineFileinfo = { fg = palette.base05, bg = palette.base02 }, + MiniStatuslineInactive = { fg = palette.base03, bg = palette.base01 }, + } + end, + } +}) +vim.cmd("colorscheme " .. vim.fn.system("cat /home/lucy/.local/share/tinted-theming/tinty/current_scheme")) -- setup mini require('mini.basics').setup() require('mini.icons').setup() require('mini.pick').setup() +require('mini.git').setup() +require('mini.statusline').setup({ + content = { + active = function() + local function lsp_names() + local clients = vim.lsp.get_clients({ bufnr = 0 }) + if #clients == 0 then + return "" + end --- function to set colorsceme -vim.cmd("colorscheme " .. vim.fn.system("cat /home/lucy/.local/share/tinted-theming/tinty/current_scheme")) + local names = {} + for _, client in ipairs(clients) do + table.insert(names, client.name) + end + return "󰒋 " .. table.concat(names, ", ") + end + local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 }) + local git = MiniStatusline.section_git({ trunc_width = 40 }) + local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 }) + local filename = MiniStatusline.section_filename({ trunc_width = 140 }) + local location = MiniStatusline.section_location({ trunc_width = 10000 }) + return MiniStatusline.combine_groups({ + { hl = mode_hl, strings = { mode } }, + { hl = 'MiniStatuslineDevinfo', strings = { git, diagnostics, filename } }, + '%<', -- Mark general truncate point + '%=', -- End left alignment + { hl = 'MiniStatusLineDevIndo', strings = { lsp_names() } }, + { hl = mode_hl, strings = { location } }, + }) + end + } + +}) -- setup superior lsp vim.lsp.config("qml-language-server", { cmd = { "qml-language-server" }, @@ -78,4 +125,4 @@ end) map("n", "t", " terminal ") map("n", "", "Lspsaga term_toggle") map("t", "", "") -map("i", "", vim.lsp.completion.get, { desc = "trigger autocompletion" }) +map("i", "", "")