Add noice.lua

This commit is contained in:
Loïc Gremaud 2024-02-26 23:52:46 +01:00
parent fe912ab5fb
commit a62a601e1f
3 changed files with 62 additions and 2 deletions

View File

@ -95,6 +95,7 @@ M.customstuffs = {
["<leader>ra"] = { "<cmd> call VrcQuery()<CR>", "Call REST endpoint" }, ["<leader>ra"] = { "<cmd> call VrcQuery()<CR>", "Call REST endpoint" },
["<leader>dl"] = { "0d$", "Delete line from start" }, ["<leader>dl"] = { "0d$", "Delete line from start" },
["<leader>gp"] = { "<cmd> Git pull<CR>", "Git pull" }, ["<leader>gp"] = { "<cmd> Git pull<CR>", "Git pull" },
["<leader>ga"] = { ":Git commit -a --amend --no-edit --no-verify", "Git commit -a --amend --no-edit --no-verify" },
["<leader>gnb"] = { ":Git checkout -b ", "Checkout to a new branch" }, ["<leader>gnb"] = { ":Git checkout -b ", "Checkout to a new branch" },
["<leader>gri"] = { ":Git rebase -i HEAD~", "Git rebase interactive from HEAD" }, ["<leader>gri"] = { ":Git rebase -i HEAD~", "Git rebase interactive from HEAD" },
["<leader>mkd"] = { "<cmd>lua vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {})<CR>", "Open markdown preview" }, ["<leader>mkd"] = { "<cmd>lua vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {})<CR>", "Open markdown preview" },
@ -112,8 +113,8 @@ M.customstuffs = {
-- Mappings: TODO -- Mappings: TODO
-- "trim(system('git branch --show-current 2>/dev/null'))" -- "trim(system('git branch --show-current 2>/dev/null'))"
-- ["<leader>tt"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO-' . trim(system('git branch --show-current 2>/dev/null')) . ': ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" }, -- ["<leader>ct"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO-' . trim(system('git branch --show-current 2>/dev/null')) . ': ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
["<leader>tt"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO: ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" }, ["<leader>ct"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO: ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
["<leader>ww"] = { ":lua require('nvim-window').pick()<CR>", "Pick window to goto" }, ["<leader>ww"] = { ":lua require('nvim-window').pick()<CR>", "Pick window to goto" },
["<leader>wm"] = { ":WinShift<CR>", "Enter move window mode" }, ["<leader>wm"] = { ":WinShift<CR>", "Enter move window mode" },
@ -381,6 +382,8 @@ M.telescope = {
-- Diaglist: LSP diagnostics in quick/loc list -- Diaglist: LSP diagnostics in quick/loc list
["<leader>dw"] = { "<cmd>lua require('diaglist').open_all_diagnostics()<CR>", "Open all open buffers diagnostics in quickfix list" }, ["<leader>dw"] = { "<cmd>lua require('diaglist').open_all_diagnostics()<CR>", "Open all open buffers diagnostics in quickfix list" },
["<leader>d0"] = { "<cmd>lua require('diaglist').open_buffer_diagnostics()<CR>", "Open current buffer diagnostics in loclist list" }, ["<leader>d0"] = { "<cmd>lua require('diaglist').open_buffer_diagnostics()<CR>", "Open current buffer diagnostics in loclist list" },
["<leader>;"] = { "<cmd> Telescope <CR>", "Open Telescope" },
}, },
} }

View File

@ -0,0 +1,46 @@
local M = {
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,
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- 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 = false, -- add a border to hover docs and signature help
},
views = {
cmdline_popup = {
-- border = {
-- style = "none",
-- padding = { 2, 3 },
-- },
-- position = {
-- row = "85%",
-- col = "50%",
-- },
size = {
width = 120,
height = "auto",
},
},
popupmenu = {
-- relative = "editor",
-- position = {
-- row = 25,
-- col = "50%",
-- },
size = {
width = 120,
-- height = 10,
}
}
},
}
return M

View File

@ -403,6 +403,17 @@ local default_plugins = {
branch = "harpoon2", branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" } dependencies = { "nvim-lua/plenary.nvim" }
}, },
{
"folke/noice.nvim",
event = "VeryLazy",
opts = function()
return require "plugins.configs.noice"
end,
dependencies = {
"MunifTanjim/nui.nvim",
-- "rcarriga/nvim-notify",
},
}
} }
local config = require("core.utils").load_config() local config = require("core.utils").load_config()