feat(nvim): add noice.nvim

This commit is contained in:
Price Hiller 2022-10-03 18:01:31 -05:00
parent 3b34c24b94
commit a6fa90fc44

View File

@ -37,13 +37,31 @@ return packer.startup({
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
}) })
-- Nvim Notify -- Much nicer ui, integrates cmdheight = 0 wella
use({ use({
"rcarriga/nvim-notify", "folke/noice.nvim",
event = "VimEnter",
config = function() config = function()
require("plugins.configs.nvim-notify") require("plugins.configs.nvim-notify")
require("noice").setup({
cmdline = {
view = "cmdline",
},
routes = {
filter = {
event = "cmdline",
find = "^%s*[/?]",
},
view = "cmdline",
},
})
end, 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 -- Color schemes
@ -204,17 +222,24 @@ return packer.startup({
config = function() config = function()
require("plugins.configs.treesitter") require("plugins.configs.treesitter")
end, end,
before = "folke/noice.nvim",
}) })
use({ use({
"nvim-treesitter/nvim-treesitter-textobjects", "nvim-treesitter/nvim-treesitter-textobjects",
after = "nvim-treesitter", after = { "nvim-treesitter" },
config = function() config = function()
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
textobjects = { textobjects = {
select = { select = {
enable = true, enable = true,
lookahead = true, lookahead = true,
disable = function(lang, bufnr)
local mode = vim.fn.mode()
if mode == "c" then
return true
end
end,
keymaps = { keymaps = {
["af"] = "@function.outer", ["af"] = "@function.outer",
["if"] = "@function.inner", ["if"] = "@function.inner",
@ -226,6 +251,12 @@ return packer.startup({
}, },
move = { move = {
enable = true, enable = true,
disable = function(lang, bufnr)
local mode = vim.fn.mode()
if mode == "c" then
return true
end
end,
set_jumps = true, set_jumps = true,
goto_next_start = { goto_next_start = {
["]fs"] = "@function.outer", ["]fs"] = "@function.outer",