Add noice & statuscol

This commit is contained in:
2024-12-27 20:22:13 +01:00
parent cb178fab05
commit 259a3cd036
4 changed files with 77 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
return {
{
"noice.nvim",
lazy = false,
load = function() end,
opts = {
presets = {
command_palette = true,
},
signature = {
auto_open = {
enabled = false,
},
},
views = {
mini = {
timeout = 5000,
reverse = false,
},
},
routes = {
-- ignore ltex messages
{
filter = {
event = "lsp",
kind = "progress",
cond = function(message)
local client = vim.tbl_get(message.opts, "progress", "client")
return client == "ltex"
end,
},
opts = { skip = true },
},
},
},
after = function(plug)
require("noice").setup(plug.opts)
end,
},
}
+28
View File
@@ -0,0 +1,28 @@
return {
{
"statuscol.nvim",
lazy = false,
load = function() end,
after = function()
local builtin = require("statuscol.builtin")
require("statuscol").setup({
relculright = false,
segments = {
{
sign = {
name = { ".*" },
namespace = { ".*" },
maxwidth = 1,
},
click = "v:lua.ScSa"
},
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa", },
{
sign = { namespace = { "gitsign" }, maxwidth = 1, colwidth = 1 },
click = "v:lua.ScSa"
},
}
})
end
},
}
+6
View File
@@ -27,6 +27,7 @@ vim.opt.breakindent = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.cmdheight = 0
vim.opt.colorcolumn = { 80, 120 }
vim.opt.list = true
vim.opt.listchars = {
@@ -72,6 +73,11 @@ vim.keymap.set("n", "<C-l>", function()
end
vim.cmd.nohlsearch()
vim.cmd.diffupdate()
local ok, noice = pcall(require, "noice")
if ok then
noice.cmd("dismiss")
end
end)
vim.keymap.set({ "i", "s" }, "<C-n>", function()
if vim.snippet.active({ direction = 1 }) then