Skip to content

Commit

Permalink
feat(noice): add noice
Browse files Browse the repository at this point in the history
  • Loading branch information
realeinherjar committed Sep 6, 2023
1 parent 22bc86e commit 1b2e675
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ require("lazy").setup({
["<leader>g"] = { name = "+git" },
["<leader>h"] = { name = "+hunks" },
["<leader>s"] = { name = "+search" },
["<leader>n"] = { name = "+noice" },
},
},
config = function(_, opts)
Expand Down Expand Up @@ -906,8 +907,43 @@ require("lazy").setup({
},
},
{
"folke/noice.nvim", -- Better UI
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
config = function()
require("telescope").load_extension("noice")
require("noice").setup({
lsp = {
-- override markdown rendering so that cmp and other plugins use Treesitter
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
bottom_search = false, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = true, -- add a border to hover docs and signature help
},
})
end,
-- stylua: ignore
keys = {
{ "<leader>sn", "<CMD>Telescope noice<CR>", desc = "[N]oice" },
{ "<leader>nl", function() require("noice").cmd("last") end, desc = "[L]ast Message" },
{ "<leader>nh", function() require("noice").cmd("history") end, desc = "[H]istory" },
{ "<leader>na", function() require("noice").cmd("all") end, desc = "[A]ll" },
{ "<leader>nd", function() require("noice").cmd("dismiss") end, desc = "[D]ismiss All" },
{ "<C-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll [F]orward", mode = {"i", "n", "s"} },
{ "<C-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll [B]ackward", mode = {"i", "n", "s"}},
},
},
{
"folke/flash.nvim", -- Amazing movements
event = "VeryLazy",
Expand Down
2 changes: 1 addition & 1 deletion tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ set-option -g prefix C-a
bind-key C-a send-prefix

# C-b to server prefix in nested tmux stuff
bind-key -n C-b send-prefix
# bind-key -n C-b send-prefix

# New windows and panes are in current path
bind c new-window -c "#{pane_current_path}"
Expand Down

0 comments on commit 1b2e675

Please sign in to comment.