Some fix nvim config

This commit is contained in:
Buliway 2025-03-09 05:54:05 +03:00
parent 2cc9522c9a
commit 73f309a01d
3 changed files with 16 additions and 1 deletions

View file

@ -146,6 +146,9 @@ Per project можно использовать `.editorconfig` файл в ко
| `st` | `S`earch `T`hemes | health.lua | | `st` | `S`earch `T`hemes | health.lua |
| `q` | Open diagnostic `Q`uicfix list | settings.lua | | `q` | Open diagnostic `Q`uicfix list | settings.lua |
| `f` | `F`ormat buffer | autoformat.lua | | `f` | `F`ormat buffer | autoformat.lua |
| `Sd` | `S`ession `D`elete | session.lua |
| `Sc` | `S`ession `C`reate | session.lua |
| `Backspace` | Session restore | session.lua |
### Git ### Git

View file

@ -95,7 +95,17 @@ require('lazy').setup({
{ {
'Kicamon/markdown-table-mode.nvim', 'Kicamon/markdown-table-mode.nvim',
config = function() config = function()
require('markdown-table-mode').setup() require('markdown-table-mode').setup {
filetype = {
'*.md',
},
options = {
insert = true, -- when typing "|"
insert_leave = true, -- when leaving insert
pad_separator_line = false, -- add space in separator line
alig_style = 'default', -- default, left, center, right
},
}
end, end,
}, },

View file

@ -62,6 +62,7 @@ local function save_session()
end end
vim.api.nvim_create_autocmd('VimLeavePre', { vim.api.nvim_create_autocmd('VimLeavePre', {
desc = 'Auto save session on exit if session exists',
callback = function() callback = function()
if not session_exist() then if not session_exist() then
return -- Do not autosave session if there is no session in the project return -- Do not autosave session if there is no session in the project
@ -94,6 +95,7 @@ vim.api.nvim_create_autocmd('User', {
restore_session() restore_session()
end, 50) end, 50)
end, end,
nested = true,
}) })
vim.keymap.set('n', '<Space><BS>', function() vim.keymap.set('n', '<Space><BS>', function()