yay updates

This commit is contained in:
Solomon Laing 2025-07-21 18:07:37 +09:30
parent e432b71f4e
commit 42d664d91f
5 changed files with 37 additions and 26 deletions

View File

@ -56,7 +56,7 @@ return {
"hrsh7th/cmp-path", "hrsh7th/cmp-path",
"hrsh7th/cmp-emoji", "hrsh7th/cmp-emoji",
"hrsh7th/cmp-buffer", "hrsh7th/cmp-buffer",
"saadparwaiz1/cmp_luasnip", -- "saadparwaiz1/cmp_luasnip",
}, },
config = function() config = function()
local cmp = require("cmp") local cmp = require("cmp")
@ -65,9 +65,9 @@ return {
completeopt = "menu,menuone,noinsert", completeopt = "menu,menuone,noinsert",
}, },
snippet = { snippet = {
expand = function(args) -- expand = function(args)
require("luasnip").lsp_expand(args.body) -- require("luasnip").lsp_expand(args.body)
end, -- end,
}, },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
@ -80,7 +80,7 @@ return {
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "luasnip" }, -- { name = "luasnip" },
{ name = "path" }, { name = "path" },
{ name = "emoji" }, { name = "emoji" },
{ name = "buffer" }, { name = "buffer" },

View File

@ -1,7 +1,7 @@
return { return {
{ {
"olimorris/codecompanion.nvim", "olimorris/codecompanion.nvim",
enabled = true, enabled = require('lazyvim.utils').exists('$HOME/.config/openai/KEY'),
lazy = false, lazy = false,
dependencies = { dependencies = {
{ "nvim-lua/plenary.nvim", branch = "master" }, { "nvim-lua/plenary.nvim", branch = "master" },

View File

@ -1,21 +1,21 @@
return { return {
{ -- {
"L3MON4D3/LuaSnip", -- "L3MON4D3/LuaSnip",
enabled = true, -- enabled = true,
dependencies = { -- dependencies = {
"rafamadriz/friendly-snippets", -- "rafamadriz/friendly-snippets",
config = function() -- config = function()
require("luasnip.loaders.from_vscode").lazy_load() -- require("luasnip.loaders.from_vscode").lazy_load()
end, -- end,
}, -- },
opts = { -- opts = {
history = true, -- history = true,
delete_check_events = "TextChanged", -- delete_check_events = "TextChanged",
}, -- },
-- stylua: ignore -- -- stylua: ignore
keys = { -- keys = {
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s", }, -- { "<tab>", function() require("luasnip").jump(1) end, mode = "s", },
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" }, }, -- { "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" }, },
}, -- },
}, -- },
} }

View File

@ -155,4 +155,15 @@ function M.trim_whitespace()
pcall(vim.cmd, 'cal cursor(currPos[1], currPos[2])') pcall(vim.cmd, 'cal cursor(currPos[1], currPos[2])')
end end
function M.exists(path)
local exists = vim.fn.filereadable(vim.fn.expand(path))
if exists == 1 then
vim.notify(path .. " exists", vim.log.levels.INFO)
return true
else
vim.notify(path .. " doesn't exist", vim.log.levels.INFO)
return false
end
end
return M return M

View File

@ -71,7 +71,7 @@ export REPOS="$HOME/repos"
export GITUSER="inkletblot" export GITUSER="inkletblot"
export NOTE_DIR="$HOME/notes/" export NOTE_DIR="$HOME/notes/"
export DWM_DIR="$REPOS/gitlab.inkletblot.com/inkletblot/dwm-inkletblot/" export DWM_DIR="$REPOS/gitlab.inkletblot.com/inkletblot/dwm-inkletblot/"
export OPENAI_API_KEY="$(cat "$HOME/.config/openai/KEY")" export OPENAI_API_KEY="$(touch "$HOME/.config/openai/KEY" && cat "$HOME/.config/openai/KEY")"
# This is something luke smith has in his profile (which I have stolen, it's nice but # This is something luke smith has in his profile (which I have stolen, it's nice but
# doesn't work very nicely with my login manager, lightdm, and I prefer to just run # doesn't work very nicely with my login manager, lightdm, and I prefer to just run