From 8135fbe32f50b5ba0cfcc52cd39dbc28e30411cf Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 6 Jul 2024 04:24:19 +0200 Subject: [PATCH] =?UTF-8?q?visual=20changes,=20addet=20fancy=20cmd-input?= =?UTF-8?q?=20and=20changed=20some=20of=20the=20notification=20styles..=20?= =?UTF-8?q?Also=20revamped=20lsp=20icons=20to=20match=20notify=20(except?= =?UTF-8?q?=20for=20errors=20-=20I=20like=20to=20shit=20myself=20with=20?= =?UTF-8?q?=EE=BE=83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/pika/core/keymaps.lua | 3 +++ lua/pika/plugins/cmd-line.lua | 41 ++++++++++++++++++++++++++++++ lua/pika/plugins/lsp/lspconfig.lua | 2 +- lua/pika/plugins/notify.lua | 18 ++++++++++++- 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 lua/pika/plugins/cmd-line.lua diff --git a/lua/pika/core/keymaps.lua b/lua/pika/core/keymaps.lua index d64a927..d931f98 100644 --- a/lua/pika/core/keymaps.lua +++ b/lua/pika/core/keymaps.lua @@ -15,6 +15,9 @@ map("n", "", "nohlsearch") map("n", "", "gcc", { desc = "comment toggle", remap = true }) map("v", "", "gc", { desc = "comment toggle", remap = true }) +-- ─< cmd line >──────────────────────────────────────────────────────────────────────── +vim.api.nvim_set_keymap("n", ":", "FineCmdline", { noremap = true }) + -- ─< Terminal >──────────────────────────────────────────────────────────────────────── map("t", "", "", { desc = "terminal escape terminal mode" }) diff --git a/lua/pika/plugins/cmd-line.lua b/lua/pika/plugins/cmd-line.lua new file mode 100644 index 0000000..6f55fdb --- /dev/null +++ b/lua/pika/plugins/cmd-line.lua @@ -0,0 +1,41 @@ +return { + "VonHeikemen/fine-cmdline.nvim", + dependencies = { + { "MunifTanjim/nui.nvim" }, + }, + config = function() + require("fine-cmdline").setup({ + cmdline = { + enable_keymaps = true, + smart_history = true, + prompt = ": ", + }, + popup = { + position = { + row = "10%", + col = "50%", + }, + size = { + width = "60%", + }, + border = { + style = "rounded", + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, + hooks = { + before_mount = function(input) + -- code + end, + after_mount = function(input) + -- code + end, + set_keymaps = function(imap, feedkeys) + -- code + end, + }, + }) + end, +} diff --git a/lua/pika/plugins/lsp/lspconfig.lua b/lua/pika/plugins/lsp/lspconfig.lua index ec439a1..cf60201 100644 --- a/lua/pika/plugins/lsp/lspconfig.lua +++ b/lua/pika/plugins/lsp/lspconfig.lua @@ -50,7 +50,7 @@ return { -- Change the Diagnostic symbols in the sign column (gutter) -- (not in youtube nvim video) - local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } + local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) diff --git a/lua/pika/plugins/notify.lua b/lua/pika/plugins/notify.lua index f42c72d..071424c 100644 --- a/lua/pika/plugins/notify.lua +++ b/lua/pika/plugins/notify.lua @@ -4,9 +4,25 @@ return { require("notify").setup({ stages = "fade_in_slide_out", background_colour = "FloatShadow", + max_width = 60, timeout = 2750, render = "compact", - -- opacity = 75, + -- Minimum/Maximum width for notification windows + minimum_width = 30, + maximum_width = 60, + + -- Function called when a new window is opened, use for changing win settings/config + on_open = nil, + + -- Function called when a window is closed + on_close = nil, + icons = { + ERROR = "", -- alternate symbol  + WARN = "", + INFO = "", + DEBUG = "", + TRACE = "", + }, }) vim.notify = require("notify") end,