From 5aef973f018f43b4be6882e2cd80c35843153e31 Mon Sep 17 00:00:00 2001 From: Yuta Katayama <8683947+yutkat@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:56:44 +0000 Subject: [PATCH] neovim: Fix the freeze (#3608) --- .config/nvim/lazy-lock.json | 30 +++---- .config/nvim/lua/rc/pluginconfig/portal.lua | 27 ++++--- .../nvim/lua/rc/pluginconfig/telekasten.lua | 79 +------------------ 3 files changed, 33 insertions(+), 103 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index ad6f1d913..d74397af3 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,8 +1,8 @@ { "ChatGPT.nvim": { "branch": "main", "commit": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "CopilotChat.nvim": { "branch": "canary", "commit": "18d51754e9dc87d6b85f1e331c1fca0825384517" }, - "LuaSnip": { "branch": "master", "commit": "2737edc9e674e537dc0a97e3405658d57d2d31ed" }, + "CopilotChat.nvim": { "branch": "canary", "commit": "fb4809f5274937683d9d443a79bdff48bc80545d" }, + "LuaSnip": { "branch": "master", "commit": "659c4479529a05cc9b05ef762639a09d366cc690" }, "NeoComposer.nvim": { "branch": "main", "commit": "7ecb04d4a1712a6fd7272c1c9482ea878c144588" }, "alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" }, "browse.nvim": { "branch": "main", "commit": "1ccf8705668216d8a311d31e87246b494b8eb571" }, @@ -22,7 +22,7 @@ "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-rg": { "branch": "master", "commit": "d6cea15ad504369ec98f3de73b9631dfdd23a671" }, + "cmp-rg": { "branch": "master", "commit": "70a43543f61b6083ba9c3b7deb9ccee671410ac6" }, "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, "cmp-tabnine": { "branch": "main", "commit": "c0167cdc86c15e782c5461ee62aebee89231c2ed" }, "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, @@ -31,7 +31,7 @@ "colorful-winsep.nvim": { "branch": "main", "commit": "4ac6a8cab5866ec3de3f5e3bc202e0c682d4d806" }, "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, "confirm-quit.nvim": { "branch": "main", "commit": "f15f6d728d385a3d2efa22098e9a45b8a2b20144" }, - "conform.nvim": { "branch": "master", "commit": "e3263eabbfc1bdbc5b6a60ba8431b64e8dca0a79" }, + "conform.nvim": { "branch": "master", "commit": "1a7ff54dcfbe1af139b11829c6d58f5ffab87707" }, "convert-git-url.nvim": { "branch": "main", "commit": "fd97c92a627175546f8572088b2b240b92f2790d" }, "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, "csv-tools.lua": { "branch": "master", "commit": "e11c322178d4ff9fdc0418a657e8f1f74f1ce247" }, @@ -40,7 +40,7 @@ "dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dmacro.nvim": { "branch": "main", "commit": "95eaf53bc7a4b3dead220fe1f28870b60524a215" }, - "dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" }, + "dressing.nvim": { "branch": "master", "commit": "43b8f74e0b1e3f41e51f640f8efa3bcd401cea0d" }, "eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, @@ -53,12 +53,12 @@ "hlargs.nvim": { "branch": "main", "commit": "53ec5d8ca6ed012de5545ba83ea1eb3d636b09fb" }, "hover.nvim": { "branch": "main", "commit": "f8e162daccb2f117e19f3d5ad3647ac0cefb02e3" }, "hydra.nvim": { "branch": "main", "commit": "7f5341643107d05a8d7d4fdea00b29af28517380" }, - "indent-blankline.nvim": { "branch": "master", "commit": "e51b651ca26cba250ef3a1150c8d35045eee2a84" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, "interestingwords.nvim": { "branch": "master", "commit": "fa7796353266ce9a5de6a95a8e332814f09a5514" }, "iron.nvim": { "branch": "master", "commit": "e6b78ec1bc56eab63b3a9112d348b3d79836b672" }, "iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" }, "lasterisk.nvim": { "branch": "main", "commit": "bbcfcaeca50f686e338a03386e41645fc3305f44" }, - "lazy.nvim": { "branch": "main", "commit": "60cf258a9ae7fffe04bb31141141a91845158dcc" }, + "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, "line-notes.nvim": { "branch": "master", "commit": "17e21c3410aea9e075d0b1f54c25f8723fb77415" }, "live-command.nvim": { "branch": "main", "commit": "b0723697bf60d89ede953c4a5fedce3157784c15" }, @@ -73,11 +73,11 @@ "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, "modicator.nvim": { "branch": "main", "commit": "e349636d905e03305f1eda9c081e63560598f118" }, "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "neoconf.nvim": { "branch": "main", "commit": "777cd15e537e6b3e7cfbb6dba77f0caeaa95aef0" }, - "neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" }, + "neoconf.nvim": { "branch": "main", "commit": "71c7e55094a645d6f1037767649bf14d233b8951" }, + "neogen": { "branch": "main", "commit": "e3b8f6dca1c67c73ae2817418d39c061fdb65064" }, "neogit": { "branch": "master", "commit": "8e1e301c2e33c60375850bcf22ba1fb77b684b97" }, "nightfox.nvim": { "branch": "main", "commit": "7557f26defd093c4e9bc17f28b08403f706f5a44" }, - "noice.nvim": { "branch": "main", "commit": "2087bbf8cd64482b47fb5f33b5e0eabf329ab14b" }, + "noice.nvim": { "branch": "main", "commit": "3973bc5c33010f3051be86a1699095ab077f6438" }, "nredir.nvim": { "branch": "main", "commit": "22cdf3aaf43d563b27c5bbbd31da5ab23efec972" }, "ns-textobject.nvim": { "branch": "main", "commit": "6341bc16df9d07d5f9520b7ac0a84a55720c2302" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, @@ -98,7 +98,7 @@ "nvim-insx": { "branch": "main", "commit": "af5f076d5ad26976f75376107b86338f67f78cf3" }, "nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" }, "nvim-lsp-smag": { "branch": "master", "commit": "add830cb376ebe3daac3f63b7f4349c499090918" }, - "nvim-lspconfig": { "branch": "master", "commit": "4cb925e96288a71409a86c84fd97f4434a95453e" }, + "nvim-lspconfig": { "branch": "master", "commit": "d2d153a179ed59aa7134d7ebdf4d7dcb156efa22" }, "nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" }, "nvim-luapad": { "branch": "master", "commit": "176686eb616a5ada5dfc748f2b5109194bbe8a71" }, "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" }, @@ -109,12 +109,12 @@ "nvim-rooter.lua": { "branch": "main", "commit": "36c597962c5f136d6230f53837ff14fcaf81eff7" }, "nvim-scrollbar": { "branch": "main", "commit": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49" }, "nvim-spectre": { "branch": "master", "commit": "08be31c104df3b4b049607694ebb2b6ced4f928b" }, - "nvim-spider": { "branch": "main", "commit": "b1c542a78522d59432a827f6ec2b28f9422c7e7f" }, + "nvim-spider": { "branch": "main", "commit": "f35bcdbd89a560e9a450ee1929bcef7aedf3ace5" }, "nvim-surround": { "branch": "main", "commit": "dca2e998ff26681ee422b92c6ed39b3d2908d8a9" }, "nvim-test": { "branch": "main", "commit": "e06f3d029ee161f3ead6193cf27354d1eb8723c3" }, "nvim-tree-docs": { "branch": "master", "commit": "5db023d783da1e55339e5e25caaf72a59597e626" }, "nvim-treehopper": { "branch": "master", "commit": "e87002968983ed23836dfad53bcf023e609db42d" }, - "nvim-treesitter": { "branch": "master", "commit": "8e40904e49bbad5812798eb54be8c00d77cdd301" }, + "nvim-treesitter": { "branch": "master", "commit": "e1e3108cd23d7f967842261bd66126b6734d8907" }, "nvim-treesitter-context": { "branch": "master", "commit": "158377d700596367a91ea41818f76abdbf75a232" }, "nvim-treesitter-refactor": { "branch": "master", "commit": "d8b74fa87afc6a1e97b18da23e762efb032dc270" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, @@ -127,7 +127,7 @@ "octo.nvim": { "branch": "master", "commit": "3f9f945401f4dbbeb7ecee5a5585e26ef743105c" }, "one-small-step-for-vimkind": { "branch": "main", "commit": "ad065ad2c814249cfb9e344ce5b2b35d36fbc09f" }, "other.nvim": { "branch": "main", "commit": "64a2f8756468a4d09534a55b98d9d6bf86fa105e" }, - "overseer.nvim": { "branch": "master", "commit": "25a9c6439a37b680ff4b3c02554f4173c197c18b" }, + "overseer.nvim": { "branch": "master", "commit": "ebaa10bbbff937ba4aeb29bbc8675875da6973cb" }, "package-info.nvim": { "branch": "master", "commit": "3de4f3569ce60e248707df042b72769b3ec343b8" }, "peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, @@ -139,7 +139,7 @@ "rainbow-delimiters.nvim": { "branch": "master", "commit": "f22496dfdd46da4d571f5254c72eff65ff5a1c27" }, "registers.nvim": { "branch": "main", "commit": "c217f8f369e0886776cda6c94eab839b30a8940d" }, "replacer.nvim": { "branch": "master", "commit": "32e1713230844fa52f7f0598c59295de3c90dc95" }, - "rustaceanvim": { "branch": "master", "commit": "35d1dbcf8b5d828a17601dfc4d5e76fcc34d4048" }, + "rustaceanvim": { "branch": "master", "commit": "8ece53be36515cb9e76f3d03511643636469502d" }, "save-clipboard-on-exit.nvim": { "branch": "main", "commit": "506d6970026e1c2e59a42ecdc7378fe908da8a0b" }, "scrap.nvim": { "branch": "main", "commit": "fde44cd73cd3e8465cf393c60e26fb1c238633b3" }, "sidebar.nvim": { "branch": "main", "commit": "5695712eef6288fff667343c4ae77c54911bdb1b" }, diff --git a/.config/nvim/lua/rc/pluginconfig/portal.lua b/.config/nvim/lua/rc/pluginconfig/portal.lua index 770a23901..678dfa251 100644 --- a/.config/nvim/lua/rc/pluginconfig/portal.lua +++ b/.config/nvim/lua/rc/pluginconfig/portal.lua @@ -17,16 +17,17 @@ vim.keymap.set("n", "", function() }) end) -local group_name = "vimrc_portal" -vim.api.nvim_create_augroup(group_name, { clear = true }) -vim.api.nvim_create_autocmd( - { "BufAdd", "InsertLeave", "BufWinEnter", "TextYankPost", "TextChanged", "CmdlineLeave", "CursorHold" }, - { - group = group_name, - pattern = "*", - callback = function() - vim.cmd.normal({ "m'", bang = true }) - end, - once = false, - } -) +-- Freeze by `dk` +-- local group_name = "vimrc_portal" +-- vim.api.nvim_create_augroup(group_name, { clear = true }) +-- vim.api.nvim_create_autocmd( +-- { "BufAdd", "InsertLeave", "BufWinEnter", "TextYankPost", "TextChanged", "CmdlineLeave", "CursorHold" }, +-- { +-- group = group_name, +-- pattern = "*", +-- callback = function() +-- vim.cmd.normal({ "m'", bang = true }) +-- end, +-- once = false, +-- } +-- ) diff --git a/.config/nvim/lua/rc/pluginconfig/telekasten.lua b/.config/nvim/lua/rc/pluginconfig/telekasten.lua index 0f7c113fb..b1ff83329 100644 --- a/.config/nvim/lua/rc/pluginconfig/telekasten.lua +++ b/.config/nvim/lua/rc/pluginconfig/telekasten.lua @@ -1,16 +1,10 @@ -local home = vim.fn.stdpath("data") .. "/zettelkasten" +local home = vim.fn.expand("~/Documents/zettelkasten") local templ_dir = vim.fn.stdpath("config") .. "/zettelkasten/templates" require("telekasten").setup({ home = home, dailies = home .. "/" .. "daily", weeklies = home .. "/" .. "weekly", templates = templ_dir, - extension = ".md", - - -- following a link to a non-existing note will create it - follow_creates_nonexisting = true, - dailies_create_nonexisting = true, - weeklies_create_nonexisting = true, -- template for new notes (new_note, follow_link) template_new_note = templ_dir .. "/new_note.md", @@ -21,73 +15,8 @@ require("telekasten").setup({ -- template for newly created weekly notes (goto_thisweek) template_new_weekly = templ_dir .. "/weekly.md", - image_link_style = "markdown", - -- default sort option: 'filename', 'modified' sort = "modified", - - -- integrate with calendar-vim - plug_into_calendar = true, - calendar_opts = { - -- calendar week display mode: 1 .. 'WK01', 2 .. 'WK 1', 3 .. 'KW01', 4 .. 'KW 1', 5 .. '1' - weeknm = 4, - -- use monday as first day of week: 1 .. true, 0 .. false - calendar_monday = 1, - -- calendar mark: where to put mark for marked days: 'left', 'right', 'left-fit' - calendar_mark = "left-fit", - }, - - -- telescope actions behavior - close_after_yanking = false, - insert_after_inserting = true, - - -- tag notation: '#tag', ':tag:', 'yaml-bare' - tag_notation = "#tag", - - -- command palette theme: dropdown (window) or ivy (bottom panel) - command_palette_theme = "ivy", - - -- tag list theme: - -- get_cursor: small tag list at cursor; ivy and dropdown like above - show_tags_theme = "ivy", - - -- when linking to a note in subdir/, create a [[subdir/title]] link - -- instead of a [[title only]] link - subdirs_in_links = true, - - -- template_handling - -- What to do when creating a new note via `new_note()` or `follow_link()` - -- to a non-existing note - -- - prefer_new_note: use `new_note` template - -- - smart: if day or week is detected in title, use daily / weekly templates (default) - -- - always_ask: always ask before creating a note - template_handling = "smart", - - -- path handling: - -- this applies to: - -- - new_note() - -- - new_templated_note() - -- - follow_link() to non-existing note - -- - -- it does NOT apply to: - -- - goto_today() - -- - goto_thisweek() - -- - -- Valid options: - -- - smart: put daily-looking notes in daily, weekly-looking ones in weekly, - -- all other ones in home, except for notes/with/subdirs/in/title. - -- (default) - -- - -- - prefer_home: put all notes in home except for goto_today(), goto_thisweek() - -- except for notes with subdirs/in/title. - -- - -- - same_as_current: put all new notes in the dir of the current note if - -- present or else in home - -- except for notes/with/subdirs/in/title. - new_note_location = "smart", - - -- should all links be updated when a file is renamed - rename_update_links = true, }) local M = require("telekasten") @@ -233,9 +162,9 @@ local function find_files_sorted(opts) local previewer = conf.file_previewer(opts) opts.attach_mappings = opts.attach_mappings - or function(_, _) - actions.select_default:replace(picker_actions.select_default) - end + or function(_, _) + actions.select_default:replace(picker_actions.select_default) + end local picker = pickers.new(opts, { finder = finders.new_table({