91 lines
2.2 KiB
Lua
91 lines
2.2 KiB
Lua
local noice = {
|
|
'folke/noice.nvim',
|
|
dependencies = {
|
|
'MunifTanjim/nui.nvim',
|
|
},
|
|
config = function()
|
|
require('noice').setup({
|
|
cmdline = {
|
|
enable = true,
|
|
format = {
|
|
cmdline = { icon = ':', title = '' },
|
|
search_down = { icon = '/', title = '' },
|
|
search_up = { icon = '?', title = '' },
|
|
}
|
|
},
|
|
messages = { enable = false },
|
|
popmenu = { enable = false },
|
|
notify = { enable = false },
|
|
lsp = {
|
|
progress = { enable = false },
|
|
hover = { enable = false },
|
|
signature = { enable = false },
|
|
message = { enable = false },
|
|
},
|
|
signature = { enabled = false },
|
|
})
|
|
|
|
-- Override highlight groups
|
|
vim.cmd.highlight('NoiceCmdlinePopupBorder', 'guibg=#080808')
|
|
vim.cmd.highlight('link', 'NoiceCmdlinePopupBorder', 'NoiceCmdlinePopupBorderSearch')
|
|
end
|
|
}
|
|
|
|
return {
|
|
-- noice,
|
|
{
|
|
'echasnovski/mini.comment',
|
|
opts = {
|
|
options = {
|
|
ignore_blank_line = true,
|
|
}
|
|
},
|
|
},
|
|
{
|
|
'tpope/vim-unimpaired',
|
|
lazy = false,
|
|
},
|
|
{ 'stevearc/dressing.nvim' },
|
|
{ 'kevinhwang91/nvim-bqf' },
|
|
{
|
|
'vihu/penview.nvim',
|
|
ft = 'markdown',
|
|
cmd = 'MDPreview',
|
|
run = function()
|
|
require("penview.build").install()
|
|
end,
|
|
config = function()
|
|
local penview = require('penview')
|
|
penview.setup({
|
|
browser = 'firefox',
|
|
})
|
|
|
|
-- :MDPreview {start,stop} previewing the current file in the browser
|
|
local commands = { start = 'PenviewStart', stop = 'PenviewStop' }
|
|
local actions = vim.tbl_keys(commands)
|
|
table.sort(actions)
|
|
|
|
vim.api.nvim_create_user_command('MDPreview', function(opts)
|
|
local command = commands[opts.args]
|
|
if not command then
|
|
vim.api.nvim_echo({
|
|
{
|
|
'MDPreview: expected {' .. table.concat(actions, ',') .. '}',
|
|
"ErrorMsg"
|
|
}
|
|
}, true, {})
|
|
return
|
|
end
|
|
vim.cmd(command)
|
|
end, {
|
|
nargs = 1,
|
|
complete = function(lead)
|
|
return vim.tbl_filter(function(action)
|
|
return vim.startswith(action, lead)
|
|
end, actions)
|
|
end,
|
|
})
|
|
end,
|
|
},
|
|
}
|