Compare commits
7 commits
3812750980
...
7d25e371af
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d25e371af | |||
| bd90df30e4 | |||
| 4b65069436 | |||
| e44baaf207 | |||
| 6578d9acce | |||
| f5c9c2d012 | |||
| 9cca1643ac |
12 changed files with 173 additions and 45 deletions
|
|
@ -8,9 +8,9 @@
|
|||
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
|
||||
"cmp-pandoc.nvim": { "branch": "main", "commit": "30faa4456a7643c4cb02d8fa18438fd484ed7602" },
|
||||
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
|
||||
"codecompanion-gitcommit.nvim": { "branch": "main", "commit": "0ea26d93321e259dbb3766bf7f845ff02284e220" },
|
||||
"codecompanion-history.nvim": { "branch": "main", "commit": "5442513f1303884079c8f13cf8b75da44a3db679" },
|
||||
"codecompanion.nvim": { "branch": "main", "commit": "7ae585e1c868edb523cbb15c49fd15bc3def1261" },
|
||||
"codecompanion-gitcommit.nvim": { "branch": "main", "commit": "e237b9901d64074fa84f74c1b20892303e3e1830" },
|
||||
"codecompanion-history.nvim": { "branch": "main", "commit": "b9f1afb77f1a8805e686f89ac38338a9ca588579" },
|
||||
"codecompanion.nvim": { "branch": "main", "commit": "76f1c1aaedbb159256dbc64705cd34f447046d64" },
|
||||
"conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" },
|
||||
"copilot-lualine": { "branch": "main", "commit": "6bc29ba1fcf8f0f9ba1f0eacec2f178d9be49333" },
|
||||
"copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" },
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
"hunk.nvim": { "branch": "master", "commit": "1e0a4d719c780bb8b0690a54915601508ced321e" },
|
||||
"image.nvim": { "branch": "master", "commit": "a4638ec549c6aa56264cb0371255192ff37a8a90" },
|
||||
"img-clip.nvim": { "branch": "main", "commit": "0bb8b5ced45c2672c70184c87d014194b0705815" },
|
||||
"jj-diffconflicts": { "branch": "feat/remove-instruction-message", "commit": "ee3f9179b2ab94d5177d3935fbf2bc94258d3541" },
|
||||
"jj-diffconflicts": { "branch": "main", "commit": "82b4a871b43c447213243e53b6d8b3c6d5729f6e" },
|
||||
"jupytext.nvim": { "branch": "main", "commit": "c8baf3ad344c59b3abd461ecc17fc16ec44d0f7b" },
|
||||
"lazy-events.nvim": { "branch": "main", "commit": "63802b7ddc852bdfa29e33b158d52429276fa742" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
||||
"nvim-dap-repl-highlights": { "branch": "master", "commit": "307cff2c364d3bf02501d59c405a817967fcd5fb" },
|
||||
"nvim-dap-view": { "branch": "main", "commit": "fc0315087a871f9e74ef88559760b81dae81bc6d" },
|
||||
"nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" },
|
||||
"nvim-lint": { "branch": "master", "commit": "f126af5345c7472e9a0cdbe1d1a29209be72c4c4" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "77d3fdfb3554632c7a3b101ded643d422de7626f" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
"vim-spellsync": { "branch": "master", "commit": "ea9f431483ceb40ede8bd5b126a03eccd49b1bc0" },
|
||||
"wezterm.nvim": { "branch": "main", "commit": "f73bba23ab4becd146fa2d0a3a16a84b987eeaca" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" },
|
||||
"wrapping.nvim": { "branch": "feat/nontextual-detection-option", "commit": "f3eb5d36e518b62430fd705086bc83cf2b1e7ac2" },
|
||||
"wrapping.nvim": { "branch": "feat/nontextual-detection-option", "commit": "cf6e758c04899cbfaa4f4eadccbb91d2439a6c97" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" },
|
||||
"zk-nvim": { "branch": "main", "commit": "fd1ab2239ed85ca51051c094a49a280f4ed76bb2" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,9 @@ local languages = {
|
|||
},
|
||||
quarto = { lint = { quarto = { "markdownlint" } }, format = { quarto = { "prettier", "injected" } } },
|
||||
sh = { lint = { sh = { "shellcheck" } }, format = { sh = { "shellharden", "shfmt" } } },
|
||||
sql = { format = { sql = { "sleek" } }, lint = { sql = { "sqruff" } } },
|
||||
sql = {
|
||||
format = { sql = { "sleek" } },
|
||||
},
|
||||
svelte = { lint = { svelte = { "eslint_d" } }, format = { svelte = { "prettier" } } },
|
||||
terraform = {
|
||||
lsp = { tofu_ls = {} },
|
||||
|
|
|
|||
|
|
@ -119,5 +119,11 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{ "rafikdraoui/jj-diffconflicts", lazy = false },
|
||||
{
|
||||
"rafikdraoui/jj-diffconflicts",
|
||||
config = function()
|
||||
vim.g.jj_diffconflicts_show_usage_message = false
|
||||
end,
|
||||
cmd = {"JJDiffConflicts"},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,43 +58,56 @@ return {
|
|||
opts = {
|
||||
strategies = {
|
||||
chat = { adapter = "groq" },
|
||||
inline = { adapter = "groq" },
|
||||
inline = { adapter = "copilot" },
|
||||
cmd = { adapter = "groq" },
|
||||
},
|
||||
adapters = {
|
||||
groq = function()
|
||||
return require("codecompanion.adapters").extend("openai", {
|
||||
env = {
|
||||
api_key = "GROQ_API_KEY",
|
||||
},
|
||||
name = "Groq",
|
||||
url = "https://api.groq.com/openai/v1/chat/completions",
|
||||
schema = {
|
||||
model = {
|
||||
default = "llama-3.1-8b-instant",
|
||||
choices = {
|
||||
-- production models
|
||||
"llama-3.3-70b-versatile",
|
||||
"llama-3.1-8b-instant",
|
||||
"moonshotai/kimi-k2-instruct",
|
||||
"meta-llama/llama-guard-4-12b",
|
||||
"openai/gpt-oss-120b",
|
||||
"openai/gpt-oss-20b",
|
||||
-- preview models
|
||||
"meta-llama/llama-4-maverick-17b-128e-instruct",
|
||||
"meta-llama/llama-4-scout-17b-16e-instruct",
|
||||
"deepseek-r1-distill-llama-70b",
|
||||
"qwen/qwen3-32b",
|
||||
http = {
|
||||
opts = {
|
||||
show_defaults = true, -- TODO: set to false to only enable working, but does not show copilot then
|
||||
},
|
||||
groq = function()
|
||||
return require("codecompanion.adapters").extend("openai", {
|
||||
env = {
|
||||
api_key = "GROQ_API_KEY",
|
||||
},
|
||||
name = "Groq",
|
||||
url = "https://api.groq.com/openai/v1/chat/completions",
|
||||
schema = {
|
||||
model = {
|
||||
default = "llama-3.1-8b-instant",
|
||||
choices = {
|
||||
-- production models
|
||||
"llama-3.3-70b-versatile",
|
||||
"llama-3.1-8b-instant",
|
||||
"moonshotai/kimi-k2-instruct",
|
||||
"meta-llama/llama-guard-4-12b",
|
||||
"openai/gpt-oss-120b",
|
||||
"openai/gpt-oss-20b",
|
||||
-- preview models
|
||||
"meta-llama/llama-4-maverick-17b-128e-instruct",
|
||||
"meta-llama/llama-4-scout-17b-16e-instruct",
|
||||
"deepseek-r1-distill-llama-70b",
|
||||
"qwen/qwen3-32b",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
max_tokens = {
|
||||
default = 4096,
|
||||
},
|
||||
temperature = {
|
||||
default = 1,
|
||||
},
|
||||
})
|
||||
end,
|
||||
max_tokens = {
|
||||
default = 4096,
|
||||
},
|
||||
temperature = {
|
||||
default = 1,
|
||||
},
|
||||
})
|
||||
end,
|
||||
gemini = function()
|
||||
return require("codecompanion.adapters").extend("gemini", {
|
||||
env = {
|
||||
api_key = "GEMINI_API_KEY",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
display = {
|
||||
action_palette = {
|
||||
|
|
@ -129,6 +142,78 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
prompt_library = {
|
||||
|
||||
["Smart Paste"] = {
|
||||
strategy = "inline",
|
||||
description = "Paste code smartly",
|
||||
opts = { short_name = "paste" },
|
||||
prompts = {
|
||||
{
|
||||
role = "user",
|
||||
content = [[
|
||||
You are a smart code paste agent within Neovim.
|
||||
|
||||
## **Task:** Intelligently integrate content from the user's clipboard into the current buffer.
|
||||
|
||||
## **Instructions:**
|
||||
|
||||
- You may receive code in various programming languages or even natural language instructions.
|
||||
- If the clipboard content is in a different language than the current buffer, translate it to the appropriate language smartly.
|
||||
- If the clipboard content contains pseudo code generate code accordingly.
|
||||
- If the clipboard content contains natural language instructions, interpret and follow them to modify the code in the current buffer.
|
||||
- **ONLY** generate the **new** lines of code required for seamless integration.
|
||||
- Ensure the inserted code is syntactically correct and logically consistent with the existing code.
|
||||
- Do **NOT** include surrounding code or line numbers.
|
||||
- Make sure all brackets and quotes are closed properly.
|
||||
|
||||
## **Output:**
|
||||
|
||||
- Provide only the necessary lines of code for insertion.
|
||||
- If you can't generate code just return nothing.
|
||||
- Ensure the response is proper and well-formatted.
|
||||
]],
|
||||
},
|
||||
{
|
||||
role = "user",
|
||||
content = function(context)
|
||||
local lines = require("codecompanion.helpers.actions").get_code(
|
||||
1,
|
||||
context.line_count,
|
||||
{ show_line_numbers = true }
|
||||
)
|
||||
local selection_info = ""
|
||||
local clipboard = vim.fn.getreg("+")
|
||||
|
||||
if context.is_visual then
|
||||
selection_info = string.format(
|
||||
"Currently selected lines: %d-%d",
|
||||
context.start_line,
|
||||
context.end_line
|
||||
)
|
||||
else
|
||||
selection_info = string.format(
|
||||
"Current cursor line: %d and Current cursor column is %d",
|
||||
context.cursor_pos[1],
|
||||
context.cursor_pos[2]
|
||||
)
|
||||
end
|
||||
|
||||
return string.format(
|
||||
"I have the following code:\n\n```%s\n%s\n```\n\nClipboard content:\n\n```\n%s\n```\n\n%s",
|
||||
context.filetype,
|
||||
lines,
|
||||
clipboard,
|
||||
selection_info
|
||||
)
|
||||
end,
|
||||
opts = {
|
||||
contains_code = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>aa", "<cmd>CodeCompanionActions<cr>", desc = "Actions", silent = true, mode = { "n", "v" } },
|
||||
|
|
|
|||
|
|
@ -332,6 +332,18 @@ local prose_plugs = {
|
|||
{ "<leader>nn", "<cmd>ZkNew { title = vim.fn.input('Title: ') }<cr>", desc = "new note" },
|
||||
{ "<leader>nn", ":'<,'>ZkNewFromTitleSelection<cr>", desc = "new note from selection", mode = "v" },
|
||||
{ "<leader>nN", ":'<,'>ZkNewFromContentSelection<cr>", desc = "content from selection", mode = "v" },
|
||||
{ "<leader>nj", "<cmd>ZkNew { dir = 'journal', group = 'daily' }<cr>", desc = "daily journal note" },
|
||||
{ "<leader>nJ", "<cmd>ZkNew { dir = 'journal', group = 'weekly' }<cr>", desc = "weekly journal note" },
|
||||
|
||||
{ "<leader>na", "<cmd>ZkInsertLink<cr>", desc = "insert link" },
|
||||
{ "<c-s>", "<cmd>ZkInsertLink<cr>", desc = "insert link", mode = "i" },
|
||||
{
|
||||
"<leader>na",
|
||||
":'<,'>ZkInsertLinkAtSelection<cr>",
|
||||
desc = "insert link at selection",
|
||||
mode = "v",
|
||||
},
|
||||
|
||||
{ "<leader>nl", "<cmd>ZkNotes { sort = { 'modified' } }<cr>", desc = "note list" },
|
||||
{
|
||||
"<leader>nf",
|
||||
|
|
@ -343,6 +355,7 @@ local prose_plugs = {
|
|||
{ "<leader>nt", "<cmd>ZkTags<cr>", desc = "note tags" },
|
||||
{ "<leader>nc", "<cmd>ZkCd<cr>", desc = "notedir cd" },
|
||||
{ "<leader>no", "<cmd>ZkOrphans { sort = { 'modified' } }<cr>", desc = "orphans list" },
|
||||
|
||||
{ "<localleader>nb", "<cmd>ZkBacklinks<cr>", desc = "note backlinks" },
|
||||
{ "<localleader>nl", "<cmd>ZkLinks<cr>", desc = "note links" },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ alias ls='ls --color=auto'
|
|||
|
||||
eval "$(starship init bash)"
|
||||
eval "$(zoxide init bash)"
|
||||
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
|
||||
source <(carapace _carapace)
|
||||
|
||||
set -o vi
|
||||
stty time 0
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.n
|
|||
atuin init nu | save -f ($nu.data-dir | path join "vendor/autoload/atuin.nu")
|
||||
# load zoxide bookmarks
|
||||
zoxide init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zoxide.nu")
|
||||
# load carapace completions
|
||||
source ~/.cache/carapace/init.nu
|
||||
|
||||
|
||||
# keybinds
|
||||
$env.config.keybindings = [
|
||||
|
|
|
|||
|
|
@ -16,3 +16,8 @@
|
|||
#
|
||||
# You can remove these comments if you want or leave
|
||||
# them for future reference.
|
||||
|
||||
## create carapace completions
|
||||
$env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense' # optional
|
||||
mkdir ~/.cache/carapace
|
||||
carapace _carapace nushell | save --force ~/.cache/carapace/init.nu
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
format = """
|
||||
$sudo\
|
||||
$custom\
|
||||
$username\
|
||||
$directory\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$status\
|
||||
$character
|
||||
$character\
|
||||
"""
|
||||
|
||||
right_format ="""
|
||||
|
|
@ -80,6 +81,10 @@ symbol = " "
|
|||
style = 'bold yellow'
|
||||
format = "[$symbol]($style)"
|
||||
|
||||
[custom.shell_bash_indicator]
|
||||
command = 'echo '
|
||||
when = ''' test "$0" = "/usr/bin/bash" '''
|
||||
|
||||
# TODO: Would be lovely to have jujutsu support here
|
||||
# An example implementation: https://github.com/jj-vcs/jj/wiki/Starship
|
||||
# But currently very slow. Can be added with e.g. '${custom.jj}\' in format above
|
||||
|
|
|
|||
|
|
@ -126,6 +126,8 @@ setopt autocd
|
|||
eval "$(starship init zsh)"
|
||||
eval "$(zoxide init zsh)"
|
||||
eval "$(atuin init zsh)"
|
||||
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
|
||||
source <(carapace _carapace)
|
||||
|
||||
# Speed up autocomplete, force prefix mapping
|
||||
zstyle ':completion:*' accept-exact '*(N)'
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ merge-editor = "dc"
|
|||
program = "nvim"
|
||||
merge-args = [
|
||||
"-c", "let g:jj_diffconflicts_marker_length=$marker_length",
|
||||
"-c", "let g:jj_diffconflicts_turn_off_instructions=1",
|
||||
"-c", "JJDiffConflicts!", "$output", "$base", "$left", "$right"
|
||||
]
|
||||
merge-tool-edits-conflict-markers = true
|
||||
|
|
|
|||
|
|
@ -29,8 +29,14 @@ if [ -n "${WIKIROOT}" ]; then
|
|||
nnn() { # 'new quicknote'
|
||||
_zk_wiki new -t "${*:-$(date)}"
|
||||
}
|
||||
nnl() { # 'new note log'
|
||||
_zk_wiki log "$@"
|
||||
nnl() { # 'new daily journal note'
|
||||
_zk_wiki day "$@"
|
||||
}
|
||||
nnw() { # 'new weekly journal note'
|
||||
_zk_wiki week "$@"
|
||||
}
|
||||
nnW() { # 'new weekly planning note'
|
||||
_zk_wiki weekplan "$@"
|
||||
}
|
||||
nnd() { # 'new note draft'
|
||||
_zk_wiki draft "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue