39 Commits

Author SHA1 Message Date
fd4c38e01b feat(ftplugin): sh formatting 2026-04-01 11:09:14 +03:00
2dc040f17d chore(update): plugins 2026-04-01 11:09:01 +03:00
331411e35b chore(filetypes): cleanup 2026-03-18 10:50:05 +02:00
0931940cfa update filetypes for yaml languages 2026-03-14 14:37:04 +02:00
a28dafa553 update neovim 2026-03-07 19:09:26 +02:00
6197dace5c feat(pairs): install pairs 2026-02-19 12:34:59 +02:00
9718a5a67b chore(cleanup): remove obsolete keymaps 2026-02-19 12:34:36 +02:00
3ce59f2e5b fix(lsp): terraformls root path 2026-02-19 12:34:20 +02:00
eeec610f47 fix(lsp): fix helm_ls configuration 2026-02-19 12:34:03 +02:00
67bf866434 feat(tabline): cleanup looks 2026-02-16 11:35:37 +02:00
02f9153d13 feat(ftplugin): add terraform surround 2026-02-16 11:35:24 +02:00
40bdbd29d0 feat(surround): add surround for ansible variables 2026-02-13 16:26:03 +02:00
62f2d0b543 feat(blink): upgrade to 1.9x 2026-02-13 16:25:50 +02:00
cbe2ac12ef fix(blink-cmp): snippet is not active when blink is visible 2026-02-13 13:18:00 +02:00
c27eb5c525 feat(parrot): v2.5.1 2026-02-11 11:46:27 +02:00
6c19e9650e fix(lspconfig): remove double setup for lazydev 2026-02-11 11:46:15 +02:00
62bb06793d refactor: quotes 2026-02-11 09:45:42 +02:00
b6457ecfac feat(parrot): update models 2026-02-11 09:26:02 +02:00
a4f2b22f7a map: use zsh for sessionizer 2026-01-29 10:25:08 +02:00
2472bedbec fugitive: remove push map, update pull map 2026-01-29 10:24:52 +02:00
4b1dfbdf1d remove obsidian nvim 2026-01-22 09:39:41 +02:00
2e720f619c ftplugin: remove makefile autocmd 2026-01-03 10:27:34 +02:00
3f24d17ec8 upgrade plugins 2026-01-03 10:26:36 +02:00
869be617bf parrot: add F12 keymap to toggle chat 2025-12-10 09:50:27 +02:00
fddc6b8ee1 blink: enable friendly-snippets 2025-12-10 09:48:31 +02:00
70dfeab75c parrot: replace input with buffer instead of ui.input 2025-12-10 09:48:16 +02:00
7dad3514e0 parrot: update models 2025-12-10 09:48:04 +02:00
cd7f789302 fix C-l keybind 2025-12-10 09:38:27 +02:00
405ec5da4f remove vim-helm 2025-12-09 10:22:11 +02:00
788ef34c04 upgrade plugins 2025-12-09 10:21:56 +02:00
a44a75b745 Revert "upgrade nvim plugins"
This reverts commit 74e77ca34a.
2025-12-08 16:56:33 +02:00
74e77ca34a upgrade nvim plugins 2025-12-06 15:22:11 +02:00
a4a48adc08 upgrade blink, switch to C-n for completion 2025-12-06 15:19:33 +02:00
3dbb63738b fugitive keymaps 2025-12-03 12:45:48 +02:00
3c768051f5 json ftplugin 2025-12-03 12:44:21 +02:00
39b68e0d54 restructure snippets 2025-12-03 12:44:11 +02:00
24bb947547 advanced_grep: allow looking for directories or files 2025-11-04 10:25:00 +02:00
9d9934f133 add testing directory 2025-11-04 10:09:43 +02:00
7e7a4a5543 fix advanced search auto globbing feature 2025-11-04 10:02:32 +02:00
28 changed files with 404 additions and 363 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
lua/testing

7
after/ftplugin/json.lua Normal file
View File

@@ -0,0 +1,7 @@
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
vim.opt_local.expandtab = true
vim.opt_local.conceallevel = 0

View File

@@ -3,10 +3,3 @@ vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4 vim.opt_local.softtabstop = 4
vim.opt_local.expandtab = false vim.opt_local.expandtab = false
vim.api.nvim_create_autocmd("FileType", {
pattern = "make",
callback = function()
print("Makefile detected and ftplugin loaded!")
end,
})

4
after/ftplugin/sh.lua Normal file
View File

@@ -0,0 +1,4 @@
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.expandtab = true

View File

@@ -4,3 +4,15 @@ vim.opt.tabstop = 2
vim.opt.expandtab = true vim.opt.expandtab = true
vim.bo.commentstring = '# %s' vim.bo.commentstring = '# %s'
local surround = require('nvim-surround')
surround.buffer_setup({
surrounds = {
['v'] = {
add = { '${', '}' },
find = '%${[^}]-}',
delete = '(%${)().+(})()$',
}
}
})

View File

@@ -0,0 +1,15 @@
-- update this configuration of nvim-surround
-- to handle {{ }} structure in ansible
-- I want to be able to add and delete those braces
local surround = require('nvim-surround')
surround.buffer_setup({
surrounds = {
['v'] = {
add = { '{{ ', ' }}' },
find = '{{[^}]-}}',
delete = '({{%s+)().+(%s+}})()$',
}
}
})

View File

@@ -1,50 +1,48 @@
{ {
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
"blink-ripgrep.nvim": { "branch": "main", "commit": "0c0d9db740ca70aa739e40f50589b01e537ade6d" }, "blink-ripgrep.nvim": { "branch": "main", "commit": "75e7dbc4e2b12ea8db63c97e4dd3edd793381c05" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, "blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" }, "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"fzf-lua": { "branch": "main", "commit": "83e4080ae886a42ec48c5c26ce5892ceb557c425" }, "fzf-lua": { "branch": "main", "commit": "c9e7b7bfbd01f949164988ee1684035468e1995c" },
"gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" }, "gitsigns.nvim": { "branch": "main", "commit": "50c205548d8b037b7ff6378fca6d21146f0b6161" },
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" }, "gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"hererocks": { "branch": "master", "commit": "160228946bed9998f5e3b168bd0b66ba2690f8f3" }, "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" }, "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"lualine.nvim": { "branch": "master", "commit": "e533fac71bc361768f90004af695cd1f1aa1900a" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "037398b9ce4a53ba48d5f94765c641a1fd16d906" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, "mini.pairs": { "branch": "main", "commit": "d5a29b6254dad07757832db505ea5aeab9aad43a" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "c4c168e459395275c552179a1baf9c3d885d6a74" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
"none-ls.nvim": { "branch": "main", "commit": "a96172f673f720cd4f3572e1fcd08400ed3eb25d" }, "none-ls.nvim": { "branch": "main", "commit": "c9317c2a8629d4e39e7cf47be74cb67f3ab37cda" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "5bfcc89fd155b4ffc02d18ab3b7d19c2d4e246a7" }, "nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
"nvim-navic": { "branch": "master", "commit": "099b4c8cdc3e9ea026ea6b2a0d315e2d28362242" }, "nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" },
"nvim-sops": { "branch": "main", "commit": "cb2209562d00ef8c6c88bdec836d9edb8fbb96ef" }, "nvim-sops": { "branch": "main", "commit": "1791eec21e78c9736ae504f02712a2f509c69b2c" },
"nvim-surround": { "branch": "main", "commit": "a868c256c861044beb9794b4dd126480dcdfbdad" }, "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
"nvim-treesitter": { "branch": "main", "commit": "0606c7a9dcaa5c5beee0b0f09043e9fdd1ba0a68" }, "nvim-treesitter": { "branch": "main", "commit": "7caec274fd19c12b55902a5b795100d21531391f" },
"nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" }, "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" },
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" }, "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
"obsidian.nvim": { "branch": "main", "commit": "6b2a22a74d1c883e797764c28f75aa6b532a1ae4" }, "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
"oil.nvim": { "branch": "master", "commit": "200df01e4b92d0010a3bfbde92b91a4ef5a5c9db" }, "parrot.nvim": { "branch": "main", "commit": "5d7e72bdc3efe2638e1bd94ff55028ecc40edd7a" },
"parrot.nvim": { "branch": "main", "commit": "dcae923c7070431c8cb628b19594ab640168684c" },
"plenary": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "plenary": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"render-markdown.nvim": { "branch": "main", "commit": "691651de4e02cbea9ff50c62d7d3a679abc95564" }, "render-markdown.nvim": { "branch": "main", "commit": "e3c18ddd27a853f85a6f513a864cf4f2982b9f26" },
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" }, "search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
"statuscol.nvim": { "branch": "main", "commit": "c46172d0911aa5d49ba5f39f4351d1bb7aa289cc" }, "statuscol.nvim": { "branch": "main", "commit": "c46172d0911aa5d49ba5f39f4351d1bb7aa289cc" },
"tabby.nvim": { "branch": "main", "commit": "b3affa6db7eab80fca2a2db5b73b473144507039" }, "tabby.nvim": { "branch": "main", "commit": "3c130e1fcb598ce39a9c292847e32d7c3987cf11" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "telescope.nvim": { "branch": "master", "commit": "e6cdb4dc528c5dc4ca8da86e83ef4e3c84b0729c" },
"trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" }, "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" }, "vim-dadbod": { "branch": "master", "commit": "6d1d41da4873a445c5605f2005ad2c68c99d8770" },
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
"vim-dadbod-ui": { "branch": "master", "commit": "e8b53c0f3aa6e6127ac2a2d2071d9aade6c6e373" }, "vim-dadbod-ui": { "branch": "master", "commit": "07e92e22114cc5b1ba4938d99897d85b58e20475" },
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
"vim-helm": { "branch": "master", "commit": "2c8525fd98e57472769d137317bca83e477858ce" },
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" } "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }
} }

View File

@@ -13,12 +13,6 @@ autocmd('LspAttach', {
local opts = { buffer = e.buf } local opts = { buffer = e.buf }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrr", function() builtin.lsp_references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set("n", "[d", function() vim.diagnostic.jump({ count = 1 }) end, opts) vim.keymap.set("n", "[d", function() vim.diagnostic.jump({ count = 1 }) end, opts)
vim.keymap.set("n", "]d", function() vim.diagnostic.jump({ count = -1 }) end, opts) vim.keymap.set("n", "]d", function() vim.diagnostic.jump({ count = -1 }) end, opts)
vim.keymap.set("n", "<M-F>", function() vim.lsp.buf.format() end, opts) vim.keymap.set("n", "<M-F>", function() vim.lsp.buf.format() end, opts)

View File

@@ -1,20 +1,24 @@
vim.filetype.add({ vim.filetype.add({
extension = { extension = {
['tf'] = 'terraform', ['tf'] = 'terraform',
},
pattern = {
['.*/playbooks/.*%.ya?ml'] = 'yaml.ansible',
['.*/roles/.*%.ya?ml'] = 'yaml.ansible',
['.*/tasks/.*%.ya?ml'] = 'yaml.ansible',
['.*/plays/.*%.ya?ml'] = 'yaml.ansible',
},
})
vim.filetype.add({
extension = {
j2 = 'jinja', j2 = 'jinja',
jinja = 'jinja', jinja = 'jinja',
jinja2 = 'jinja', jinja2 = 'jinja',
} },
pattern = {
['.*/roles/.*%.ya?ml'] = 'yaml.ansible',
['.*/tasks/.*%.ya?ml'] = 'yaml.ansible',
['.*/plays/.*%.ya?ml'] = 'yaml.ansible',
-- templates
['.*/templates/.*%.ya?ml'] = 'helm',
['.*/templates/.*%.tpl'] = 'helm',
['helmfile%.ya?ml'] = 'helm',
-- values files
['.*/helm/.*values.*%.ya?ml'] = 'yaml.helm-values',
['values%.ya?ml'] = 'yaml.helm-values',
-- gitlab-ci
['%.gitlab%-ci%.ya?ml'] = 'yaml.gitlab',
['pipelines/.*%.ya?ml'] = 'yaml.gitlab',
},
}) })

View File

@@ -3,6 +3,6 @@ require("crentist.set")
require("crentist.lazy_init") require("crentist.lazy_init")
require("crentist.autocmd") require("crentist.autocmd")
require("crentist.filetype") require("crentist.filetype")
require("crentist.luasnip") require("crentist.snippets")
require("crentist.null-ls") require("crentist.null-ls")

View File

@@ -7,7 +7,7 @@ return {
{ 'L3MON4D3/LuaSnip', version = 'v2.*' } { 'L3MON4D3/LuaSnip', version = 'v2.*' }
}, },
-- use a release tag to download pre-built binaries -- use a release tag to download pre-built binaries
version = 'v1.7.*', version = 'v1.9.*',
---@module 'blink-cmp' ---@module 'blink-cmp'
---@type blink.cmp.Config ---@type blink.cmp.Config
@@ -19,10 +19,13 @@ return {
active = function(filter) active = function(filter)
local snippet = require('luasnip') local snippet = require('luasnip')
local blink = require('blink.cmp') local blink = require('blink.cmp')
if snippet.in_snippet() and not blink.is_visible() then if snippet.in_snippet() then
return true return true
else else
if not snippet.in_snippet() and vim.fn.mode() == 'n' then snippet.unlink_current() end if not snippet.in_snippet() and vim.fn.mode() == 'n' then
snippet.unlink_current()
vim.snippet.stop()
end
return false return false
end end
end end
@@ -35,12 +38,7 @@ return {
} }
}, },
completion = { list = { selection = { preselect = false, auto_insert = true } } }, completion = { list = { selection = { preselect = false, auto_insert = true } } },
keymap = { keymap = { preset = 'enter' },
preset = 'enter',
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
['<S-Tab>'] = { 'select_prev', 'snippet_backward', 'fallback' },
},
appearance = { appearance = {
use_nvim_cmp_as_default = true, use_nvim_cmp_as_default = true,
nerd_font_variant = 'mono' nerd_font_variant = 'mono'
@@ -95,6 +93,11 @@ return {
dadbod = { dadbod = {
name = 'Dadbod', module = 'vim_dadbod_completion.blink' name = 'Dadbod', module = 'vim_dadbod_completion.blink'
}, },
snippets = {
opts = {
friendly_snippets = true,
}
},
}, },
}, },

View File

@@ -2,6 +2,7 @@ return {
'tpope/vim-fugitive', 'tpope/vim-fugitive',
config = function() config = function()
vim.keymap.set('n', "<leader>gs", vim.cmd.Git) vim.keymap.set('n', "<leader>gs", vim.cmd.Git)
vim.keymap.set('n', "<leader><leader>gl", function() vim.cmd.Git({ 'pull' }) end)
vim.api.nvim_create_user_command('Gcm', function() vim.cmd.Git({ 'switch main' }) end, {}) vim.api.nvim_create_user_command('Gcm', function() vim.cmd.Git({ 'switch main' }) end, {})
@@ -18,18 +19,10 @@ return {
local SwitchToMainbufnr = vim.api.nvim_get_current_buf() local SwitchToMainbufnr = vim.api.nvim_get_current_buf()
local opts = { buffer = bufnr, remap = false } local opts = { buffer = bufnr, remap = false }
vim.keymap.set('n', "<leader>p", function()
vim.cmd.Git('push')
end, opts)
-- rebase always -- rebase always
vim.keymap.set('n', "<leader>P", function() vim.keymap.set('n', "<leader>pu", function()
vim.cmd.Git({ 'pull', '--rebase' }) vim.cmd.Git({ 'pull --rebase origin main' })
end, opts) end, opts)
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
-- needed if i did not set the branch up correctly
vim.keymap.set('n', "<leader>t", ":Git push -u origin ", opts);
end, end,
}) })
end end

View File

@@ -8,7 +8,6 @@ return {
'L3MON4D3/LuaSnip', 'L3MON4D3/LuaSnip',
'j-hui/fidget.nvim', 'j-hui/fidget.nvim',
'rafamadriz/friendly-snippets', 'rafamadriz/friendly-snippets',
{ 'towolf/vim-helm', ft = 'helm' },
{ {
'folke/lazydev.nvim', 'folke/lazydev.nvim',
ft = 'lua', -- only load on lua files ft = 'lua', -- only load on lua files
@@ -25,8 +24,6 @@ return {
config = function() config = function()
vim.diagnostic.config({ virtual_text = false }) vim.diagnostic.config({ virtual_text = false })
local lspconfig = require('lspconfig')
-- load snippets from friendly-snippets -- load snippets from friendly-snippets
require('luasnip.loaders.from_vscode').lazy_load() require('luasnip.loaders.from_vscode').lazy_load()
@@ -36,8 +33,6 @@ return {
---@type MasonLspconfigSettings ---@type MasonLspconfigSettings
require('mason-lspconfig').setup({ require('mason-lspconfig').setup({
automatic_enable = true, automatic_enable = true,
-- Replace the language servers listed here
-- with the ones you want to install
ensure_installed = { ensure_installed = {
'ts_ls', 'ts_ls',
'lua_ls', 'lua_ls',
@@ -53,15 +48,15 @@ return {
}) })
local lazydev = require('lazydev') local lazydev = require('lazydev')
lazydev.setup()
vim.lsp.config('lua_ls', { vim.lsp.config('lua_ls', {
root_dir = function(bufnr, on_dir) on_dir(lazydev.find_workspace(bufnr)) end root_dir = function(bufnr, on_dir) on_dir(lazydev.find_workspace(bufnr)) end
}) })
---@module 'lspconfig'
---@type lspconfig.Config ---@type lspconfig.Config
vim.lsp.config('pylsp', { vim.lsp.config('pylsp', {
settings = { settings = {
['pylsp'] = { pylsp = {
plugins = { plugins = {
autopep8 = { autopep8 = {
enabled = false, enabled = false,
@@ -78,17 +73,27 @@ return {
} }
}) })
vim.lsp.config('helm-ls', { vim.lsp.config('helm_ls', {
settings = { settings = {
['helm-ls'] = { helm_ls = {
helmLint = { enabled = false },
yamlls = { enabled = false }, yamlls = { enabled = false },
}, },
} }
}) })
vim.lsp.config('yamlls', {
filetypes = { 'yaml' },
settings = {
yaml = { enable = true, },
}
})
vim.lsp.config('terraformls', { vim.lsp.config('terraformls', {
filetypes = { 'terraform', 'terraform-vars', 'tf' } filetypes = { 'terraform', 'terraform-vars' },
-- run terraformls once for a git repo
root_dir = function(bufnr, on_dir)
on_dir(vim.fs.root(bufnr, '.git'))
end
}) })
end end
} }

View File

@@ -1,61 +0,0 @@
return {
'obsidian-nvim/obsidian.nvim',
version = '*', -- recommended, use latest release instead of latest commit
dependencies = {
-- Required.
'nvim-lua/plenary.nvim',
},
keys = {
{ '<leader>ot', '<cmd>Obsidian today<CR>', desc = "Open today's daily note" },
{ '<leader>os', '<cmd>Obsidian quick_switch<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.
["gf"] = {
action = function()
return require("obsidian").util.gf_passthrough()
end,
opts = { noremap = false, expr = true, buffer = true },
},
-- Toggle check-boxes.
["<leader>ch"] = {
action = function()
return require("obsidian").util.toggle_checkbox()
end,
opts = { buffer = true },
},
-- Smart action depending on context, either follow link or toggle checkbox.
["<cr>"] = {
action = function()
return require("obsidian").util.smart_action()
end,
opts = { buffer = true, expr = true },
},
},
opts = {
legacy_commands = false,
workspaces = {
{
name = 'tech-work-hobby',
path = '/Users/rtim/Documents/Notes/tech-work-hobby/',
},
},
daily_notes = {
folder = 'Daily',
date_format = '%Y-%m-%d (%A)',
default_tags = { 'daily' },
template = 'Daily.md',
},
templates = {
folder = 'Templates',
},
completion = {
blink = true,
nvim_cmp = false,
},
ui = {
enable = false,
},
},
}

View File

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

View File

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

View File

@@ -1,11 +1,33 @@
local theme = {
fill = 'TabLineFill',
head = 'TabLine',
current_tab = 'TabLineSel',
tab = 'TabLine',
win = 'TabLine',
tail = 'TabLine',
}
-- I literally need this for Dadbod for a nicer name in tabs. I don't use tabs -- I literally need this for Dadbod for a nicer name in tabs. I don't use tabs
-- in any other way -- in any other way
return { return {
'nanozuki/tabby.nvim', 'nanozuki/tabby.nvim',
---@module 'tabby' ---@module 'tabby'
---@type TabbyConfig ---@type TabbyConfig
opts = { opts = {
-- configs... line = function(line)
}, return {
line.tabs().foreach(function(tab)
local hl = tab.is_current() and theme.current_tab or theme.tab
return {
line.sep('', hl, theme.head),
tab.number(),
tab.name(),
hl = hl,
margin = ' ',
}
end),
hl = theme.fill,
}
end,
},
} }

View File

@@ -66,7 +66,7 @@ return {
available = function() available = function()
return vim.fn.isdirectory('.git') == 1 return vim.fn.isdirectory('.git') == 1
end end
} },
}, },
}) })

View File

@@ -22,7 +22,6 @@ return {
"vimdoc", "vimdoc",
"latex", "latex",
"json", "json",
"yaml",
"git_config", "git_config",
"git_rebase", "git_rebase",
"gitattributes", "gitattributes",
@@ -34,17 +33,16 @@ return {
"properties", "properties",
"ini", "ini",
"ssh_config", "ssh_config",
"ssh_client_config",
"editorconfig", "editorconfig",
"passwd", "passwd",
"regex", "regex",
"sql", "sql",
"sqlite",
"toml", "toml",
"xml", "xml",
} }
ts.setup() ts.setup()
ts.install(installed_parsers) ts.install(installed_parsers)
vim.treesitter.language.register('yaml', 'yaml_gitlab')
end end
} }

View File

@@ -1,158 +0,0 @@
-- luasnip.lua
local ls = require('luasnip')
local s = ls.snippet
local i = ls.insert_node
local f = ls.function_node
local fmt = require("luasnip.extras.fmt").fmt
local vscode_loader = require("luasnip.loaders.from_vscode")
vim.keymap.set({ "i", "s" }, "<C-l>", function()
if ls.expand_or_jumpable() then
ls.expand_or_jump()
end
end, { desc = "Snippet next argument", silent = true })
--------------------
-- Snippets for LUA
--------------------
ls.add_snippets('lua', {
s({ name = 'LuaSnip Snippet', trig = 'snipf' },
fmt([[
s({ name='<name>', trig='<trig>'},
fmt(<template>,
{ <inputs> },
{ <opts> }
)
),
]], {
name = i(1, 'name'),
trig = i(2, 'trig'),
template = i(3, '[[]]'),
inputs = i(4, 'nodes'),
opts = i(5,
'opts')
},
{ delimiters = '<>' }
)
),
s({ name = 'Add snippets block', trig = 'add_snip' },
fmt([[
ls.add_snippets('<filetype>', {
<snippets>
})
]],
{ filetype = i(1, 'Filetype'), snippets = i(2, 'Snippets') },
{ delimiters = '<>' }
)
),
})
--------------------
-- Generic snippets
--------------------
local function com_string(_, snip, to_multiply)
local comment_string = vim.bo.commentstring
local repeats = snip.captures[1]
local result = comment_string:gsub("%%s", ""):gsub(" ", "")
if to_multiply then
return string.sub(
string.rep(result, repeats),
0,
repeats
)
end
return result
end
ls.add_snippets('all', {
s({ name = 'Comment block', trig = '#com(%d+)', regTrig = true },
fmt([[
{comment_block}
{comment} {comment_text}
{comment_block}
]],
{
comment_block = f(com_string, {}, { user_args = { true } }),
comment = f(com_string, {}, { user_args = { false } }),
comment_text = i(1,
'Comment')
}
)
),
})
--------------------
-- Terraform
--------------------
ls.add_snippets('terraform', {
s({ name = 'data_assume', trig = 'tf_assume' },
fmt([[
data "aws_iam_policy_document" "<name>" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["<service>.amazonaws.com"]
}
}
}
]],
{
name = i(1, 'assume'),
service = i(2, 'service')
},
{ delimiters = '<>' }
)
),
})
------------------------------
-- YAML
------------------------------
local yaml_schema_snippet = s(
{ name = 'yaml_schema', trig = 'yaml_schema' },
fmt([[
{comment} yaml-language-server: $schema={path}
]],
{
path = i(1, 'path'),
comment = f(com_string, {}, { user_args = { false } }),
}
)
)
ls.add_snippets('yaml', { yaml_schema_snippet })
ls.add_snippets('helm', { yaml_schema_snippet })
local flux_cd_kustomization = s(
{ name = 'fluxcd_kustomization', trig = 'fluxkust' },
fmt([[
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: {name}
namespace: {namespace}
spec:
interval: {interval}
path: {path}
prune: true
sourceRef:
kind: GitRepository
name: {repository_name}
]],
{
name = i(1, 'name'),
namespace = i(2, 'flux-system'),
interval = i(3, '5m'),
path = i(4, 'path'),
repository_name = i(5, 'repository_name'),
}
)
)
ls.add_snippets('yaml', { flux_cd_kustomization })

View File

@@ -21,7 +21,7 @@ vim.keymap.set("n", "N", "Nzzzv")
-- save register on pasting -- save register on pasting
vim.keymap.set("x", "<leader>p", [["_dP]]) vim.keymap.set("x", "<leader>p", [["_dP]])
-- next greatest remap ever : asbjornHaland -- next greatest remap ever
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]]) vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
vim.keymap.set("n", "<leader>Y", [["+Y]]) vim.keymap.set("n", "<leader>Y", [["+Y]])
@@ -34,7 +34,7 @@ vim.keymap.set("n", "<leader>S", [[:%s/\<<C-r><C-a>\>/<C-r><C-a>/gI<Left><Left><
vim.keymap.set("v", "<leader>s", [["vy:%s/\<<C-r>v\>/<C-r>v/gI<Left><Left><Left>]]) vim.keymap.set("v", "<leader>s", [["vy:%s/\<<C-r>v\>/<C-r>v/gI<Left><Left><Left>]])
vim.keymap.set("n", "<C-s>", "<cmd>silent !tmux neww tmux-sessionizer<CR>") vim.keymap.set("n", "<C-s>", "<cmd>silent !SHELL=/bin/zsh tmux neww tmux-sessionizer<CR>")
vim.keymap.set("n", "<leader><leader>x", "<cmd>source %<CR>") vim.keymap.set("n", "<leader><leader>x", "<cmd>source %<CR>")
vim.keymap.set("n", "<leader>x", ":.lua<CR>") vim.keymap.set("n", "<leader>x", ":.lua<CR>")
@@ -43,3 +43,5 @@ vim.keymap.set("v", "<leader>x", ":lua<CR>")
vim.keymap.set("n", "<C-M-j>", "<cmd>cnext<CR>") vim.keymap.set("n", "<C-M-j>", "<cmd>cnext<CR>")
vim.keymap.set("n", "<C-M-k>", "<cmd>cprev<CR>") vim.keymap.set("n", "<C-M-k>", "<cmd>cprev<CR>")
vim.keymap.set("n", "<F12>", "<cmd>PrtChatToggle<CR>")

View File

@@ -34,3 +34,5 @@ vim.opt.colorcolumn = "80"
vim.opt.diffopt = 'internal,filler,closeoff,algorithm:histogram' vim.opt.diffopt = 'internal,filler,closeoff,algorithm:histogram'
vim.opt.mouse = ''

View File

@@ -0,0 +1,45 @@
local ls = require('luasnip')
local s = ls.snippet
local i = ls.insert_node
local f = ls.function_node
local fmt = require('luasnip.extras.fmt').fmt
vim.keymap.set({ 'i', 's' }, '<C-l>', function()
if ls.expand_or_jumpable() then
ls.expand_or_jump()
end
end, { desc = 'Snippet next argument', silent = true })
local function com_string(_, snip, to_multiply)
local comment_string = vim.bo.commentstring
local repeats = snip.captures[1]
local result = comment_string:gsub('%%s', ''):gsub(' ', '')
if to_multiply then
return string.sub(
string.rep(result, repeats),
0,
repeats
)
end
return result
end
ls.add_snippets('all', {
s({ name = 'Comment block', trig = '#com(%d+)', regTrig = true },
fmt([[
{comment_block}
{comment} {comment_text}
{comment_block}
]],
{
comment_block = f(com_string, {}, { user_args = { true } }),
comment = f(com_string, {}, { user_args = { false } }),
comment_text = i(1,
'Comment')
}
)
),
})

View File

@@ -0,0 +1,5 @@
require('crentist.snippets.common')
require('crentist.snippets.lua')
require('crentist.snippets.terraform')
require('crentist.snippets.yaml')

View File

@@ -0,0 +1,38 @@
local ls = require('luasnip')
local s = ls.snippet
local i = ls.insert_node
local f = ls.function_node
local fmt = require('luasnip.extras.fmt').fmt
ls.add_snippets('lua', {
s({ name = 'LuaSnip Snippet', trig = 'snipf' },
fmt([[
s({ name='<name>', trig='<trig>'},
fmt(<template>,
{ <inputs> },
{ <opts> }
)
),
]], {
name = i(1, 'name'),
trig = i(2, 'trig'),
template = i(3, '[[]]'),
inputs = i(4, 'nodes'),
opts = i(5,
'opts')
},
{ delimiters = '<>' }
)
),
s({ name = 'Add snippets block', trig = 'add_snip' },
fmt([[
ls.add_snippets('<filetype>', {
<snippets>
})
]],
{ filetype = i(1, 'Filetype'), snippets = i(2, 'Snippets') },
{ delimiters = '<>' }
)
),
})

View File

@@ -0,0 +1,29 @@
local ls = require('luasnip')
local s = ls.snippet
local i = ls.insert_node
local f = ls.function_node
local fmt = require('luasnip.extras.fmt').fmt
ls.add_snippets('terraform', {
s({ name = 'data_assume', trig = 'tf_assume' },
fmt([[
data "aws_iam_policy_document" "<name>" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["<service>.amazonaws.com"]
}
}
}
]],
{
name = i(1, 'assume'),
service = i(2, 'service')
},
{ delimiters = '<>' }
)
),
})

View File

@@ -0,0 +1,64 @@
local ls = require('luasnip')
local s = ls.snippet
local i = ls.insert_node
local f = ls.function_node
local fmt = require('luasnip.extras.fmt').fmt
------------------------------
-- YAML
------------------------------
local yaml_schema_snippet = s(
{ name = 'yaml_schema', trig = 'yaml_schema' },
fmt([[
{comment} yaml-language-server: $schema={path}
]],
{
path = i(1, 'path'),
comment = f(com_string, {}, { user_args = { false } }),
}
)
)
ls.add_snippets('yaml', { yaml_schema_snippet })
ls.add_snippets('helm', { yaml_schema_snippet })
local flux_cd_kustomization = s(
{ name = 'fluxcd_kustomization', trig = 'fluxkust' },
fmt([[
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: {name}
namespace: {namespace}
spec:
interval: {interval}
path: {path}
prune: true
sourceRef:
kind: GitRepository
name: {repository_name}
]],
{
name = i(1, 'name'),
namespace = i(2, 'flux-system'),
interval = i(3, '5m'),
path = i(4, 'path'),
repository_name = i(5, 'repository_name'),
}
)
)
ls.add_snippets('yaml', { flux_cd_kustomization })
local sleep_command = s(
{ name = 'sleep_command', trig = 'sleep' },
fmt([[
command:
- /bin/sh
- -c
- while true; do sleep 3600; done
]], {})
)
ls.add_snippets('yaml', { sleep_command })

View File

@@ -27,7 +27,17 @@ local advanced_grep = function(opts)
if pieces[2] then if pieces[2] then
table.insert(args, "-g") table.insert(args, "-g")
table.insert(args, pieces[2])
local input_glob = pieces[2]
local glob = input_glob
if not input_glob:find("*", 1, true) then
glob = "*" .. input_glob .. "*"
if input_glob:find("d:", 1, true) then
glob = "**/" .. glob .. "/**"
glob = glob:gsub("d:", "")
end
end
table.insert(args, glob)
end end
return vim.iter({ args, { "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case" } }) return vim.iter({ args, { "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case" } })