From a6fa90fc44cd55785b2d8f2e262c176ee7ce157e Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 3 Oct 2022 18:01:31 -0500 Subject: [PATCH] feat(nvim): add noice.nvim --- .../primary/config/lua/plugins/plugins.lua | 39 +++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua b/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua index 900a8e54..0aaaf920 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/plugins.lua @@ -37,13 +37,31 @@ return packer.startup({ "nvim-lua/plenary.nvim", }) - -- Nvim Notify + -- Much nicer ui, integrates cmdheight = 0 wella use({ - "rcarriga/nvim-notify", + "folke/noice.nvim", + event = "VimEnter", config = function() require("plugins.configs.nvim-notify") + require("noice").setup({ + cmdline = { + view = "cmdline", + }, + routes = { + filter = { + event = "cmdline", + find = "^%s*[/?]", + }, + view = "cmdline", + }, + }) end, - before = "neovim/nvim-lspconfig", + requires = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + "rcarriga/nvim-notify", + "hrsh7th/nvim-cmp", + }, }) -- Color schemes @@ -204,17 +222,24 @@ return packer.startup({ config = function() require("plugins.configs.treesitter") end, + before = "folke/noice.nvim", }) use({ "nvim-treesitter/nvim-treesitter-textobjects", - after = "nvim-treesitter", + after = { "nvim-treesitter" }, config = function() require("nvim-treesitter.configs").setup({ textobjects = { select = { enable = true, lookahead = true, + disable = function(lang, bufnr) + local mode = vim.fn.mode() + if mode == "c" then + return true + end + end, keymaps = { ["af"] = "@function.outer", ["if"] = "@function.inner", @@ -226,6 +251,12 @@ return packer.startup({ }, move = { enable = true, + disable = function(lang, bufnr) + local mode = vim.fn.mode() + if mode == "c" then + return true + end + end, set_jumps = true, goto_next_start = { ["]fs"] = "@function.outer",