added packer script. made plugin configs not error out when no plugin

This commit is contained in:
iceyrazor 2025-05-26 16:00:35 -05:00
parent 571effe737
commit e6577b4106
12 changed files with 270 additions and 229 deletions

View File

@ -1,4 +1,6 @@
require("image").setup({ local ok, image = pcall(require, 'image')
if ok then
image.setup({
backend = "kitty", backend = "kitty",
processor = "magick_cli", -- or "magick_rock" processor = "magick_cli", -- or "magick_rock"
integrations = { integrations = {
@ -36,6 +38,7 @@ require("image").setup({
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off) tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
}) })
end
-- require("image").enable() -- enable the plugin -- require("image").enable() -- enable the plugin
-- print(require("image").is_enabled()) -- bool -- print(require("image").is_enabled()) -- bool

View File

@ -1,4 +1,6 @@
require('yourmom/cloak').setup({ local ok, cloak = pcall(require, 'yourmom/cloak')
if ok then
cloak.setup({
enabled = true, enabled = true,
cloak_character = '*', cloak_character = '*',
-- The applied highlight group (colors) on the cloaking, see `:h highlight`. -- The applied highlight group (colors) on the cloaking, see `:h highlight`.
@ -29,3 +31,4 @@ require('yourmom/cloak').setup({
} }
}, },
}) })
end

View File

@ -1 +1,4 @@
require("colorizer").setup() local ok, colorizer = pcall(require, 'colorizer')
if ok then
colorizer.setup()
end

View File

@ -1 +1,4 @@
require("hardtime").setup() local ok, hardtime = pcall(require, 'hardtime')
if ok then
hardtime.setup()
end

View File

@ -1,3 +1,5 @@
local ok, _ = pcall(require, 'harpoon.mark')
if ok then
local mark = require("harpoon.mark") local mark = require("harpoon.mark")
local ui = require("harpoon.ui") local ui = require("harpoon.ui")
@ -9,3 +11,4 @@ vim.keymap.set("n","<C-y>", function() ui.nav_file(1) end)
vim.keymap.set("n","<C-t>", function() ui.nav_file(2) end) vim.keymap.set("n","<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n","<C-n>", function() ui.nav_file(3) end) vim.keymap.set("n","<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n","<C-s>", function() ui.nav_file(4) end) vim.keymap.set("n","<C-s>", function() ui.nav_file(4) end)
end

View File

@ -1,3 +1,5 @@
local ok, _ = pcall(require, 'ibl')
if ok then
local highlight = { local highlight = {
"RainbowRed", "RainbowRed",
} }
@ -28,3 +30,4 @@ require('ibl').setup {
}, },
}, },
} }
end

View File

@ -1,3 +1,5 @@
local ok, _ = pcall(require, 'lsp-zero')
if ok then
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
pattern = "src", pattern = "src",
callback = function() callback = function()
@ -73,3 +75,4 @@ require('mason-lspconfig').setup({
require('lspconfig').greybel.setup({}) require('lspconfig').greybel.setup({})
lsp.setup() lsp.setup()
end

View File

@ -1,4 +1,6 @@
require('lualine').setup() local ok, lualine = pcall(require, 'lualine')
if ok then
-- require('lualine').setup()
local custom_gruvbox = require'lualine.themes.base16' local custom_gruvbox = require'lualine.themes.base16'
@ -19,7 +21,7 @@ local diagnostics = {
cond = hide_in_width, cond = hide_in_width,
} }
require('lualine').setup { lualine.setup {
options = { options = {
theme = custom_gruvbox, theme = custom_gruvbox,
icons_enabled = true, icons_enabled = true,
@ -44,3 +46,4 @@ require('lualine').setup {
lualine_z = {'location'} lualine_z = {'location'}
} }
} }
end

View File

@ -1,4 +1,7 @@
vim.notify = require("notify") local ok, notify = pcall(require, 'notify')
require("notify").setup({ if ok then
vim.notify = notify
notify.setup({
background_colour="#000000" background_colour="#000000"
}) })
end

View File

@ -1,3 +1,5 @@
local ok, _ = pcall(require, 'telescope')
if ok then
local telescope = require('telescope') local telescope = require('telescope')
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
if string.find(vim.loop.cwd(),"iceys%-linux%-stuffs") then if string.find(vim.loop.cwd(),"iceys%-linux%-stuffs") then
@ -17,3 +19,4 @@ vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") }); builtin.grep_string({ search = vim.fn.input("Grep > ") });
end) end)
--vim.keymap.set('n', '<C-p>', builtin.git_files, {}) --vim.keymap.set('n', '<C-p>', builtin.git_files, {})
end

View File

@ -1 +1,4 @@
local ok, _ = pcall(require, 'undotree')
if ok then
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle) vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
end

8
runs/packer.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
echo DOWNLOADING PACKER FOR NVIM
git clone --depth 1 https://github.com/wbthomason/packer.nvim \
~/.local/share/nvim/site/pack/packer/start/packer.nvim
echo ----------