From 10b8ab4f15055c7ac9af459b84b1b756956d629e Mon Sep 17 00:00:00 2001 From: Moshe Avni Date: Mon, 9 Dec 2024 10:45:46 +0200 Subject: [PATCH] some shit --- .config/nvim/ftplugin/fugitiveblame.lua | 7 ++++- .config/nvim/ftplugin/markdown.lua | 1 + .config/nvim/lazy-lock.json | 4 +-- .config/nvim/lua/plugins/functionality.lua | 4 --- .config/nvim/lua/plugins/init.lua | 16 ++--------- .config/nvim/lua/plugins/look-and-feel.lua | 9 ++++++ .config/nvim/lua/plugins/mini.lua | 32 ++++++++++++++++------ zsh.d/term-support.zsh | 3 +- 8 files changed, 45 insertions(+), 31 deletions(-) create mode 100644 .config/nvim/ftplugin/markdown.lua diff --git a/.config/nvim/ftplugin/fugitiveblame.lua b/.config/nvim/ftplugin/fugitiveblame.lua index 1e3cfe4..d38b487 100644 --- a/.config/nvim/ftplugin/fugitiveblame.lua +++ b/.config/nvim/ftplugin/fugitiveblame.lua @@ -11,7 +11,12 @@ end -- set winbar to empty string -- vim.api.nvim_win_set_option(0, 'winbar', '-') vim.schedule(function() - vim.api.nvim_set_option_value('winbar', 'Git blame', { win = 0 }) + vim.api.nvim_set_option_value( + 'winbar', + 'Git blame ( to open commit in diffview | yy to copy commit hash to clipboard | gh to open commit in GitHub)', + { win = 0 } + ) + vim.api.nvim_buf_set_keymap(0, 'n', '', '', { noremap = true, silent = true, diff --git a/.config/nvim/ftplugin/markdown.lua b/.config/nvim/ftplugin/markdown.lua new file mode 100644 index 0000000..7fe1ef1 --- /dev/null +++ b/.config/nvim/ftplugin/markdown.lua @@ -0,0 +1 @@ +vim.wo.wrap = false diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 6072ba3..f1c8a63 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -53,6 +53,7 @@ "mini.notify": { "branch": "main", "commit": "a933dc637b84314976d6482449f9f51ecd02d2b3" }, "mini.operators": { "branch": "main", "commit": "7cb4dc66c51a3d736d347bbc517dc73dc7d28888" }, "mini.splitjoin": { "branch": "main", "commit": "3e92f6764e770ba392325cad3a4497adcada695f" }, + "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, "neogit": { "branch": "master", "commit": "683ee5d02b3b223a5c39953d700c252187fc5be9" }, "nginx.vim": { "branch": "master", "commit": "cffaec54f0c7f9518de053634413a20e90eac825" }, "none-ls-shellcheck.nvim": { "branch": "main", "commit": "0f84461241e76e376a95fb7391deac82dc3efdbf" }, @@ -73,7 +74,6 @@ "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-pqf": { "branch": "main", "commit": "148ee2ca8b06d83fd9bf6f9b9497724ad39a07d6" }, - "nvim-surround": { "branch": "main", "commit": "9f0cb495f25bff32c936062d85046fbda0c43517" }, "nvim-tree.lua": { "branch": "master", "commit": "db8d7ac1f524fc6f808764b29fa695c51e014aa6" }, "nvim-treesitter": { "branch": "master", "commit": "0c26a5c4bc407fdbca545ab25cf6084fd069444b" }, "nvim-treesitter-context": { "branch": "master", "commit": "3288c5af7d3820d716272f1d05ab661cc540a5d6" }, @@ -108,9 +108,7 @@ "vim-kubernetes": { "branch": "master", "commit": "f477818c30efe4914e9a047ba1105b524d78e1b5" }, "vim-lister": { "branch": "master", "commit": "ec903e615f867f910cd8adc73f5906d521f3f214" }, "vim-matchup": { "branch": "master", "commit": "5fb083de1e06fdd134c6ad8d007d4b5576b25ba7" }, - "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, "vim-sh-indent": { "branch": "master", "commit": "4a3ef08bbf3a2ddacd6d80ef732726a59d9012f9" }, - "vim-speeddating": { "branch": "master", "commit": "c17eb01ebf5aaf766c53bab1f6592710e5ffb796" }, "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, "vim-swap": { "branch": "master", "commit": "9358bfdc5e377aa13e7c2c2dd8699ba32b0dcf83" }, "winresizer": { "branch": "master", "commit": "9bd559a03ccec98a458e60c705547119eb5350f3" }, diff --git a/.config/nvim/lua/plugins/functionality.lua b/.config/nvim/lua/plugins/functionality.lua index 9e8af33..b43ba10 100644 --- a/.config/nvim/lua/plugins/functionality.lua +++ b/.config/nvim/lua/plugins/functionality.lua @@ -10,10 +10,6 @@ local M = { vim.g.loaded_matchparen = 1 end, }, - { - 'tpope/vim-speeddating', - keys = { '', '' }, - }, { 'mosheavni/vim-kubernetes', ft = 'yaml', diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua index bd0f269..496c726 100644 --- a/.config/nvim/lua/plugins/init.lua +++ b/.config/nvim/lua/plugins/init.lua @@ -60,16 +60,6 @@ local M = { ----------------------- -- Text Manipulation -- ----------------------- - { - 'tpope/vim-repeat', - event = 'VeryLazy', - }, - { - 'kylechui/nvim-surround', - version = '*', -- Use for stability; omit to use `main` branch for the latest features - keys = { 'ds', 'cs', 'ys', { 'S', nil, mode = 'v' } }, - opts = {}, - }, { 'junegunn/vim-easy-align', keys = { { 'ga', '(EasyAlign)', mode = { 'v', 'n' } } }, @@ -217,9 +207,9 @@ local M = { }, dependencies = { { 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim - { 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper + { 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper }, - build = 'make tiktoken', -- Only on MacOS or Linux + build = 'make tiktoken', -- Only on MacOS or Linux opts = { model = 'claude-3.5-sonnet', question_header = ' User ', -- Header to use for user questions @@ -227,7 +217,7 @@ local M = { error_header = ' Error ', -- Header to use for errors }, keys = { - { 'ccc', 'CopilotChat', mode = { 'n', 'v' } }, + { 'ccc', 'CopilotChat', mode = { 'n', 'v' } }, { 'ccs', 'CopilotChatStop' }, }, }, diff --git a/.config/nvim/lua/plugins/look-and-feel.lua b/.config/nvim/lua/plugins/look-and-feel.lua index 3f7236a..137baae 100644 --- a/.config/nvim/lua/plugins/look-and-feel.lua +++ b/.config/nvim/lua/plugins/look-and-feel.lua @@ -166,6 +166,15 @@ local M = { 'vim-scripts/CursorLineCurrentWindow', event = 'BufReadPost', }, + { + 'OXY2DEV/markview.nvim', + ft = 'markdown', -- If you decide to lazy-load anyway + opts = { initial_state = false }, + + dependencies = { + 'nvim-treesitter/nvim-treesitter', + }, + }, } return M diff --git a/.config/nvim/lua/plugins/mini.lua b/.config/nvim/lua/plugins/mini.lua index 27c2624..252ea53 100644 --- a/.config/nvim/lua/plugins/mini.lua +++ b/.config/nvim/lua/plugins/mini.lua @@ -1,6 +1,7 @@ +local the_king = 'echasnovski/mini.' local M = { { - 'echasnovski/mini.indentscope', + the_king .. 'indentscope', version = false, event = 'BufReadPost', opts = { @@ -39,7 +40,7 @@ local M = { end, }, { - 'echasnovski/mini.cursorword', + the_king .. 'cursorword', version = false, event = 'BufReadPost', config = function() @@ -51,7 +52,7 @@ local M = { end, }, { - 'echasnovski/mini.icons', + the_king .. 'icons', lazy = true, opts = {}, init = function() @@ -62,7 +63,7 @@ local M = { end, }, { - 'echasnovski/mini.hipatterns', + the_king .. 'hipatterns', version = false, event = { 'BufNewFile', 'BufReadPre', 'VeryLazy' }, config = function() @@ -80,11 +81,11 @@ local M = { end, }, { - 'echasnovski/mini.notify', + the_king .. 'notify', version = false, lazy = false, keys = { - { 'x', 'lua require("mini.notify").clear()', { silent = true, desc = 'Dismiss all notifications' } }, + { 'x', 'lua require("mini.notify").clear()', { silent = true, desc = 'Dismiss all notifications' } }, { 'n', 'lua require("mini.notify").show_history()', { silent = true, desc = 'Show notifications history' } }, }, init = function() @@ -94,14 +95,26 @@ local M = { end, }, { - 'echasnovski/mini.splitjoin', + the_king .. 'splitjoin', version = false, opts = {}, keys = { 'gS' }, }, { - 'echasnovski/mini.ai', + the_king .. 'surround', version = false, + opts = { + mappings = { + add = 'ys', + delete = 'ds', + replace = "cs", + } + } + }, + { + the_king .. 'ai', + version = false, + event = "VeryLazy", config = function() local gen_spec = require('mini.ai').gen_spec require('mini.ai').setup { @@ -113,8 +126,9 @@ local M = { end, }, { - 'echasnovski/mini.operators', + the_king .. 'operators', version = false, + event = "VeryLazy", opts = { -- g= Evaluate text and replace with output -- gx Exchange text regions diff --git a/zsh.d/term-support.zsh b/zsh.d/term-support.zsh index 8e0fad4..a53df0e 100644 --- a/zsh.d/term-support.zsh +++ b/zsh.d/term-support.zsh @@ -1,4 +1,5 @@ -source /Applications/WezTerm.app/Contents/Resources/wezterm.sh +[[ -f /Applications/WezTerm.app/Contents/Resources/wezterm.sh ]] && \ + source /Applications/WezTerm.app/Contents/Resources/wezterm.sh export TERM=xterm-256color export WEZTERM_SHELL_INTEGRATION=1