v1.3
This commit is contained in:
parent
587bdfbd44
commit
32e42f43f1
3
init.lua
3
init.lua
|
@ -157,6 +157,9 @@ vim.opt.cursorline = true
|
||||||
-- Minimal number of screen lines to keep above and below the cursor.
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
vim.opt.scrolloff = 10
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
|
-- term gui colors for nvim.notify
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
|
|
||||||
|
|
|
@ -6,33 +6,6 @@ return {
|
||||||
-- use opts = {} for passing setup options
|
-- use opts = {} for passing setup options
|
||||||
-- this is equivalent to setup({}) function
|
-- this is equivalent to setup({}) function
|
||||||
},
|
},
|
||||||
-- {
|
|
||||||
-- -- sessions
|
|
||||||
-- 'folke/persistence.nvim',
|
|
||||||
-- event = 'BufReadPre', -- this will only start session saving when an actual file was opened
|
|
||||||
-- opts = {
|
|
||||||
-- -- load the session for the current directory
|
|
||||||
-- vim.keymap.set('n', '<leader>Ss', function()
|
|
||||||
-- require('persistence').load()
|
|
||||||
-- end, { desc = 'Load session from directory' }),
|
|
||||||
--
|
|
||||||
-- -- select a session to load
|
|
||||||
-- vim.keymap.set('n', '<leader>SS', function()
|
|
||||||
-- require('persistence').select()
|
|
||||||
-- end, { desc = 'Select a sesion to load' }),
|
|
||||||
--
|
|
||||||
-- -- load the last session
|
|
||||||
-- vim.keymap.set('n', '<leader>Sl', function()
|
|
||||||
-- require('persistence').load { last = true }
|
|
||||||
-- end, { desc = 'Load the last session' }),
|
|
||||||
--
|
|
||||||
-- -- stop Persistence => session won't be saved on exit
|
|
||||||
-- vim.keymap.set('n', '<leader>Sd', function()
|
|
||||||
-- require('persistence').stop()
|
|
||||||
-- end, { desc = 'Stop Saving sessions' }),
|
|
||||||
-- -- add any custom options here
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
{
|
{
|
||||||
'karb94/neoscroll.nvim',
|
'karb94/neoscroll.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -61,11 +34,17 @@ return {
|
||||||
-- opts = {
|
-- opts = {
|
||||||
config = function()
|
config = function()
|
||||||
local resession = require 'resession'
|
local resession = require 'resession'
|
||||||
|
|
||||||
|
---@diagnostic disable-next-line: missing-parameter
|
||||||
resession.setup()
|
resession.setup()
|
||||||
|
|
||||||
-- Resession does NOTHING automagically, so we have to set up some keymaps
|
-- Resession does NOTHING automagically, so we have to set up some keymaps
|
||||||
vim.keymap.set('n', '<leader>Ss', resession.save, { desc = 'Save Session' })
|
vim.keymap.set('n', '<leader>Ss', resession.save, { desc = 'Save Session' })
|
||||||
vim.keymap.set('n', '<leader>Sl', resession.load, { desc = 'Load Session' })
|
vim.keymap.set('n', '<leader>SL', resession.load, { desc = 'Load Session' })
|
||||||
vim.keymap.set('n', '<leader>Sd', resession.delete, { desc = 'Delete Session' })
|
vim.keymap.set('n', '<leader>Sd', resession.delete, { desc = 'Delete Session' })
|
||||||
|
vim.keymap.set('n', '<leader>Sl', function()
|
||||||
|
require('resession').load 'Last'
|
||||||
|
end, { desc = 'Load last session' })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('VimLeavePre', {
|
vim.api.nvim_create_autocmd('VimLeavePre', {
|
||||||
callback = function()
|
callback = function()
|
||||||
|
@ -76,4 +55,59 @@ return {
|
||||||
end,
|
end,
|
||||||
-- },
|
-- },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'rcarriga/nvim-notify',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/noice.nvim',
|
||||||
|
event = 'VeryLazy',
|
||||||
|
opts = {
|
||||||
|
-- require('notify').setup {
|
||||||
|
-- background_colour = '#000000',
|
||||||
|
-- },
|
||||||
|
-- add any options here
|
||||||
|
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, -- requires hrsh7th/nvim-cmp
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- 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
|
||||||
|
},
|
||||||
|
vim.keymap.set('n', '<leader>nl', function()
|
||||||
|
require('noice').cmd 'last'
|
||||||
|
end, { desc = 'Last Message' }),
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>nd', function()
|
||||||
|
require('noice').cmd 'dismiss'
|
||||||
|
end, { desc = 'Dismiss Message' }),
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>nh', function()
|
||||||
|
require('noice').cmd 'history'
|
||||||
|
end, { desc = 'History' }),
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
|
'MunifTanjim/nui.nvim',
|
||||||
|
-- OPTIONAL:
|
||||||
|
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||||
|
-- If not available, we use `mini` as the fallback
|
||||||
|
'rcarriga/nvim-notify',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('noice').setup {
|
||||||
|
-- Your existing configuration
|
||||||
|
}
|
||||||
|
-- Set the background color for NotifyBackground highlight group
|
||||||
|
vim.cmd [[highlight NotifyBackground guibg=#000000]]
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue