From 365868d7726ed5a758ccbd0815b4fe8ab1afd20f Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Sun, 3 Aug 2025 22:32:19 +0930 Subject: [PATCH] what do these even do? --- .config/lf/lfrc | 2 +- .config/nvim/lua/lazyvim/config/keymaps.lua | 1 + .config/nvim/lua/lazyvim/config/options.lua | 2 - .../lua/lazyvim/plugins/codecompanion.lua | 7 --- .config/nvim/lua/lazyvim/plugins/lsp/init.lua | 3 +- .config/nvim/lua/lazyvim/plugins/oil.lua | 15 ++--- .config/nvim/lua/lazyvim/plugins/snippets.lua | 38 ++++++------ .config/nvim/lua/lazyvim/plugins/utility.lua | 18 +++--- .config/nvim/lua/lazyvim/plugins/zk.lua | 62 +++++++++---------- .config/nvim/lua/lazyvim/utils/init.lua | 4 +- 10 files changed, 73 insertions(+), 79 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index d5a187e..6b0417a 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -21,7 +21,7 @@ cmd open ${{ case $(file --mime-type "$(readlink -f $f)" -b) in application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;; image/vnd.djvu|application/pdf|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;; - text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;; + text/*|application/json|inode/x-empty|application/x-subrip|application/javascript) $EDITOR $fx;; image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;; image/svg+xml) display -- $f ;; image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$" | diff --git a/.config/nvim/lua/lazyvim/config/keymaps.lua b/.config/nvim/lua/lazyvim/config/keymaps.lua index 5fd0b53..dc9207a 100644 --- a/.config/nvim/lua/lazyvim/config/keymaps.lua +++ b/.config/nvim/lua/lazyvim/config/keymaps.lua @@ -35,6 +35,7 @@ vim.keymap.set("i", "", ":w", opts) -- Switch between buffers vim.keymap.set("n", "", ":bnext", opts) vim.keymap.set("n", "", ":bprevious", opts) +vim.keymap.set("n", "bd", ":bd", opts) -- center after up and down movements vim.keymap.set("n", "", "zz", opts) diff --git a/.config/nvim/lua/lazyvim/config/options.lua b/.config/nvim/lua/lazyvim/config/options.lua index 4f06882..e9373ae 100644 --- a/.config/nvim/lua/lazyvim/config/options.lua +++ b/.config/nvim/lua/lazyvim/config/options.lua @@ -47,8 +47,6 @@ local options = { vim.opt.fillchars = vim.opt.fillchars + "eob: " -vim.opt.shortmess:append("c") - for k, v in pairs(options) do vim.opt[k] = v end diff --git a/.config/nvim/lua/lazyvim/plugins/codecompanion.lua b/.config/nvim/lua/lazyvim/plugins/codecompanion.lua index b03f115..0491616 100644 --- a/.config/nvim/lua/lazyvim/plugins/codecompanion.lua +++ b/.config/nvim/lua/lazyvim/plugins/codecompanion.lua @@ -37,13 +37,6 @@ return { }, }) end, - anthropic = function() - return require("codecompanion.adapters").extend("anthropic", { - env = { - api_key = "cmd:cat $HOME/.config/anthropic/KEY", - }, - }) - end, }, }, }, diff --git a/.config/nvim/lua/lazyvim/plugins/lsp/init.lua b/.config/nvim/lua/lazyvim/plugins/lsp/init.lua index 81d6a29..56520a7 100644 --- a/.config/nvim/lua/lazyvim/plugins/lsp/init.lua +++ b/.config/nvim/lua/lazyvim/plugins/lsp/init.lua @@ -179,6 +179,7 @@ return { -- formatting { "stevearc/conform.nvim", + enabled = true, opts = { formatters_by_ft = { lua = { "stylua" }, @@ -227,7 +228,7 @@ return { -- language specific tooling { "simrat39/rust-tools.nvim", - enabled = true, + enabled = false, opts = { server = { on_attach = function(_, bufnr) diff --git a/.config/nvim/lua/lazyvim/plugins/oil.lua b/.config/nvim/lua/lazyvim/plugins/oil.lua index d5404c5..f85cfb7 100644 --- a/.config/nvim/lua/lazyvim/plugins/oil.lua +++ b/.config/nvim/lua/lazyvim/plugins/oil.lua @@ -1,9 +1,10 @@ return { - -- 'stevearc/oil.nvim', - -- enabled = true, - -- lazy = false, - -- opts = { - -- default_file_explorer = true, - -- }, - -- dependencies = { { "echasnovski/mini.icons", opts = {} } }, + 'stevearc/oil.nvim', + enabled = false, + + lazy = false, + opts = { + default_file_explorer = true, + }, + dependencies = { { "echasnovski/mini.icons", opts = {} } }, } diff --git a/.config/nvim/lua/lazyvim/plugins/snippets.lua b/.config/nvim/lua/lazyvim/plugins/snippets.lua index 7fd6bf9..04284ab 100644 --- a/.config/nvim/lua/lazyvim/plugins/snippets.lua +++ b/.config/nvim/lua/lazyvim/plugins/snippets.lua @@ -1,21 +1,21 @@ return { - -- { - -- "L3MON4D3/LuaSnip", - -- enabled = true, - -- dependencies = { - -- "rafamadriz/friendly-snippets", - -- config = function() - -- require("luasnip.loaders.from_vscode").lazy_load() - -- end, - -- }, - -- opts = { - -- history = true, - -- delete_check_events = "TextChanged", - -- }, - -- -- stylua: ignore - -- keys = { - -- { "", function() require("luasnip").jump(1) end, mode = "s", }, - -- { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" }, }, - -- }, - -- }, + { + "L3MON4D3/LuaSnip", + enabled = false, + dependencies = { + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + }, + opts = { + history = true, + delete_check_events = "TextChanged", + }, + -- stylua: ignore + keys = { + { "", function() require("luasnip").jump(1) end, mode = "s", }, + { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" }, }, + }, + }, } diff --git a/.config/nvim/lua/lazyvim/plugins/utility.lua b/.config/nvim/lua/lazyvim/plugins/utility.lua index 7bf6a3f..ecb6621 100644 --- a/.config/nvim/lua/lazyvim/plugins/utility.lua +++ b/.config/nvim/lua/lazyvim/plugins/utility.lua @@ -7,7 +7,7 @@ return { }, { "RRethy/vim-illuminate", - enabled = true, + enabled = false, event = "BufReadPost", config = function() require("illuminate").configure({ delay = 200 }) @@ -54,7 +54,7 @@ return { }, { "echasnovski/mini.bufremove", - enabled = true, + enabled = false, event = "VeryLazy", -- stylua: ignore keys = { @@ -102,15 +102,15 @@ return { }, { "MunifTanjim/nui.nvim", - enabled = true, + enabled = false, }, { "kyazdani42/nvim-web-devicons", - enabled = true, + enabled = false, }, { "lukas-reineke/indent-blankline.nvim", - enabled = true, + enabled = false, opts = {}, }, { @@ -127,7 +127,7 @@ return { }, { "preservim/vim-markdown", - enabled = true, + enabled = false, }, { "nacro90/numb.nvim", @@ -142,11 +142,11 @@ return { }, { "junegunn/vim-slash", - enabled = true, + enabled = false, }, { "echasnovski/mini.surround", - enabled = true, + enabled = false, keys = { "gz" }, opts = { mappings = { @@ -166,7 +166,7 @@ return { }, { "danymat/neogen", - enabled = true, + enabled = false, event = "BufEnter", config = function() require("neogen").setup({ diff --git a/.config/nvim/lua/lazyvim/plugins/zk.lua b/.config/nvim/lua/lazyvim/plugins/zk.lua index f47a878..93dc120 100644 --- a/.config/nvim/lua/lazyvim/plugins/zk.lua +++ b/.config/nvim/lua/lazyvim/plugins/zk.lua @@ -1,33 +1,33 @@ return { - -- { - -- "mickael-menu/zk-nvim", - -- enabled = true, - -- event = "VeryLazy", - -- opts = { - -- picker = "telescope", - -- }, - -- config = function(_, opts) - -- require("zk").setup(opts) - -- - -- local function yankName(options, picker_options) - -- require("zk").pick_notes(options, picker_options, function(notes) - -- local pos = vim.api.nvim_win_get_cursor(0)[2] - -- local line = vim.api.nvim_get_current_line() - -- - -- if picker_options.multi_select == false then - -- notes = { notes } - -- end - -- for _, note in ipairs(notes) do - -- -- stylua: ignore - -- local nline = line:sub(0, pos) .. note.title .. " - " .. note.path .. line:sub(pos + 1) - -- vim.api.nvim_set_current_line(nline) - -- end - -- end) - -- end - -- - -- require("zk.commands").add("ZkInsertLink", function(options) - -- yankName(options, { title = "Zk Yank" }) - -- end) - -- end, - -- }, + { + "mickael-menu/zk-nvim", + enabled = false, + event = "VeryLazy", + opts = { + picker = "telescope", + }, + config = function(_, opts) + require("zk").setup(opts) + + local function yankName(options, picker_options) + require("zk").pick_notes(options, picker_options, function(notes) + local pos = vim.api.nvim_win_get_cursor(0)[2] + local line = vim.api.nvim_get_current_line() + + if picker_options.multi_select == false then + notes = { notes } + end + for _, note in ipairs(notes) do + -- stylua: ignore + local nline = line:sub(0, pos) .. note.title .. " - " .. note.path .. line:sub(pos + 1) + vim.api.nvim_set_current_line(nline) + end + end) + end + + require("zk.commands").add("ZkInsertLink", function(options) + yankName(options, { title = "Zk Yank" }) + end) + end, + }, } diff --git a/.config/nvim/lua/lazyvim/utils/init.lua b/.config/nvim/lua/lazyvim/utils/init.lua index 7ff924c..cab3ec1 100644 --- a/.config/nvim/lua/lazyvim/utils/init.lua +++ b/.config/nvim/lua/lazyvim/utils/init.lua @@ -158,10 +158,10 @@ end function M.exists(path) local exists = vim.fn.filereadable(vim.fn.expand(path)) if exists == 1 then - vim.notify(path .. " exists", vim.log.levels.INFO) + -- vim.notify(path .. " exists", vim.log.levels.INFO) return true else - vim.notify(path .. " doesn't exist", vim.log.levels.INFO) + -- vim.notify(path .. " doesn't exist", vim.log.levels.INFO) return false end end