Init commit
This commit is contained in:
45
default/index.norg
Normal file
45
default/index.norg
Normal file
@@ -0,0 +1,45 @@
|
||||
.toc Оглавление
|
||||
|
||||
* First line
|
||||
** Second line
|
||||
*** hello
|
||||
|
||||
* one layer
|
||||
** Two
|
||||
*** Three
|
||||
**** Four
|
||||
Some text
|
||||
|
||||
* Other content
|
||||
|
||||
{:some-file:}[some file]
|
||||
|
||||
{file:///home/fox/Pictures/arch.png}[arch]
|
||||
|
||||
- ( ) first
|
||||
-- ( ) Second
|
||||
- (x) Third
|
||||
|
||||
- ( ) Two
|
||||
-- (-) aa
|
||||
-- (=) bb
|
||||
-- (!) cc
|
||||
--- (_) dddd
|
||||
|
||||
{https://github.com}[Github]
|
||||
|
||||
@code norg
|
||||
|
||||
This is *bold*.
|
||||
This is /italic/.
|
||||
This is _underline_.
|
||||
This is -strikethrough-.
|
||||
This is a spoiler: !org-mode is a bozo!, to see the content you either enter insert mode on this line (good luck) or toggle the concealer off.
|
||||
This is a `verbatim object, you can't put *markup* in here!`.
|
||||
@end
|
||||
|
||||
-------
|
||||
This is a spoiler !hello in neorg file!
|
||||
/hello/ `another` *text*
|
||||
|
||||
|
||||
14
default/journal/2025/07/21.norg
Normal file
14
default/journal/2025/07/21.norg
Normal file
@@ -0,0 +1,14 @@
|
||||
@document.meta
|
||||
title: 21
|
||||
description:
|
||||
authors: fox
|
||||
categories: [
|
||||
test
|
||||
other
|
||||
]
|
||||
created: 2025-07-24T03:04:53+0400
|
||||
updated: 2025-07-24T03:05:37+0400
|
||||
version: 1.1.1
|
||||
@end
|
||||
|
||||
* Файл из прошлого
|
||||
111
default/journal/2025/07/24.norg
Normal file
111
default/journal/2025/07/24.norg
Normal file
@@ -0,0 +1,111 @@
|
||||
@document.meta
|
||||
title: 24
|
||||
description:
|
||||
authors: fox
|
||||
categories: [
|
||||
linux
|
||||
neovim
|
||||
plugins
|
||||
]
|
||||
created: 2025-07-24T02:02:24+0400
|
||||
updated: 2025-07-24T02:50:21+0400
|
||||
version: 1.1.1
|
||||
@end
|
||||
|
||||
* Проблема
|
||||
В Neovim на больших файлах перестают работать биндинги gg и G. Курсор прыгает на строчку или две вверх и вниз - соответственно.
|
||||
|
||||
* Решение
|
||||
|
||||
Отлично! Проблема в `snacks.nvim` с включенным модулем `scroll`. Этот модуль перехватывает стандартные биндинги для навигации.
|
||||
|
||||
* Решение 1
|
||||
- Отключить scroll модуль:
|
||||
@code lua
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
dashboard = { enabled = true },
|
||||
explorer = { enabled = true },
|
||||
indent = { enabled = true },
|
||||
input = { enabled = true },
|
||||
notifier = {
|
||||
enabled = true,
|
||||
timeout = 3000,
|
||||
},
|
||||
picker = { enabled = true, debug = { scores = true } },
|
||||
quickfile = { enabled = true },
|
||||
scope = { enabled = true },
|
||||
scroll = { enabled = false }, -- Отключаем scroll модуль
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
styles = {
|
||||
notification = {
|
||||
-- wo = { wrap = true }
|
||||
},
|
||||
},
|
||||
},
|
||||
-- остальные keys остаются без изменений
|
||||
}
|
||||
@end
|
||||
|
||||
* Решение 2
|
||||
- Настроить scroll модуль, чтобы он не перехватывал gg и G:
|
||||
@code lua
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
-- ... остальные настройки
|
||||
scroll = {
|
||||
enabled = true,
|
||||
-- Отключаем перехват стандартных биндингов
|
||||
animate = {
|
||||
duration = { step = 15, total = 250 },
|
||||
easing = "linear",
|
||||
},
|
||||
-- Не перехватываем gg и G
|
||||
spamming = 10, -- reduce scroll spam
|
||||
-- Можно также попробовать добавить:
|
||||
-- filter = function(buf, win) return true end,
|
||||
},
|
||||
-- ... остальные настройки
|
||||
},
|
||||
-- keys остаются такими же
|
||||
}
|
||||
@end
|
||||
|
||||
* Решение 3
|
||||
- Восстановить биндинги после загрузки snacks:
|
||||
Добавьте в конец конфигурации snacks или в отдельный файл:
|
||||
@code lua
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
-- ... ваша текущая конфигурация
|
||||
config = function(_, opts)
|
||||
require("snacks").setup(opts)
|
||||
|
||||
-- Восстанавливаем стандартные биндинги после инициализации
|
||||
vim.defer_fn(function()
|
||||
vim.keymap.set("n", "gg", function()
|
||||
vim.api.nvim_win_set_cursor(0, {1, 0})
|
||||
end, { desc = "Go to first line", silent = true })
|
||||
|
||||
vim.keymap.set("n", "G", function()
|
||||
local line_count = vim.api.nvim_buf_line_count(0)
|
||||
vim.api.nvim_win_set_cursor(0, {line_count, 0})
|
||||
end, { desc = "Go to last line", silent = true })
|
||||
end, 100)
|
||||
end,
|
||||
}
|
||||
@end
|
||||
|
||||
** Рекомендую попробовать {* Решение 1} - просто отключить scroll модуль, если вам не критичен smooth scrolling. Если хотите сохранить плавную прокрутку, используйте {* Решение 3}.
|
||||
|
||||
После изменения конфигурации перезапустите Neovim, и gg/G должны работать как положено.
|
||||
18
default/trouble_cursor.norg
Normal file
18
default/trouble_cursor.norg
Normal file
@@ -0,0 +1,18 @@
|
||||
@document.meta
|
||||
title: trouble_cursor
|
||||
description:
|
||||
authors: fox
|
||||
categories: [
|
||||
linux
|
||||
neovim
|
||||
]
|
||||
created: 2025-07-25T14:35:02+0400
|
||||
updated: 2025-07-25T14:37:52+0400
|
||||
version: 1.1.1
|
||||
@end
|
||||
|
||||
* Проблема на переходах к 1 и последней строке файла
|
||||
|
||||
* Решение:
|
||||
|
||||
Отключить scroll в настройках плагина Snacks
|
||||
13
index.norg
Normal file
13
index.norg
Normal file
@@ -0,0 +1,13 @@
|
||||
* Index
|
||||
** Linux
|
||||
- {:$/journal/2025/07/24:}[24]
|
||||
** Neovim
|
||||
- {:$/journal/2025/07/24:}[24]
|
||||
** Other
|
||||
- {:$/journal/2025/07/21:}[21]
|
||||
** Plugins
|
||||
- {:$/journal/2025/07/24:}[24]
|
||||
** Test
|
||||
- {:$/journal/2025/07/21:}[21]
|
||||
** Uncategorised
|
||||
- {:$/index:}[First Line]
|
||||
Reference in New Issue
Block a user