diff --git a/cspell.json b/cspell.json index 69bd610..41e9ea7 100644 --- a/cspell.json +++ b/cspell.json @@ -1 +1 @@ -{"words":["nvim","builtins","stylua","rustfmt","pendo","tanstack","ripgrep","Typeahead","overscan","autorun","mediatype","BIOINF","Transitioner","pkce","ilike","arrayify","arrayified","komodo","wezterm","gcloud","pbpaste","Hasher","semvers","upserted","dtos","Yeatts","Mahon","Beaubier","Taussing","chakra","langchain","openai","getattr","llms","docstore","kwargs","svgr","healthcheck","venv","virtualenv","ringofstorms","nestjs","oneshot","templating","tiktoken","pydantic","NCCN","clsx","reactflow","Convo","DSAB","pgvector","postprocess","stylelua","sqlx","genemichaels","williamboman","substr","findfile","Hammerspoon","eventtap","OSTYPE","sccache","binstall","elif","autofocus","colours","Resizer","esac","pannable","zoomable","elkjs","Arrayible","Falsey","xyflow","leftnav","topnav","nodrag","nowheel","janky","draghandle","Sandboxed","Dismissable","dashdraw","chrono","serde","rustls","schemars","webserver","concats","deepmerge","Customizer","reqwest","brotli","peekable","PDEPO","dotenv","taskserver","walkdir","uuidgen","tolower","nzzzv","tabprevious","tabnext","vsplit","tabclose","tabnew","Neotree","noequalalways","equalalways","bufdo","winnr","keymap","mapleader","maplocalleader","keymaps","setloclist","itertools","ollama"],"version":"0.2","language":"en","flagWords":[]} +{"flagWords":[],"words":["nvim","builtins","stylua","rustfmt","pendo","tanstack","ripgrep","Typeahead","overscan","autorun","mediatype","BIOINF","Transitioner","pkce","ilike","arrayify","arrayified","komodo","wezterm","gcloud","pbpaste","Hasher","semvers","upserted","dtos","Yeatts","Mahon","Beaubier","Taussing","chakra","langchain","openai","getattr","llms","docstore","kwargs","svgr","healthcheck","venv","virtualenv","ringofstorms","nestjs","oneshot","templating","tiktoken","pydantic","NCCN","clsx","reactflow","Convo","DSAB","pgvector","postprocess","stylelua","sqlx","genemichaels","williamboman","substr","findfile","Hammerspoon","eventtap","OSTYPE","sccache","binstall","elif","autofocus","colours","Resizer","esac","pannable","zoomable","elkjs","Arrayible","Falsey","xyflow","leftnav","topnav","nodrag","nowheel","janky","draghandle","Sandboxed","Dismissable","dashdraw","chrono","serde","rustls","schemars","webserver","concats","deepmerge","Customizer","reqwest","brotli","peekable","PDEPO","dotenv","taskserver","walkdir","uuidgen","tolower","nzzzv","tabprevious","tabnext","vsplit","tabclose","tabnew","Neotree","noequalalways","equalalways","bufdo","winnr","keymap","mapleader","maplocalleader","keymaps","setloclist","itertools","ollama","ainvoke"],"version":"0.2","language":"en"} diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 8a63230..94f368c 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -19,11 +19,11 @@ require("util").keymaps({ -- ============= { ";", ":", desc = "No shift to enter command mode with semicolon. Alias ; to :", mode = nvx }, { "a", "ggVG", desc = "Select all", mode = nvx }, - { "w", "w", desc = "Save", mode = nvx }, + { "w", ":w", desc = "Save", mode = nvx }, { "q", function() - -- Use to have this which always closed and quit ont he last screen: "confirm q" + -- Use to have this which always closed and quit ont he last screen: ":confirm q" -- Instead I want this behavior: -- if only 1 screen is open then close all buffers, resulting in a blank unnamed buffer window similar to fresh session -- else if more than 1 screen, confirm q to close that screen @@ -40,26 +40,26 @@ require("util").keymaps({ desc = "Quit", mode = nvx, }, - { "Q", "Neotree closeqa", desc = "Quit all", mode = nvx }, + { "Q", ":Neotree close:qa", desc = "Quit all", mode = nvx }, { "Q", "", mode = nvx }, -- don't do normal Q quit { "QQ", - "Neotree closeSessionDeleteqa", + ":Neotree close:SessionDelete:qa", desc = "Quit all, no session saved", mode = nvx, }, { "y", '"+y', desc = "Copy to system clipboard", mode = nvx }, { "p", '"+p', desc = "Paste from system clipboard", mode = nvx }, - { "bq", "bp|bd #", desc = "Close current buffer only", mode = nvx }, - { "tn", "tabnew", desc = "Create new tab", mode = nvx }, - { "tq", "tabclose", desc = "Close current tab", mode = nvx }, - { "H", "tabprevious", desc = "Move to previous tab", mode = nvx }, - { "L", "tabnext", desc = "Move to next tab", mode = nvx }, - { "|", "vsplit", desc = "Vertical Split", mode = nvx }, - { "\\", "split", desc = "Horizontal Split", mode = nvx }, + { "bq", ":bp|bd #", desc = "Close current buffer only", mode = nvx }, + { "tn", ":tabnew", desc = "Create new tab", mode = nvx }, + { "tq", ":tabclose", desc = "Close current tab", mode = nvx }, + { "H", ":tabprevious", desc = "Move to previous tab", mode = nvx }, + { "L", ":tabnext", desc = "Move to next tab", mode = nvx }, + { "|", ":vsplit", desc = "Vertical Split", mode = nvx }, + { "\\", ":split", desc = "Horizontal Split", mode = nvx }, { "S", - "set equalalwaysset noequalalways", + ":set equalalways:set noequalalways", desc = "Equalize/resize screens evenly", mode = nvx, }, @@ -67,7 +67,7 @@ require("util").keymaps({ { "", "j", desc = "Move window below current", mode = nvx }, { "", "k", desc = "Move window above current", mode = nvx }, { "", "l", desc = "Move window right current", mode = nvx }, - { "B", "b#", desc = "Switch to last buffer", mode = nvx }, + { "B", ":b#", desc = "Switch to last buffer", mode = nvx }, { "l", function() @@ -79,7 +79,7 @@ require("util").keymaps({ }, { "ls", - "SqlxFormat", + ":SqlxFormat", desc = "Format sqlx queries in rust raw string literals.", mode = nvx, }, diff --git a/lua/plugins/auto-save.lua b/lua/plugins/auto-save.lua index 2db03e8..dc8589b 100644 --- a/lua/plugins/auto-save.lua +++ b/lua/plugins/auto-save.lua @@ -1,9 +1,6 @@ return { "Pocco81/auto-save.nvim", event = "BufEnter", - init = function() - vim.notify("test") - end, opts = { trigger_events = { "InsertLeave", "TextChanged", "TextChangedI", "BufLeave" }, condition = function(buf) diff --git a/lua/plugins/floatterm.lua b/lua/plugins/floatterm.lua index fee4754..d31affa 100644 --- a/lua/plugins/floatterm.lua +++ b/lua/plugins/floatterm.lua @@ -4,19 +4,19 @@ return { keys = { { "xx", - ":'<,'>FloatermNew --autoclose=2", + "::'<,'>FloatermNew --autoclose=2", desc = "Run selected as command in float terminal", mode = "v", }, { "", - "FloatermToggle", + ":FloatermToggle", desc = "Toggle float terminal", mode = { "n", "i", "v", "x", "c", "t" }, }, { "", - "FloatermNew --disposable", + ":FloatermNew --disposable", desc = "Toggle disposable float terminal", mode = { "v", "n", "i", "x", "c" }, }, diff --git a/lua/plugins/gen-ollama.lua b/lua/plugins/gen-ollama.lua index 0a02c5b..634ea0d 100644 --- a/lua/plugins/gen-ollama.lua +++ b/lua/plugins/gen-ollama.lua @@ -2,6 +2,7 @@ local U = require("util") return { "David-Kunz/gen.nvim", + lazy = false, enabled = function() return U.cmd_executable("ollama", { [false] = function() @@ -14,7 +15,7 @@ return { }) end, opts = { - model = "wizard-vicuna-uncensored", + model = "codellama", -- show_prompt = true, show_model = true, }, @@ -33,14 +34,12 @@ return { g.prompts = { -- https://github.com/David-Kunz/gen.nvim/blob/main/lua/gen/prompts.lua Prompt_Code_Completion = { - prompt = - "Write code that meets these requirements: $input\nOnly output the result in format ```$filetype\n...\n```", + prompt = "Write code that meets these requirements: $input\nOnly output the result in format ```$filetype\n...\n```", replace = true, extract = "```$filetype\n(.-)```", }, - Replace_Code_Completion = { - prompt = - "Rewrite the following code, follow any comment instructions.\nOnly output the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```", + Inline_Selection_Code_Completion = { + prompt = "Rewrite the following code, follow any comment instructions.\nRemove any instruction comments but keep comments about the code. Only output the result with no explanation in format ```$filetype\n...\n```:n```$filetype\n$text\n```", replace = true, extract = "```$filetype\n(.-)```", }, @@ -53,45 +52,54 @@ return { } end, keys = { + -- For some reason selections don't work well when using keys from lazy + which key installed when using `` MUST use `:` for command + { + "x", + ":Gen", + desc = "Show Menu", + mode = { "n", "v", "x" }, + }, { "xm", - "Gen", + function() + require("gen").select_model() + end, desc = "Show Menu", mode = { "n", "v", "x" }, }, { "xx", - "Gen Prompt_Code_Completion", + ":Gen Prompt_Code_Completion", desc = "Input and generate", mode = { "n" }, }, { "xx", - "'<,'>Gen Replace_Code_Completion", + ":'<,'>Gen Inline_Selection_Code_Completion", desc = "Replace selected code", mode = { "v", "x" }, }, { "xc", - "Gen Prompt_And_Answer_Float", + ":Gen Prompt_And_Answer_Float", desc = "Prompt and answer in float window", mode = { "n", "v", "x" }, }, { "xi", - "Gen Prompt_And_Answer_Inline", + ":Gen Prompt_And_Answer_Inline", desc = "Prompt and answer inline at cursor", mode = { "n", "v", "x" }, }, { "xs", - "'<,'>Gen Summarize_Selection_Float", + ":'<,'>Gen Summarize_Selection_Float", desc = "Summarize selection in float window", mode = { "v", "x" }, }, { "xa", - "'<,'>Gen Ask_Selection_Float", + ":'<,'>Gen Ask_Selection_Float", desc = "Ask question about selection in float window", mode = { "v", "x" }, }, diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index d2cd97c..0661ff8 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -104,7 +104,7 @@ return { }, }, keys = { - { "gd", "DiffviewOpen", desc = "Opens git diff view." }, + { "gd", ":DiffviewOpen", desc = "Opens git diff view." }, }, }, } diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua index c151c08..568ec52 100644 --- a/lua/plugins/lazygit.lua +++ b/lua/plugins/lazygit.lua @@ -25,6 +25,6 @@ return { }, build = prereqs, keys = { - { "gg", "LazyGit", desc = "Open lazy git ui" }, + { "gg", ":LazyGit", desc = "Open lazy git ui" }, }, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 619f1ad..bfa591b 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -36,7 +36,7 @@ return { }, }, keys = { - { "e", "Neotree toggle", desc = "Toggle Explorer" }, + { "e", ":Neotree toggle", desc = "Toggle Explorer" }, { "o", function() diff --git a/lua/plugins/open-github.lua b/lua/plugins/open-github.lua index 553ce77..a86eabe 100644 --- a/lua/plugins/open-github.lua +++ b/lua/plugins/open-github.lua @@ -2,7 +2,7 @@ return { "Almo7aya/openingh.nvim", event = "BufEnter", keys = { - { "gf", "OpenInGHFile", desc = "Open in git" }, - { "gf", "OpenInGHFileLines", desc = "Open in git", mode = { "v" } }, + { "gf", ":OpenInGHFile", desc = "Open in git" }, + { "gf", ":OpenInGHFileLines", desc = "Open in git", mode = { "v" } }, }, } diff --git a/lua/plugins/text-case.lua b/lua/plugins/text-case.lua index 1720db1..5269bb8 100644 --- a/lua/plugins/text-case.lua +++ b/lua/plugins/text-case.lua @@ -7,6 +7,6 @@ return { require("telescope").load_extension("textcase") end, keys = { - { ",c", "TextCaseOpenTelescope", desc = "Change case of selection", mode = { "n", "v" } }, + { ",c", ":TextCaseOpenTelescope", desc = "Change case of selection", mode = { "n", "v" } }, }, } diff --git a/lua/plugins/vim-notify.lua b/lua/plugins/vim-notify.lua index 976c128..b8951e4 100644 --- a/lua/plugins/vim-notify.lua +++ b/lua/plugins/vim-notify.lua @@ -1,6 +1,8 @@ return { "rcarriga/nvim-notify", + dependencies = "nvim-telescope/telescope.nvim", lazy = false, + priority = 999, opts = { top_down = false, }, @@ -8,8 +10,9 @@ return { require("notify").setup(opts) vim.notify = require("notify") + require('telescope').load_extension("notify") end, keys = { - { "fn", "Telescope notify", desc = "Telescope search notifications", mode = { "n", "v", "x" } }, + { "fn", ":Telescope notify", desc = "Telescope search notifications", mode = { "n", "v", "x" } }, }, }