Compare commits
33 Commits
3dbb63738b
...
arch
| Author | SHA1 | Date | |
|---|---|---|---|
| fd4c38e01b | |||
| 2dc040f17d | |||
| 331411e35b | |||
| 0931940cfa | |||
| a28dafa553 | |||
| 6197dace5c | |||
| 9718a5a67b | |||
| 3ce59f2e5b | |||
| eeec610f47 | |||
| 67bf866434 | |||
| 02f9153d13 | |||
| 40bdbd29d0 | |||
| 62f2d0b543 | |||
| cbe2ac12ef | |||
| c27eb5c525 | |||
| 6c19e9650e | |||
| 62bb06793d | |||
| b6457ecfac | |||
| a4f2b22f7a | |||
| 2472bedbec | |||
| 4b1dfbdf1d | |||
| 2e720f619c | |||
| 3f24d17ec8 | |||
| 869be617bf | |||
| fddc6b8ee1 | |||
| 70dfeab75c | |||
| 7dad3514e0 | |||
| cd7f789302 | |||
| 405ec5da4f | |||
| 788ef34c04 | |||
| a44a75b745 | |||
| 74e77ca34a | |||
| a4a48adc08 |
@@ -3,10 +3,3 @@ vim.opt_local.shiftwidth = 4
|
||||
vim.opt_local.softtabstop = 4
|
||||
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
4
after/ftplugin/sh.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
|
||||
@@ -4,3 +4,15 @@ vim.opt.tabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.bo.commentstring = '# %s'
|
||||
|
||||
local surround = require('nvim-surround')
|
||||
|
||||
surround.buffer_setup({
|
||||
surrounds = {
|
||||
['v'] = {
|
||||
add = { '${', '}' },
|
||||
find = '%${[^}]-}',
|
||||
delete = '(%${)().+(})()$',
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
15
after/ftplugin/yaml_ansible.lua
Normal file
15
after/ftplugin/yaml_ansible.lua
Normal 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+}})()$',
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,50 +1,48 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||
"blink-ripgrep.nvim": { "branch": "main", "commit": "0c0d9db740ca70aa739e40f50589b01e537ade6d" },
|
||||
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
|
||||
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
||||
"blink-ripgrep.nvim": { "branch": "main", "commit": "75e7dbc4e2b12ea8db63c97e4dd3edd793381c05" },
|
||||
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"fzf-lua": { "branch": "main", "commit": "83e4080ae886a42ec48c5c26ce5892ceb557c425" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||
"hererocks": { "branch": "master", "commit": "160228946bed9998f5e3b168bd0b66ba2690f8f3" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "e533fac71bc361768f90004af695cd1f1aa1900a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "c4c168e459395275c552179a1baf9c3d885d6a74" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "a96172f673f720cd4f3572e1fcd08400ed3eb25d" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"fzf-lua": { "branch": "main", "commit": "c9e7b7bfbd01f949164988ee1684035468e1995c" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "50c205548d8b037b7ff6378fca6d21146f0b6161" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "037398b9ce4a53ba48d5f94765c641a1fd16d906" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"mini.pairs": { "branch": "main", "commit": "d5a29b6254dad07757832db505ea5aeab9aad43a" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "c9317c2a8629d4e39e7cf47be74cb67f3ab37cda" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "5bfcc89fd155b4ffc02d18ab3b7d19c2d4e246a7" },
|
||||
"nvim-navic": { "branch": "master", "commit": "099b4c8cdc3e9ea026ea6b2a0d315e2d28362242" },
|
||||
"nvim-sops": { "branch": "main", "commit": "cb2209562d00ef8c6c88bdec836d9edb8fbb96ef" },
|
||||
"nvim-surround": { "branch": "main", "commit": "a868c256c861044beb9794b4dd126480dcdfbdad" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "0606c7a9dcaa5c5beee0b0f09043e9fdd1ba0a68" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "6b2a22a74d1c883e797764c28f75aa6b532a1ae4" },
|
||||
"oil.nvim": { "branch": "master", "commit": "200df01e4b92d0010a3bfbde92b91a4ef5a5c9db" },
|
||||
"parrot.nvim": { "branch": "main", "commit": "dcae923c7070431c8cb628b19594ab640168684c" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
|
||||
"nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" },
|
||||
"nvim-sops": { "branch": "main", "commit": "1791eec21e78c9736ae504f02712a2f509c69b2c" },
|
||||
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "7caec274fd19c12b55902a5b795100d21531391f" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
|
||||
"parrot.nvim": { "branch": "main", "commit": "5d7e72bdc3efe2638e1bd94ff55028ecc40edd7a" },
|
||||
"plenary": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"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" },
|
||||
"statuscol.nvim": { "branch": "main", "commit": "c46172d0911aa5d49ba5f39f4351d1bb7aa289cc" },
|
||||
"tabby.nvim": { "branch": "main", "commit": "b3affa6db7eab80fca2a2db5b73b473144507039" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" },
|
||||
"undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||
"tabby.nvim": { "branch": "main", "commit": "3c130e1fcb598ce39a9c292847e32d7c3987cf11" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "e6cdb4dc528c5dc4ca8da86e83ef4e3c84b0729c" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "6d1d41da4873a445c5605f2005ad2c68c99d8770" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "e8b53c0f3aa6e6127ac2a2d2071d9aade6c6e373" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"vim-helm": { "branch": "master", "commit": "2c8525fd98e57472769d137317bca83e477858ce" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "07e92e22114cc5b1ba4938d99897d85b58e20475" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }
|
||||
}
|
||||
|
||||
@@ -13,12 +13,6 @@ autocmd('LspAttach', {
|
||||
local opts = { buffer = e.buf }
|
||||
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", "<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", "<M-F>", function() vim.lsp.buf.format() end, opts)
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
['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',
|
||||
jinja = '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',
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ return {
|
||||
{ 'L3MON4D3/LuaSnip', version = 'v2.*' }
|
||||
},
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = 'v1.7.*',
|
||||
version = 'v1.9.*',
|
||||
|
||||
---@module 'blink-cmp'
|
||||
---@type blink.cmp.Config
|
||||
@@ -19,10 +19,13 @@ return {
|
||||
active = function(filter)
|
||||
local snippet = require('luasnip')
|
||||
local blink = require('blink.cmp')
|
||||
if snippet.in_snippet() and not blink.is_visible() then
|
||||
if snippet.in_snippet() then
|
||||
return true
|
||||
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
|
||||
end
|
||||
end
|
||||
@@ -35,12 +38,7 @@ return {
|
||||
}
|
||||
},
|
||||
completion = { list = { selection = { preselect = false, auto_insert = true } } },
|
||||
keymap = {
|
||||
preset = 'enter',
|
||||
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
|
||||
['<S-Tab>'] = { 'select_prev', 'snippet_backward', 'fallback' },
|
||||
},
|
||||
|
||||
keymap = { preset = 'enter' },
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = 'mono'
|
||||
@@ -95,6 +93,11 @@ return {
|
||||
dadbod = {
|
||||
name = 'Dadbod', module = 'vim_dadbod_completion.blink'
|
||||
},
|
||||
snippets = {
|
||||
opts = {
|
||||
friendly_snippets = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -19,13 +19,9 @@ return {
|
||||
|
||||
local SwitchToMainbufnr = vim.api.nvim_get_current_buf()
|
||||
local opts = { buffer = bufnr, remap = false }
|
||||
vim.keymap.set('n', "<leader>p", function()
|
||||
vim.cmd.Git('push')
|
||||
end, opts)
|
||||
|
||||
-- rebase always
|
||||
vim.keymap.set('n', "<leader>P", function()
|
||||
vim.cmd.Git({ 'pull', '--rebase' })
|
||||
vim.keymap.set('n', "<leader>pu", function()
|
||||
vim.cmd.Git({ 'pull --rebase origin main' })
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -8,7 +8,6 @@ return {
|
||||
'L3MON4D3/LuaSnip',
|
||||
'j-hui/fidget.nvim',
|
||||
'rafamadriz/friendly-snippets',
|
||||
{ 'towolf/vim-helm', ft = 'helm' },
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua', -- only load on lua files
|
||||
@@ -25,8 +24,6 @@ return {
|
||||
config = function()
|
||||
vim.diagnostic.config({ virtual_text = false })
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
-- load snippets from friendly-snippets
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
||||
@@ -36,8 +33,6 @@ return {
|
||||
---@type MasonLspconfigSettings
|
||||
require('mason-lspconfig').setup({
|
||||
automatic_enable = true,
|
||||
-- Replace the language servers listed here
|
||||
-- with the ones you want to install
|
||||
ensure_installed = {
|
||||
'ts_ls',
|
||||
'lua_ls',
|
||||
@@ -53,15 +48,15 @@ return {
|
||||
})
|
||||
|
||||
local lazydev = require('lazydev')
|
||||
lazydev.setup()
|
||||
vim.lsp.config('lua_ls', {
|
||||
root_dir = function(bufnr, on_dir) on_dir(lazydev.find_workspace(bufnr)) end
|
||||
})
|
||||
|
||||
---@module 'lspconfig'
|
||||
---@type lspconfig.Config
|
||||
vim.lsp.config('pylsp', {
|
||||
settings = {
|
||||
['pylsp'] = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
autopep8 = {
|
||||
enabled = false,
|
||||
@@ -78,17 +73,27 @@ return {
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.config('helm-ls', {
|
||||
vim.lsp.config('helm_ls', {
|
||||
settings = {
|
||||
['helm-ls'] = {
|
||||
helmLint = { enabled = false },
|
||||
helm_ls = {
|
||||
yamlls = { enabled = false },
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
vim.lsp.config('yamlls', {
|
||||
filetypes = { 'yaml' },
|
||||
settings = {
|
||||
yaml = { enable = true, },
|
||||
}
|
||||
})
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
8
lua/crentist/lazy/pairs.lua
Normal file
8
lua/crentist/lazy/pairs.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
'nvim-mini/mini.pairs',
|
||||
version = '0.17.x',
|
||||
config = function()
|
||||
require('mini.pairs').setup()
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
return {
|
||||
'frankroeder/parrot.nvim',
|
||||
version = '2.3.0',
|
||||
version = '2.5.1',
|
||||
dependencies = { 'ibhagwan/fzf-lua', 'nvim-lua/plenary.nvim' },
|
||||
opts = {
|
||||
config = function()
|
||||
local parrot_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" },
|
||||
api_key = { 'sops', '--config', '/dev/null', '-d', vim.fn.expand('$HOME') .. '/.claude-api' },
|
||||
headers = function(self)
|
||||
return {
|
||||
['Content-Type'] = "application/json",
|
||||
['Content-Type'] = 'application/json',
|
||||
['x-api-key'] = self.api_key,
|
||||
['anthropic-version'] = "2023-06-01",
|
||||
['anthropic-version'] = '2023-06-01',
|
||||
}
|
||||
end,
|
||||
params = {
|
||||
@@ -21,8 +22,9 @@ return {
|
||||
command = { max_tokens = 4096 },
|
||||
},
|
||||
models = {
|
||||
'claude-opus-4-1-20250805',
|
||||
'claude-sonnet-4-5-20250929',
|
||||
'claude-opus-4-6',
|
||||
'claude-sonet-4-5',
|
||||
'claude-haiku-4-5',
|
||||
},
|
||||
preprocess_payload = function(payload)
|
||||
for _, message in ipairs(payload.messages) do
|
||||
@@ -37,7 +39,12 @@ return {
|
||||
return payload
|
||||
end,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
user_input_ui = 'buffer',
|
||||
}
|
||||
|
||||
local parrot = require('parrot')
|
||||
parrot.setup(parrot_opts)
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
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
|
||||
-- in any other way
|
||||
return {
|
||||
@@ -5,7 +13,21 @@ return {
|
||||
---@module 'tabby'
|
||||
---@type TabbyConfig
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ return {
|
||||
available = function()
|
||||
return vim.fn.isdirectory('.git') == 1
|
||||
end
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ return {
|
||||
"vimdoc",
|
||||
"latex",
|
||||
"json",
|
||||
"yaml",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
@@ -34,17 +33,16 @@ return {
|
||||
"properties",
|
||||
"ini",
|
||||
"ssh_config",
|
||||
"ssh_client_config",
|
||||
"editorconfig",
|
||||
"passwd",
|
||||
"regex",
|
||||
"sql",
|
||||
"sqlite",
|
||||
"toml",
|
||||
"xml",
|
||||
}
|
||||
ts.setup()
|
||||
ts.install(installed_parsers)
|
||||
vim.treesitter.language.register('yaml', 'yaml_gitlab')
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ vim.keymap.set("n", "N", "Nzzzv")
|
||||
-- save register on pasting
|
||||
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", "<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("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>x", ":.lua<CR>")
|
||||
@@ -43,9 +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-k>", "<cmd>cprev<CR>")
|
||||
|
||||
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 })
|
||||
vim.keymap.set("n", "<F12>", "<cmd>PrtChatToggle<CR>")
|
||||
|
||||
|
||||
@@ -34,3 +34,5 @@ vim.opt.colorcolumn = "80"
|
||||
|
||||
vim.opt.diffopt = 'internal,filler,closeoff,algorithm:histogram'
|
||||
|
||||
vim.opt.mouse = ''
|
||||
|
||||
|
||||
@@ -4,6 +4,12 @@ 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]
|
||||
|
||||
Reference in New Issue
Block a user