diff --git a/tools/browser/surfingkeys.js b/tools/browser/surfingkeys.js index adb94ec..f000a4f 100644 --- a/tools/browser/surfingkeys.js +++ b/tools/browser/surfingkeys.js @@ -341,6 +341,16 @@ mapkey("yY", "yank link without parameter", function () { Clipboard.write(url.origin + url.pathname); }); +unmap("yma") +unmap("ymc") +unmap("ymv") + +map("ym", "yank link as markdown", function () { + const url = new URL(window.location.href); + const title = document.title; + Clipboard.write(`[${title}](${url.origin + url.pathname})`); +}); + // #region bilibili.com mapkey( ",n", diff --git a/tools/nvim/lua/config/servers.lua b/tools/nvim/lua/config/servers.lua index c1c3434..0b2b37a 100644 --- a/tools/nvim/lua/config/servers.lua +++ b/tools/nvim/lua/config/servers.lua @@ -7,7 +7,6 @@ local M = {} M.servers = { "bashls", -- Bash "clangd", -- C/C++ - "eslint", -- JavaScript "gopls", -- Go "html", -- HTML "jsonls", -- JSON diff --git a/tools/nvim/lua/plugins/appearance.lua b/tools/nvim/lua/plugins/appearance.lua index e75155a..16a06b9 100644 --- a/tools/nvim/lua/plugins/appearance.lua +++ b/tools/nvim/lua/plugins/appearance.lua @@ -34,10 +34,7 @@ return { }, cmd = "Telescope colorscheme", }, - -- { "olimorris/onedarkpro.nvim", cmd = "Telescope colorscheme" }, { "rebelot/kanagawa.nvim", cmd = "Telescope colorscheme" }, - -- -- Highlight objects under the cursor - -- { "RRethy/vim-illuminate" }, { -- Modern Status Line "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, @@ -46,18 +43,6 @@ return { require("plugins.mod.lualine") end, }, - -- { -- Highlight yanked text - -- "gbprod/yanky.nvim", - -- event = "LazyFile", - -- opts = { - -- highlight = { - -- on_put = true, - -- on_yank = true, - -- timer = 500, - -- }, - -- }, - -- }, - -- { import = "plugins.mod.alpha-nvim" }, -- Dashboard { -- Breadcrumb "Bekaboo/dropbar.nvim", dependencies = { @@ -108,19 +93,4 @@ return { opts = {}, dependencies = { "nvim-lua/plenary.nvim" }, }, - -- { - -- "folke/noice.nvim", - -- event = "VeryLazy", - -- opts = { - -- -- add any options here - -- }, - -- 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", - -- }, - -- }, } diff --git a/tools/nvim/lua/plugins/completion.lua b/tools/nvim/lua/plugins/completion.lua index 98ef519..b53d6ea 100644 --- a/tools/nvim/lua/plugins/completion.lua +++ b/tools/nvim/lua/plugins/completion.lua @@ -1,8 +1,4 @@ return { - -- { import = "plugins.mod.nvim-cmp" }, - -- { - -- "saadparwaiz1/cmp_luasnip", - -- }, { import = "plugins.mod.blink-cmp" }, { "L3MON4D3/LuaSnip", @@ -12,8 +8,4 @@ return { require("luasnip.loaders.from_vscode").lazy_load({ paths = "~/.config/lsp-snippets" }) end, }, - -- { - -- "zbirenbaum/copilot-cmp", - -- opts = {}, - -- }, } diff --git a/tools/nvim/lua/plugins/fileutils.lua b/tools/nvim/lua/plugins/fileutils.lua index c1c6154..2ae591f 100644 --- a/tools/nvim/lua/plugins/fileutils.lua +++ b/tools/nvim/lua/plugins/fileutils.lua @@ -28,34 +28,9 @@ return { end, dependencies = { "nvim-telescope/telescope.nvim" }, }, - -- { - -- "kdheepak/lazygit.nvim", - -- lazy = true, - -- cmd = { - -- "LazyGit", - -- "LazyGitConfig", - -- "LazyGitCurrentFile", - -- "LazyGitFilter", - -- "LazyGitFilterCurrentFile", - -- }, - -- -- optional for floating window border decoration - -- dependencies = { - -- "nvim-lua/plenary.nvim", - -- }, - -- -- setting the keybinding for LazyGit with 'keys' is recommended in - -- -- order to load the plugin when the command is run for the first time - -- keys = { - -- { "gg", "LazyGit", desc = "LazyGit" }, - -- }, - -- }, { "NeogitOrg/neogit", - -- dependencies = { - -- "nvim-lua/plenary.nvim", -- required - -- "nvim-telescope/telescope.nvim", -- optional - -- }, config = true, - -- event = "VeryLazy", cmd = { "Neogit", }, diff --git a/tools/nvim/lua/plugins/init.lua b/tools/nvim/lua/plugins/init.lua index 4bb32b4..dacc8df 100644 --- a/tools/nvim/lua/plugins/init.lua +++ b/tools/nvim/lua/plugins/init.lua @@ -3,7 +3,6 @@ require("plugins.lazy-nvim") -- Setup lazy.nvim require("lazy").setup({ spec = { - -- import your plugins { import = "plugins.appearance" }, { import = "plugins.completion" }, { import = "plugins.fileutils" }, @@ -12,8 +11,5 @@ require("lazy").setup({ { import = "plugins.edit" }, { import = "plugins.misc" }, }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - -- automatically check for plugin updates checker = { enabled = false }, }) diff --git a/tools/nvim/lua/plugins/lsp.lua b/tools/nvim/lua/plugins/lsp.lua index 14b9a34..ef3e472 100644 --- a/tools/nvim/lua/plugins/lsp.lua +++ b/tools/nvim/lua/plugins/lsp.lua @@ -3,10 +3,7 @@ return { { "lervag/vimtex", ft = { "tex", "bib" }, - -- lazy = false, -- we don't want to lazy load VimTeX - -- tag = "v2.15", -- uncomment to pin to a specific release init = function() - -- VimTeX configuration goes here, e.g. vim.g.vimtex_view_method = "okular" end, }, @@ -25,7 +22,7 @@ return { "williamboman/mason.nvim", cmd = "Mason", build = ":MasonUpdate", - opts_extend = { "ensure_installed" }, + -- opts_extend = { "ensure_installed" }, opts = { -- ensure_installed = require("config.servers").servers, }, @@ -67,17 +64,12 @@ return { highlight = { enable = true }, indent = { enable = true }, }, - -- config = function(_, opts) - -- require("nvim-treesitter.configs").setup(opts) - -- end, }, { "folke/lazydev.nvim", ft = "lua", -- only load on lua files opts = { library = { - -- See the configuration section for more details - -- Load luvit types when the `vim.uv` word is found { path = "${3rd}/luv/library", words = { "vim%.uv" } }, }, }, diff --git a/tools/nvim/lua/plugins/misc.lua b/tools/nvim/lua/plugins/misc.lua index 1db8a99..3514978 100644 --- a/tools/nvim/lua/plugins/misc.lua +++ b/tools/nvim/lua/plugins/misc.lua @@ -2,23 +2,6 @@ return { { "nvim-lua/plenary.nvim", lazy = true }, { "wakatime/vim-wakatime", lazy = false }, { import = "plugins.mod.toggleterm" }, - -- { - -- "CRAG666/code_runner.nvim", - -- config = true, - -- keys = { - -- { "cr", "RunCode", desc = "Run code" }, - -- }, - -- dependencies = { - -- - -- { - -- "CRAG666/betterTerm.nvim", - -- opts = { - -- position = "bot", - -- size = 15, - -- }, - -- }, - -- }, - -- }, { import = "plugins.mod.which-keys-nvim" }, { import = "plugins.mod.copilot-lua" }, { import = "plugins.mod.avante-nvim" }, @@ -32,7 +15,6 @@ return { -- event = "VeryLazy", dependencies = { "nvim-telescope/telescope.nvim", - -- "ibhagwan/fzf-lua", "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim", }, @@ -41,8 +23,5 @@ return { }, }, { import = "plugins.mod.image-nvim" }, - -- "3rd/image.nvim", - -- opts = {}, - -- }, { import = "plugins.mod.snacks-nvim" }, } diff --git a/tools/nvim/lua/plugins/mod/blink-cmp.lua b/tools/nvim/lua/plugins/mod/blink-cmp.lua index 9de0911..9735dfb 100644 --- a/tools/nvim/lua/plugins/mod/blink-cmp.lua +++ b/tools/nvim/lua/plugins/mod/blink-cmp.lua @@ -10,6 +10,12 @@ return { ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { + enabled = function() + if vim.fn.getcmdtype() ~= "" then + return true + end + return not vim.tbl_contains({ "TelescopePrompt", "dap-repl", "snacks_picker_list" }, vim.bo.filetype) + end, keymap = { preset = "default", [""] = { diff --git a/tools/nvim/lua/plugins/mod/lang/org.lua b/tools/nvim/lua/plugins/mod/lang/org.lua index f89f823..76d0175 100644 --- a/tools/nvim/lua/plugins/mod/lang/org.lua +++ b/tools/nvim/lua/plugins/mod/lang/org.lua @@ -22,7 +22,7 @@ return { require("orgmode").setup({ org_agenda_files = "~/OrgFiles/tasks/*", org_default_notes_file = "~/OrgFiles/tasks/inbox.org", - org_archive_location = "~/OrgFiles/archive/%s_archive::", + org_archive_location = "~/OrgFiles/.archive/%s_archive::", org_todo_keywords = { "TODO(t)", "NEXT(n)", "WAIT(w)", "|", "DONE(d)", "CANCELLED(c)" }, org_hide_leading_stars = true, org_hide_emphasis_markers = true, @@ -38,12 +38,14 @@ return { org_agenda_set_tags = "", org_agenda_earlier = { "[[", "<" }, org_agenda_later = { "]]", ">" }, + org_agenda_archive = "$", }, org = { org_deadline = "", org_schedule = "", org_todo = "", org_set_tags_command = "", + org_archive_subtree = "$", }, }, })