From ae4cc1a09742a2b31246d540e1ae8abafc7188a1 Mon Sep 17 00:00:00 2001 From: Archie Fox Date: Tue, 30 Sep 2025 10:47:01 +0300 Subject: [PATCH] Fix another settings --- lua/config/autocmds.lua | 8 ++++++++ lua/config/keymaps.lua | 12 +++++++++++- lua/config/obsidian.lua | 4 ++++ lua/config/options.lua | 6 ++++++ lua/plugins/init.lua | 5 +++++ lua/plugins/neorg.lua | 10 +++++++++- 6 files changed, 43 insertions(+), 2 deletions(-) diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 48e3398..5807d6a 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -51,3 +51,11 @@ vim.api.nvim_create_autocmd("BufWritePre", { end end, }) + +-- Отключить все диагностики для markdown файлов +vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + callback = function() + vim.diagnostic.enable(false) + end, +}) diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 07fe7e3..2f1cc68 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -17,7 +17,7 @@ k.set({ "t", "n", "v" }, "", "k", { desc = "Go to top windo k.set({ "t", "n", "v" }, "", "l", { desc = "Go to right window" }) k.set("n", "li", "LspInfo", { desc = "LSP Info" }) -k.set("n", "o", ":lua Snacks.dashboard()", { desc = "Dashboard" }) +k.set("n", "ui", ":lua Snacks.dashboard()", { desc = "Dashboard" }) -- Основные горячие клавиши для Obsidian k.set("n", "of", ":ObsidianQuickSwitch", { desc = "Quick switch" }) @@ -65,3 +65,13 @@ vim.api.nvim_create_autocmd("Filetype", { vim.keymap.set("n", "", "(neorg.esupports.hop.hop-link)", { buffer = true }) end, }) + +k.set("n", "d", vim.diagnostic.setloclist, { desc = "Open diagnostics list" }) + +-- Bufferline +k.set({ "n", "v", "t" }, "", "BufferLineGoToBuffer 1", { desc = "Go to buffer 1" }) +k.set({ "n", "v", "t" }, "", "BufferLineGoToBuffer 2", { desc = "Go to buffer 2" }) +k.set({ "n", "v", "t" }, "", "BufferLineGoToBuffer 3", { desc = "Go to buffer 3" }) +k.set({ "n", "v", "t" }, "", "BufferLineGoToBuffer 4", { desc = "Go to buffer 4" }) +k.set({ "n", "v", "t" }, "", "BufferLineGoToBuffer 5", { desc = "Go to buffer 5" }) +k.set({ "n", "v", "t" }, "", "BufferLineGoToBuffer 6", { desc = "Go to buffer 6" }) diff --git a/lua/config/obsidian.lua b/lua/config/obsidian.lua index 4f20636..223e9c8 100644 --- a/lua/config/obsidian.lua +++ b/lua/config/obsidian.lua @@ -10,6 +10,10 @@ require("obsidian").setup({ name = "default", path = "~/Share/Obsidian/default", }, + { + name = "todo", + path = "~/Share/Obsidian/ToDo", + }, }, -- Alternatively - and for backwards compatibility - you can set 'dir' to a single path instead of diff --git a/lua/config/options.lua b/lua/config/options.lua index bc9734b..2610da1 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -9,3 +9,9 @@ O.wrap = true -- Не автокомментировать новые линии при переходе на новую строку vim.cmd([[autocmd BufEnter * set fo-=c fo-=r fo-=o]]) + +-- vim.diagnostic.config({ +-- virtual_lines = true, +-- virtual_text = false, +-- float = true, +-- }) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 296f361..27528c3 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,4 +1,9 @@ return { { "norcalli/nvim-colorizer.lua" }, { "onsails/lspkind.nvim" }, + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = false }, + }, } diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index 750e585..567f68b 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -12,13 +12,15 @@ return { ["core.journal"] = { config = { journal_folder = "journal", + strategy = "flat", + workspace = "default", }, }, -- We added this line! ["core.dirman"] = { config = { workspaces = { default = "~/Share/Notes", - journal = "~/Share/Notes/journal", + -- journal = "~/Share/Notes/journal", }, default_workspace = "default", }, @@ -36,6 +38,12 @@ return { }, }, }, + ["core.esupports.metagen"] = { + config = { + timezone = "implicit-local", + }, + }, + ["core.ui.calendar"] = {}, }, }) end,