diff --git a/modules/home/nvim/lazy-lock.json b/modules/home/nvim/lazy-lock.json index 3f10f13..aa1d57c 100644 --- a/modules/home/nvim/lazy-lock.json +++ b/modules/home/nvim/lazy-lock.json @@ -5,6 +5,7 @@ "lazy.nvim": { "branch": "main", "commit": "8077428e63feb0f3bf795d53b23ba1695b28ab0e" }, "lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "245cf1e68840defcc75a16297740f6203f5a045d" }, + "noice.nvim": { "branch": "main", "commit": "d8a1f3056ad713b5d471048f8d029264828e22c0" }, "nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" }, "nvim-lspconfig": { "branch": "master", "commit": "b5db147e28337319331d516a826b00976f3584de" }, "nvim-navic": { "branch": "master", "commit": "7e9d2b2b601149fecdccd11b516acb721e571fe6" }, @@ -17,5 +18,6 @@ "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" }, - "virt-column.nvim": { "branch": "master", "commit": "93b40ea038f676f5a72d7d1f2336fe7b051fc0ce" } + "virt-column.nvim": { "branch": "master", "commit": "93b40ea038f676f5a72d7d1f2336fe7b051fc0ce" }, + "which-key.nvim": { "branch": "main", "commit": "5224c261825263f46f6771f1b644cae33cd06995" } } \ No newline at end of file diff --git a/modules/home/nvim/lua/plugins/line.lua b/modules/home/nvim/lua/plugins/line.lua index b31e66a..ced0a5c 100644 --- a/modules/home/nvim/lua/plugins/line.lua +++ b/modules/home/nvim/lua/plugins/line.lua @@ -3,6 +3,8 @@ return { "nvim-lualine/lualine.nvim", event = "VeryLazy", opts = function() + vim.opt["showmode"] = false + local gps = require("nvim-navic") local toggleterm = { sections = { @@ -85,6 +87,11 @@ return { }, lualine_x = { -- require "dap".status, + { + require("noice").api.statusline.mode.get, + cond = require("noice").api.statusline.mode.has, + color = { fg = "#ff9e64" }, + }, 'fileformat', }, lualine_y = { 'branch', 'progress' }, diff --git a/modules/home/nvim/lua/plugins/settings.lua b/modules/home/nvim/lua/plugins/settings.lua index 98a24f8..4688f16 100644 --- a/modules/home/nvim/lua/plugins/settings.lua +++ b/modules/home/nvim/lua/plugins/settings.lua @@ -12,6 +12,8 @@ return { telescope = true, treesitter = true, neotree = true, + noice = true, + mini = true, harpoon = true, gitsigns = true, semantic_tokens = true, diff --git a/modules/home/nvim/lua/plugins/ui.lua b/modules/home/nvim/lua/plugins/ui.lua index 0994da0..4eb78c6 100644 --- a/modules/home/nvim/lua/plugins/ui.lua +++ b/modules/home/nvim/lua/plugins/ui.lua @@ -27,7 +27,89 @@ return { { "petertriho/nvim-scrollbar", + event = "VeryLazy", -- TODO: Add colors highlights. config = true; }, -} + + { + "folke/noice.nvim", + event = "VeryLazy", + dependencies = { + "MunifTanjim/nui.nvim", + }, + opts = { + presets = { + command_palette = true, + inc_rename = true, + }, + lsp = { + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, + }, + }, + views = { + mini = { + timeout = 5000, + reverse = false, + }, + }, + }, + }, + + { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + plugins = { spelling = true }, + operators = { + gc = "Comments", + ys = "Add Surroundings", + yS = "Add Surroundings", + } + }, + config = function(_, opts) + vim.opt["timeoutlen"] = 500 + + local wk = require("which-key") + wk.setup(opts) + + wk.register({ + gc = { + name = "Comment", + }, + ys = { name = "Add Surroundings" }, + ds = { name = "Delete Surroundings" }, + cs = { name = "Change Surroundings" }, + yS = { name = "Add Surroundings" }, + dS = { name = "Delete Surroundings" }, + cS = { name = "Change Surroundings" }, + }, { + noremap = false, + }) + + wk.register({ + y = { "Yank to system clipboard" }, + Y = { "Yank line to system clipboard" }, + p = { "Past from system clipboard" }, + P = { "Past line from system clipboard" }, + }, { + prefix = "" + }) + + wk.register({ + ["w"] = { "ASToggle", "Toggle autosave" }, + }) + + wk.register({ + mode = { "n", "v" }, + ["g"] = { name = "+goto" }, + ["]"] = { name = "+next" }, + ["["] = { name = "+prev" }, + ["g"] = { name = "+git" }, + }) + end, + }, + }