12 Commits

Author SHA1 Message Date
72e01ce321 add pairs 2025-06-19 18:27:24 +03:00
08583ff839 add blink sources 2025-06-19 18:27:14 +03:00
09a7cda545 small changes 2025-06-19 18:27:08 +03:00
4f00972dec update parrot 2025-06-19 18:26:56 +03:00
7e3b1dd83e update treesitter 2025-06-19 18:26:49 +03:00
9951270d0b add parrot, use fzf for blink 2025-04-22 11:13:26 +03:00
f19091b3ec mason-lspconfig: disable automatic installation 2025-04-12 11:09:18 +03:00
350beee4f1 update blink cmp 2025-04-12 11:08:09 +03:00
a2c7c46185 update ufo (not sure if this did something) 2025-03-28 10:39:33 +02:00
c0545fd267 upgrade packages 2025-03-18 16:57:40 +02:00
cfec54bead remove mini pairs 2025-03-18 16:57:30 +02:00
952d016f70 update obsidian, update cprev and cnext keybinds 2025-03-18 16:51:48 +02:00
11 changed files with 199 additions and 54 deletions

View File

@@ -1,40 +1,43 @@
{
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"blink.cmp": { "branch": "main", "commit": "18b352d12b35bca148427b607098df14b75a218f" },
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
"blink-ripgrep.nvim": { "branch": "main", "commit": "12fb7348cf9d32a0ed2e3ab4960d561632e57ba4" },
"blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"gitsigns.nvim": { "branch": "main", "commit": "6668f379ca634c36b8e11453118590b91bf8b295" },
"gruvbox.nvim": { "branch": "main", "commit": "089b60e92aa0a1c6fa76ff527837cd35b6f5ac81" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "c53ba4f40f0514a5038646fb1e9ce05872b18eb1" },
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
"gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" },
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
"lazy.nvim": { "branch": "main", "commit": "e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0" },
"lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" },
"lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
"none-ls.nvim": { "branch": "main", "commit": "f41624ea1a73f020ddbd33438f74abb95ea17d55" },
"hererocks": { "branch": "master", "commit": "4ce92131e9858950440ab99a25db9a9b43db8cd4" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f54e3c11fc9ebfcfc27e696182b0295b071d0811" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"mini.pairs": { "branch": "main", "commit": "42407ccb80ec59c84e7c91d815f42ed90a8cc093" },
"none-ls.nvim": { "branch": "main", "commit": "db2a48b79cfcdab8baa5d3f37f21c78b6705c62e" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" },
"nvim-sops": { "branch": "main", "commit": "cb2209562d00ef8c6c88bdec836d9edb8fbb96ef" },
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
"nvim-treesitter": { "branch": "master", "commit": "1a6e42bb8c5c23d8e2c0acb842dcacac5ee06761" },
"nvim-ufo": { "branch": "main", "commit": "a52c92c3bbaa10f0c9b547a50adaa8c7d8b29f94" },
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
"oil.nvim": { "branch": "master", "commit": "975a77cce3c8cb742bc1b3629f4328f5ca977dad" },
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-ufo": { "branch": "main", "commit": "80fe8215ba566df2fbf3bf4d25f59ff8f41bc0e1" },
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
"obsidian.nvim": { "branch": "main", "commit": "2f0222b3eb20382cadf3e1d91f368318b768771c" },
"oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" },
"parrot.nvim": { "branch": "main", "commit": "0477748832812707e53db078d0180299a0c15d6c" },
"plenary": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
"statuscol.nvim": { "branch": "main", "commit": "a2a0e3ed55ba0f636ce0b2ccf61bca4050edd288" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" },
"telescope.nvim": { "branch": "master", "commit": "78857db9e8d819d3cc1a9a7bdc1d39d127a36495" },
"statuscol.nvim": { "branch": "main", "commit": "c46172d0911aa5d49ba5f39f4351d1bb7aa289cc" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"undotree": { "branch": "master", "commit": "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" },
"vim-fugitive": { "branch": "master", "commit": "b068eaf1e6cbe35d1ac100d435cd7f7b74a5c87d" },
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" }
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
"vim-helm": { "branch": "master", "commit": "cc5ac22444332381f38084a6c7f023c25eef6201" }
}

View File

@@ -2,25 +2,26 @@ return {
'saghen/blink.cmp',
-- optional: provides snippets for the snippet source
dependencies = {
'mikavilpas/blink-ripgrep.nvim',
'rafamadriz/friendly-snippets',
{ 'L3MON4D3/LuaSnip', version = 'v2.*' }
},
-- use a release tag to download pre-built binaries
version = 'v0.*',
version = 'v1.4.*',
opts = {
fuzzy = { implementation = 'prefer_rust_with_warning' },
snippets = {
preset = 'luasnip',
expand = function(snippet) require('luasnip').lsp_expand(snippet) end,
active = function(filter)
if filter and filter.direction then
return require('luasnip').jumpable(filter.direction)
end
return require('luasnip').in_snippet()
end,
jump = function(direction) require('luasnip').jump(direction) end,
},
cmdline = {
keymap = { preset = 'cmdline' },
completion = {
list = { selection = { preselect = false, auto_insert = true } }
}
},
completion = { list = { selection = { preselect = false, auto_insert = true } } },
keymap = {
preset = 'enter',
@@ -34,7 +35,47 @@ return {
},
sources = {
default = { 'lsp', 'snippets', 'path', 'buffer' },
default = { 'lazydev', 'lsp', 'snippets', 'ripgrep', 'path', 'buffer' },
providers = {
lazydev = {
name = 'LazyDev',
module = 'lazydev.integrations.blink',
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
ripgrep = {
module = 'blink-ripgrep',
name = 'Ripgrep',
-- the options below are optional, some default values are shown
---@module 'blink-ripgrep'
---@type blink-ripgrep.Options
opts = {
max_filesize = '1M',
project_root_marker = '.git',
project_root_fallback = true,
search_casing = '--ignore-case',
additional_rg_options = {},
fallback_to_regex_highlighting = true,
ignore_paths = {},
additional_paths = {},
future_features = {
backend = {
use = 'ripgrep',
},
},
debug = false,
},
transform_items = function(_, items)
for _, item in ipairs(items) do
-- example: append a description to easily distinguish rg results
item.labelDetails = {
description = '(rg)',
}
end
return items
end,
},
},
},
signature = { enabled = true }

View File

@@ -23,6 +23,8 @@ return {
},
config = function()
vim.diagnostic.config({ virtual_text = false })
local lspconfig = require('lspconfig')
-- load snippets from friendly-snippets
@@ -31,6 +33,7 @@ return {
require('fidget').setup({})
require('mason').setup({})
require('mason-lspconfig').setup({
automatic_installation = false,
-- Replace the language servers listed here
-- with the ones you want to install
ensure_installed = {

View File

@@ -56,7 +56,7 @@ return {
lualine_c = {
{
'filename',
path = 4,
path = 1,
},
{
'navic',

View File

@@ -1,8 +0,0 @@
return {
'echasnovski/mini.pairs',
version = '*',
config = function()
require('mini.pairs').setup()
end
}

View File

@@ -1,13 +1,13 @@
return {
'epwalsh/obsidian.nvim',
'obsidian-nvim/obsidian.nvim',
version = '*', -- recommended, use latest release instead of latest commit
dependencies = {
-- Required.
'nvim-lua/plenary.nvim',
},
keys = {
{'<leader>ot', '<cmd>ObsidianToday<CR>', desc = "Open today's daily note"},
{'<leader>os', '<cmd>ObsidianQuickSwitch<CR>', desc = 'Search notes in my vault and switch to selected'},
{ '<leader>ot', '<cmd>ObsidianToday<CR>', desc = "Open today's daily note" },
{ '<leader>os', '<cmd>ObsidianQuickSwitch<CR>', desc = 'Search notes in my vault and switch to selected' },
},
mappings = {
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
@@ -41,12 +41,16 @@ return {
},
daily_notes = {
folder = 'Daily',
date_format = '%d-%b-%y (%A)',
date_format = '%Y-%m-%d (%A)',
default_tags = { 'daily' },
template = 'Daily.md',
},
templates = {
folder = 'Templates',
},
completion = {
blink = true,
nvim_cmp = false,
}
},
}

View File

@@ -0,0 +1,56 @@
return {
'echasnovski/mini.pairs',
event = 'VeryLazy',
opts = {
modes = { insert = true, command = true, terminal = false },
-- skip autopair when next character is one of these
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
-- skip autopair when the cursor is inside these treesitter nodes
skip_ts = { "string" },
-- skip autopair when next character is closing pair
-- and there are more closing pairs than opening pairs
skip_unbalanced = true,
-- better deal with markdown code blocks
markdown = true,
},
config = function(_, opts)
local pairs = require("mini.pairs")
pairs.setup(opts)
local open = pairs.open
pairs.open = function(pair, neigh_pattern)
if vim.fn.getcmdline() ~= "" then
return open(pair, neigh_pattern)
end
local o, c = pair:sub(1, 1), pair:sub(2, 2)
local line = vim.api.nvim_get_current_line()
local cursor = vim.api.nvim_win_get_cursor(0)
local next = line:sub(cursor[2] + 1, cursor[2] + 1)
local before = line:sub(1, cursor[2])
if opts.markdown and o == "`" and vim.bo.filetype == "markdown" and before:match("^%s*``") then
return "`\n```" .. vim.api.nvim_replace_termcodes("<up>", true, true, true)
end
if opts.skip_next and next ~= "" and next:match(opts.skip_next) then
return o
end
if opts.skip_ts and #opts.skip_ts > 0 then
local ok, captures = pcall(vim.treesitter.get_captures_at_pos, 0, cursor[1] - 1,
math.max(cursor[2] - 1, 0))
for _, capture in ipairs(ok and captures or {}) do
if vim.tbl_contains(opts.skip_ts, capture.capture) then
return o
end
end
end
if opts.skip_unbalanced and next == c and c ~= o then
local _, count_open = line:gsub(vim.pesc(pair:sub(1, 1)), "")
local _, count_close = line:gsub(vim.pesc(pair:sub(2, 2)), "")
if count_close > count_open then
return o
end
end
return open(pair, neigh_pattern)
end
end,
}

View File

@@ -0,0 +1,45 @@
return {
'frankroeder/parrot.nvim',
version = "2.1.0",
dependencies = { 'ibhagwan/fzf-lua', 'nvim-lua/plenary.nvim' },
opts = {
providers = {
anthropic = {
name = "anthropic",
endpoint = "https://api.anthropic.com/v1/messages",
model_endpoint = "https://api.anthropic.com/v1/models",
api_key = { "/usr/local/bin/sops", "--config", "/dev/null", "-d", vim.fn.expand("$HOME") .. "/.claude-api" },
headers = function(self)
return {
["Content-Type"] = "application/json",
["x-api-key"] = self.api_key,
["anthropic-version"] = "2023-06-01",
}
end,
params = {
chat = { max_tokens = 4096 },
command = { max_tokens = 4096 },
},
models = {
"claude-sonnet-4-20250514",
"claude-3-7-sonnet-20250219",
"claude-3-5-sonnet-20241022",
"claude-3-5-haiku-20241022",
},
preprocess_payload = function(payload)
for _, message in ipairs(payload.messages) do
message.content = message.content:gsub("^%s*(.-)%s*$", "%1")
end
if payload.messages[1] and payload.messages[1].role == "system" then
-- remove the first message that serves as the system prompt as anthropic
-- expects the system prompt to be part of the API call body and not the messages
payload.system = payload.messages[1].content
table.remove(payload.messages, 1)
end
return payload
end,
}
}
}
}

View File

@@ -1,5 +1,6 @@
return {
'nvim-treesitter/nvim-treesitter',
branch='master',
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({

View File

@@ -11,8 +11,8 @@ return {
require('statuscol').setup({
relculright = true,
segments = {
{ text = { builtin.foldfunc }, sign = { colwidth = 2 }, click = 'v:lua.ScFa', },
{ text = { '%s' }, click = 'v:lua.ScSa', hl = 'FoldColumn' },
{ text = { builtin.foldfunc }, sign = { colwidth = 1 }, click = 'v:lua.ScFa', },
{ text = { '%s' }, sign = { colwidth = 1 }, click = 'v:lua.ScSa', hl = 'FoldColumn' },
{ text = { builtin.lnumfunc, ' ' }, click = 'v:lua.ScLa', hl = 'FoldColumn' },
},
})

View File

@@ -35,6 +35,6 @@ vim.keymap.set("n", "<leader><leader>x", "<cmd>source %<CR>")
vim.keymap.set("n", "<leader>x", ":.lua<CR>")
vim.keymap.set("v", "<leader>x", ":lua<CR>")
vim.keymap.set("n", "<M-j>", "<cmd>cnext<CR>")
vim.keymap.set("n", "<M-k>", "<cmd>cprev<CR>")
vim.keymap.set("n", "<C-M-j>", "<cmd>cnext<CR>")
vim.keymap.set("n", "<C-M-k>", "<cmd>cprev<CR>")