spring cleaning
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
-- blakes neovim config rewritten in lua
|
|
||||||
require('base.base')
|
|
||||||
require('base.keymaps')
|
|
||||||
require('base.lazy')
|
|
||||||
|
|
||||||
-- vim.cmd.colorscheme 'nightfox'
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "cc2f5f2fa28d240574808e78847978ed6ef20d2a" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "00d92e6009671493fceeb0e4baf644f5b983e6e4" },
|
|
||||||
"vimwiki": { "branch": "dev", "commit": "72792615e739d0eb54a9c8f7e0a46a6e2407c9e8" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" }
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
-- base/base.lua
|
|
||||||
|
|
||||||
-- Shorten vim.opt for ease of use
|
|
||||||
local o = vim.opt
|
|
||||||
|
|
||||||
-- General settings
|
|
||||||
o.number = true -- Show line numbers
|
|
||||||
o.relativenumber = true -- Relative line numbers
|
|
||||||
o.expandtab = true -- Use spaces instead of tabs
|
|
||||||
o.tabstop = 4 -- Number of spaces per tab
|
|
||||||
o.shiftwidth = 4 -- Number of spaces for indentation
|
|
||||||
o.smartindent = true -- Enable smart indentation
|
|
||||||
o.autoindent = true -- Enable auto indentation
|
|
||||||
o.wrap = false -- Disable line wrapping
|
|
||||||
o.scrolloff = 8 -- Keep 8 lines visible above and below the cursor
|
|
||||||
|
|
||||||
-- Search settings
|
|
||||||
o.ignorecase = true -- Ignore case in searches
|
|
||||||
o.smartcase = true -- Enable smart case search
|
|
||||||
|
|
||||||
-- Backups and undo
|
|
||||||
o.swapfile = false -- Disable swap file
|
|
||||||
o.undofile = true -- Enable persistent undo
|
|
||||||
|
|
||||||
-- Clipboard
|
|
||||||
o.clipboard = "unnamedplus" -- Use system clipboard
|
|
||||||
|
|
||||||
-- Cursor line and column
|
|
||||||
o.cursorline = true -- Highlight the current line
|
|
||||||
o.cursorcolumn = true -- Highlight the current column
|
|
||||||
|
|
||||||
-- Command line height
|
|
||||||
o.cmdheight = 2 -- Set command-line height
|
|
||||||
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
-- Remap leader key to comma
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
|
|
||||||
local keymap = vim.keymap.set
|
|
||||||
|
|
||||||
-- General keymaps
|
|
||||||
keymap('n', '<leader>w', ':w<CR>', { desc = 'Save file' })
|
|
||||||
keymap('n', '<leader>q', ':q<CR>', { desc = 'Quit' })
|
|
||||||
keymap('n', '<leader>qq', ':q!<CR>', { desc = 'Force quit' })
|
|
||||||
|
|
||||||
-- Split navigation
|
|
||||||
keymap('n', '<leader>vs', ':vsplit<CR>', { desc = 'Vertical Split' })
|
|
||||||
keymap('n', '<leader>hs', ':split<CR>', { desc = 'Horizontal Split' })
|
|
||||||
|
|
||||||
-- File searching
|
|
||||||
keymap('n', '<leader>ff', ':Telescope find_files<CR>', { desc = 'Find Files' })
|
|
||||||
keymap('n', '<leader>fg', ':Telescope live_grep<CR>', { desc = 'Live Grep' })
|
|
||||||
keymap('n', '<leader>fb', ':Telescope buffers<CR>', { desc = 'Buffers' })
|
|
||||||
|
|
||||||
-- Buffer management
|
|
||||||
keymap('n', '<leader>bd', ':bd<CR>', { desc = 'Delete Buffer' })
|
|
||||||
|
|
||||||
-- ╭───────────────────────────────╮
|
|
||||||
-- │ LSP Keymaps (Attach Hook) │
|
|
||||||
-- ╰───────────────────────────────╯
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M.on_attach(_, bufnr)
|
|
||||||
local opts = { noremap = true, silent = true, buffer = bufnr }
|
|
||||||
local keymap = vim.keymap.set
|
|
||||||
|
|
||||||
-- LSP: Go to
|
|
||||||
keymap('n', 'gd', vim.lsp.buf.definition, opts)
|
|
||||||
keymap('n', 'gD', vim.lsp.buf.declaration, opts)
|
|
||||||
keymap('n', 'gi', vim.lsp.buf.implementation, opts)
|
|
||||||
keymap('n', 'gr', vim.lsp.buf.references, opts)
|
|
||||||
keymap('n', 'K', vim.lsp.buf.hover, opts)
|
|
||||||
|
|
||||||
-- LSP: Actions
|
|
||||||
keymap('n', '<leader>rn', vim.lsp.buf.rename, opts)
|
|
||||||
keymap({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts)
|
|
||||||
|
|
||||||
-- LSP: Diagnostics
|
|
||||||
keymap('n', '[d', vim.diagnostic.goto_prev, opts)
|
|
||||||
keymap('n', ']d', vim.diagnostic.goto_next, opts)
|
|
||||||
keymap('n', '<leader>e', vim.diagnostic.open_float, opts)
|
|
||||||
keymap('n', '<leader>q', vim.diagnostic.setloclist, opts)
|
|
||||||
|
|
||||||
-- LSP: Formatting
|
|
||||||
keymap('n', '<leader>f', function()
|
|
||||||
vim.lsp.buf.format({ async = true })
|
|
||||||
end, opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
local lazypath = vim.fn.stdpath('data') .. '/site/pack/packer/start/lazy.nvim'
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
|
||||||
vim.fn.system({
|
|
||||||
'git', 'clone', '--filter=blob:none', 'https://github.com/folke/lazy.nvim.git', lazypath
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.runtimepath:prepend(lazypath)
|
|
||||||
|
|
||||||
require("lazy").setup("plugins")
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
return {
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
dependencies = {
|
|
||||||
'williamboman/mason.nvim',
|
|
||||||
'williamboman/mason-lspconfig.nvim',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- Setup Mason
|
|
||||||
require('mason').setup()
|
|
||||||
require('mason-lspconfig').setup {
|
|
||||||
ensure_installed = { 'nixd', 'rust_analyzer', 'lua_ls', 'pyright' },
|
|
||||||
automatic_installation = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Nix
|
|
||||||
lspconfig.nixd.setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
nixd = {
|
|
||||||
nixpkgs = {
|
|
||||||
expr = 'import <nixpkgs> {}',
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
command = { 'nixpkgs-fmt' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Rust
|
|
||||||
lspconfig.rust_analyzer.setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
['rust-analyzer'] = {
|
|
||||||
cargo = { allFeatures = true },
|
|
||||||
checkOnSave = { command = 'clippy' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Lua
|
|
||||||
lspconfig.lua_ls.setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = { globals = { 'vim' } },
|
|
||||||
workspace = {
|
|
||||||
library = vim.api.nvim_get_runtime_file('', true),
|
|
||||||
checkThirdParty = false,
|
|
||||||
},
|
|
||||||
telemetry = { enable = false },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Python
|
|
||||||
lspconfig.pyright.setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Global diagnostic config
|
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = false,
|
|
||||||
signs = true,
|
|
||||||
update_in_insert = false,
|
|
||||||
underline = true,
|
|
||||||
severity_sort = true,
|
|
||||||
float = { border = 'rounded' },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
-- plugins/mason.lua
|
|
||||||
|
|
||||||
return {
|
|
||||||
"williamboman/mason.nvim", -- Mason plugin for managing LSP servers
|
|
||||||
config = function()
|
|
||||||
require('mason').setup()
|
|
||||||
require('mason-lspconfig').setup({
|
|
||||||
ensure_installed = { 'rust_analyzer', 'pyright', 'lua_ls', 'nixd', 'nixfmt' }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
-- plugins/telescope.lua
|
|
||||||
|
|
||||||
return {
|
|
||||||
"nvim-telescope/telescope.nvim", -- Telescope plugin
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" }, -- Telescope dependencies
|
|
||||||
config = function()
|
|
||||||
require('telescope').setup{
|
|
||||||
defaults = {
|
|
||||||
file_ignore_patterns = { "node_modules" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
askdjfkl
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
-- plugins/theme.lua
|
|
||||||
|
|
||||||
return {
|
|
||||||
"folke/tokyonight.nvim", -- Tokyo Night theme plugin
|
|
||||||
config = function()
|
|
||||||
require('tokyonight').setup({
|
|
||||||
style = "night", -- You can also use 'storm' or 'day' if you prefer those.
|
|
||||||
transparent = true,
|
|
||||||
terminal_colors = true,
|
|
||||||
})
|
|
||||||
vim.cmd('colorscheme tokyonight')
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
-- plugins/vimwiki.lua
|
|
||||||
|
|
||||||
return {
|
|
||||||
"vimwiki/vimwiki", -- Vimwiki plugin
|
|
||||||
config = function()
|
|
||||||
vim.g.vimwiki_list = {{
|
|
||||||
path = '~/vimwiki',
|
|
||||||
syntax = 'markdown',
|
|
||||||
ext = '.md',
|
|
||||||
}}
|
|
||||||
vim.g.vimwiki_global_ext = 0 -- Global extension
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
-- plugins/whichkey.lua
|
|
||||||
|
|
||||||
return {
|
|
||||||
"folke/which-key.nvim", -- Which-key plugin for keybinding hints
|
|
||||||
config = function()
|
|
||||||
require('which-key').setup{}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
-- blake's nvim config in lua
|
|
||||||
-- base.base
|
|
||||||
-- general nvim settings
|
|
||||||
|
|
||||||
-- define functions for settings
|
|
||||||
local g = vim.g
|
|
||||||
local o = vim.o
|
|
||||||
local opt = vim.opt
|
|
||||||
|
|
||||||
|
|
||||||
-- clipboard
|
|
||||||
o.clipboard = "unnamedplus"
|
|
||||||
|
|
||||||
-- enable filetype detection
|
|
||||||
vim.cmd('filetype indent plugin on')
|
|
||||||
vim.cmd('syntax on')
|
|
||||||
-- o.nocompatible = true
|
|
||||||
|
|
||||||
-- line numbers
|
|
||||||
o.number = true
|
|
||||||
o.numberwidth = 2
|
|
||||||
o.relativenumber = true
|
|
||||||
vim.cmd('highlight LineNr ctermfg=054')
|
|
||||||
|
|
||||||
-- tabs
|
|
||||||
o.tabstop = 2
|
|
||||||
o.shiftwidth = 2
|
|
||||||
o.softtabstop = -1 -- if negative uses shift width
|
|
||||||
o.expandtab = true
|
|
||||||
o.smarttab = true
|
|
||||||
o.autoindent = true
|
|
||||||
|
|
||||||
-- improve search
|
|
||||||
o.ignorecase = true
|
|
||||||
o.smartcase = true
|
|
||||||
|
|
||||||
-- backup files
|
|
||||||
o.backup = false
|
|
||||||
o.writebackup = false
|
|
||||||
o.undofile = true
|
|
||||||
o.swapfile = true
|
|
||||||
|
|
||||||
-- auto-read file changes
|
|
||||||
o.autoread = true
|
|
||||||
|
|
||||||
-- spell checker
|
|
||||||
o.spelllang = 'en_us'
|
|
||||||
o.spell = false
|
|
||||||
|
|
||||||
-- word wrapping
|
|
||||||
o.wrap = true
|
|
||||||
o.linebreak = true
|
|
||||||
o.breakindent = true
|
|
||||||
|
|
||||||
-- visual line movement
|
|
||||||
vim.keymap.set({'i'}, '<Up>', '<C-o>gk', {desc = 'Visual Line Up (Insert)'})
|
|
||||||
vim.keymap.set({'i'}, '<Down>', '<C-o>gj', {desc = 'Visual Line Down (Insert)'})
|
|
||||||
vim.keymap.set({'n', 'v'}, '<Up>', 'g<Up>', {desc = 'Visual Line Up'})
|
|
||||||
vim.keymap.set({'n', 'v'}, '<Down>', 'g<Down>', {desc = 'Visual Line Down'})
|
|
||||||
|
|
||||||
-- set leader
|
|
||||||
g.mapleader = " "
|
|
||||||
g.maplocalleader = " "
|
|
||||||
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
-- LSP Keymaps (applies when any LSP attaches)
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
group = vim.api.nvim_create_augroup("UserLspKeymaps", { clear = true }),
|
|
||||||
callback = function(event)
|
|
||||||
local opts = { buffer = event.buf, silent = true, noremap = true }
|
|
||||||
|
|
||||||
-- 🧭 Navigation
|
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
|
||||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
|
||||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
|
|
||||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
|
||||||
|
|
||||||
-- 🧠 Info
|
|
||||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
|
||||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
|
||||||
|
|
||||||
-- 🛠️ Actions
|
|
||||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
|
||||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
|
||||||
|
|
||||||
-- 🧹 Formatting
|
|
||||||
vim.keymap.set("n", "<leader>f", function()
|
|
||||||
vim.lsp.buf.format({ async = false })
|
|
||||||
end, vim.tbl_extend("force", opts, { desc = "Format buffer with LSP" }))
|
|
||||||
|
|
||||||
-- 💡 Diagnostics
|
|
||||||
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
|
|
||||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
|
||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
|
||||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, opts)
|
|
||||||
|
|
||||||
-- 🧩 Inlay hints (toggle)
|
|
||||||
if vim.lsp.inlay_hint then
|
|
||||||
vim.keymap.set("n", "<leader>h", function()
|
|
||||||
local enabled = vim.lsp.inlay_hint.is_enabled(event.buf)
|
|
||||||
vim.lsp.inlay_hint.enable(not enabled, { bufnr = event.buf })
|
|
||||||
end, vim.tbl_extend("force", opts, { desc = "Toggle inlay hints" }))
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
-- bootstrap lazy
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
|
||||||
vim.fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-- load plugins
|
|
||||||
require("lazy").setup("plugins")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
return {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local luasnip = require("luasnip")
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(), -- Trigger completion
|
|
||||||
["<C-e>"] = cmp.mapping.abort(), -- Close completion
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Confirm selection
|
|
||||||
|
|
||||||
-- **Navigation**
|
|
||||||
["<Down>"] = cmp.mapping.select_next_item(), -- Arrow down
|
|
||||||
["<Up>"] = cmp.mapping.select_prev_item(), -- Arrow up
|
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(), -- Ctrl+n (alternative)
|
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(), -- Ctrl+p (alternative)
|
|
||||||
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
-- return {
|
|
||||||
{
|
|
||||||
"willothy/nvim-cokeline",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim", -- Required for v0.4.0+
|
|
||||||
"nvim-tree/nvim-web-devicons", -- If you want devicons
|
|
||||||
"stevearc/resession.nvim" -- Optional, for persistent history
|
|
||||||
},
|
|
||||||
config = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
'rafi/awesome-vim-colorschemes',
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"3rd/image.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("image").setup({
|
|
||||||
backend = "kitty", -- or "ueberzug" or "sixel"
|
|
||||||
processor = "magick_cli", -- or "magick_rock"
|
|
||||||
integrations = {
|
|
||||||
markdown = {
|
|
||||||
enabled = true,
|
|
||||||
clear_in_insert_mode = false,
|
|
||||||
download_remote_images = true,
|
|
||||||
only_render_image_at_cursor = false,
|
|
||||||
only_render_image_at_cursor_mode = "popup", -- or "inline"
|
|
||||||
floating_windows = false, -- if true, images will be rendered in floating markdown windows
|
|
||||||
filetypes = { "markdown", "vimwiki" },
|
|
||||||
},
|
|
||||||
neorg = {
|
|
||||||
enabled = true,
|
|
||||||
filetypes = { "norg" },
|
|
||||||
},
|
|
||||||
typst = {
|
|
||||||
enabled = true,
|
|
||||||
filetypes = { "typst" },
|
|
||||||
},
|
|
||||||
html = { enabled = false },
|
|
||||||
css = { enabled = false },
|
|
||||||
},
|
|
||||||
max_width = nil,
|
|
||||||
max_height = nil,
|
|
||||||
max_width_window_percentage = nil,
|
|
||||||
max_height_window_percentage = 50,
|
|
||||||
scale_factor = 1.0,
|
|
||||||
window_overlap_clear_enabled = false,
|
|
||||||
window_overlap_clear_ft_ignore = {
|
|
||||||
"cmp_menu",
|
|
||||||
"cmp_docs",
|
|
||||||
"snacks_notif",
|
|
||||||
"scrollview",
|
|
||||||
"scrollview_sign",
|
|
||||||
},
|
|
||||||
editor_only_render_when_focused = false,
|
|
||||||
tmux_show_only_in_active_window = false,
|
|
||||||
hijack_file_patterns = {
|
|
||||||
"*.png",
|
|
||||||
"*.jpg",
|
|
||||||
"*.jpeg",
|
|
||||||
"*.gif",
|
|
||||||
"*.webp",
|
|
||||||
"*.avif",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
'EdenEast/nightfox.nvim',
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
transparent = true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
'vimwiki/vimwiki',
|
|
||||||
init = function ()
|
|
||||||
vim.g.vimwiki_list = {
|
|
||||||
{
|
|
||||||
path = '~/holocron',
|
|
||||||
path_html = '~/holocron/html',
|
|
||||||
syntax = 'markdown',
|
|
||||||
ext = '.md',
|
|
||||||
diary_rel_path = 'journal/diary',
|
|
||||||
auto_diary_index = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
-- blake's nvim config in lua
|
|
||||||
-- base.base
|
|
||||||
-- general nvim settings
|
|
||||||
|
|
||||||
-- define functions for settings
|
|
||||||
local g = vim.g
|
|
||||||
local o = vim.o
|
|
||||||
local opt = vim.opt
|
|
||||||
|
|
||||||
|
|
||||||
-- clipboard
|
|
||||||
o.clipboard = "unnamedplus"
|
|
||||||
|
|
||||||
-- enable filetype detection
|
|
||||||
vim.cmd('filetype indent plugin on')
|
|
||||||
vim.cmd('syntax on')
|
|
||||||
-- o.nocompatible = true
|
|
||||||
|
|
||||||
-- line numbers
|
|
||||||
o.number = true
|
|
||||||
o.numberwidth = 2
|
|
||||||
o.relativenumber = true
|
|
||||||
vim.cmd('highlight LineNr ctermfg=054')
|
|
||||||
|
|
||||||
-- tabs
|
|
||||||
o.tabstop = 2
|
|
||||||
o.shiftwidth = 2
|
|
||||||
o.softtabstop = -1 -- if negative uses shift width
|
|
||||||
o.expandtab = true
|
|
||||||
o.smarttab = true
|
|
||||||
o.autoindent = true
|
|
||||||
|
|
||||||
-- improve search
|
|
||||||
o.ignorecase = true
|
|
||||||
o.smartcase = true
|
|
||||||
|
|
||||||
-- backup files
|
|
||||||
o.backup = false
|
|
||||||
o.writebackup = false
|
|
||||||
o.undofile = true
|
|
||||||
o.swapfile = true
|
|
||||||
|
|
||||||
-- auto-read file changes
|
|
||||||
o.autoread = true
|
|
||||||
|
|
||||||
-- spell checker
|
|
||||||
o.spelllang = 'en_us'
|
|
||||||
o.spell = false
|
|
||||||
|
|
||||||
-- word wrapping
|
|
||||||
o.wrap = true
|
|
||||||
o.linebreak = true
|
|
||||||
o.breakindent = true
|
|
||||||
|
|
||||||
-- visual line movement
|
|
||||||
vim.keymap.set({'i'}, '<Up>', '<C-o>gk', {desc = 'Visual Line Up (Insert)'})
|
|
||||||
vim.keymap.set({'i'}, '<Down>', '<C-o>gj', {desc = 'Visual Line Down (Insert)'})
|
|
||||||
vim.keymap.set({'n', 'v'}, '<Up>', 'g<Up>', {desc = 'Visual Line Up'})
|
|
||||||
vim.keymap.set({'n', 'v'}, '<Down>', 'g<Down>', {desc = 'Visual Line Down'})
|
|
||||||
|
|
||||||
-- set leader
|
|
||||||
g.mapleader = " "
|
|
||||||
g.maplocalleader = " "
|
|
||||||
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
-- LSP Keymaps (applies when any LSP attaches)
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
group = vim.api.nvim_create_augroup("UserLspKeymaps", { clear = true }),
|
|
||||||
callback = function(event)
|
|
||||||
local opts = { buffer = event.buf, silent = true, noremap = true }
|
|
||||||
|
|
||||||
-- 🧭 Navigation
|
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
|
||||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
|
||||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
|
|
||||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
|
||||||
|
|
||||||
-- 🧠 Info
|
|
||||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
|
||||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
|
||||||
|
|
||||||
-- 🛠️ Actions
|
|
||||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
|
||||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
|
||||||
|
|
||||||
-- 🧹 Formatting
|
|
||||||
vim.keymap.set("n", "<leader>f", function()
|
|
||||||
vim.lsp.buf.format({ async = false })
|
|
||||||
end, vim.tbl_extend("force", opts, { desc = "Format buffer with LSP" }))
|
|
||||||
|
|
||||||
-- 💡 Diagnostics
|
|
||||||
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
|
|
||||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
|
||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
|
||||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, opts)
|
|
||||||
|
|
||||||
-- 🧩 Inlay hints (toggle)
|
|
||||||
if vim.lsp.inlay_hint then
|
|
||||||
vim.keymap.set("n", "<leader>h", function()
|
|
||||||
local enabled = vim.lsp.inlay_hint.is_enabled(event.buf)
|
|
||||||
vim.lsp.inlay_hint.enable(not enabled, { bufnr = event.buf })
|
|
||||||
end, vim.tbl_extend("force", opts, { desc = "Toggle inlay hints" }))
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
-- bootstrap lazy
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
|
||||||
vim.fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-- load plugins
|
|
||||||
require("lazy").setup("plugins")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
return {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
local luasnip = require("luasnip")
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(), -- Trigger completion
|
|
||||||
["<C-e>"] = cmp.mapping.abort(), -- Close completion
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Confirm selection
|
|
||||||
|
|
||||||
-- **Navigation**
|
|
||||||
["<Down>"] = cmp.mapping.select_next_item(), -- Arrow down
|
|
||||||
["<Up>"] = cmp.mapping.select_prev_item(), -- Arrow up
|
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(), -- Ctrl+n (alternative)
|
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(), -- Ctrl+p (alternative)
|
|
||||||
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
-- return {
|
|
||||||
{
|
|
||||||
"willothy/nvim-cokeline",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim", -- Required for v0.4.0+
|
|
||||||
"nvim-tree/nvim-web-devicons", -- If you want devicons
|
|
||||||
"stevearc/resession.nvim" -- Optional, for persistent history
|
|
||||||
},
|
|
||||||
config = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
'rafi/awesome-vim-colorschemes',
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"3rd/image.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("image").setup({
|
|
||||||
backend = "kitty", -- or "ueberzug" or "sixel"
|
|
||||||
processor = "magick_cli", -- or "magick_rock"
|
|
||||||
integrations = {
|
|
||||||
markdown = {
|
|
||||||
enabled = true,
|
|
||||||
clear_in_insert_mode = false,
|
|
||||||
download_remote_images = true,
|
|
||||||
only_render_image_at_cursor = false,
|
|
||||||
only_render_image_at_cursor_mode = "popup", -- or "inline"
|
|
||||||
floating_windows = false, -- if true, images will be rendered in floating markdown windows
|
|
||||||
filetypes = { "markdown", "vimwiki" },
|
|
||||||
},
|
|
||||||
neorg = {
|
|
||||||
enabled = true,
|
|
||||||
filetypes = { "norg" },
|
|
||||||
},
|
|
||||||
typst = {
|
|
||||||
enabled = true,
|
|
||||||
filetypes = { "typst" },
|
|
||||||
},
|
|
||||||
html = { enabled = false },
|
|
||||||
css = { enabled = false },
|
|
||||||
},
|
|
||||||
max_width = nil,
|
|
||||||
max_height = nil,
|
|
||||||
max_width_window_percentage = nil,
|
|
||||||
max_height_window_percentage = 50,
|
|
||||||
scale_factor = 1.0,
|
|
||||||
window_overlap_clear_enabled = false,
|
|
||||||
window_overlap_clear_ft_ignore = {
|
|
||||||
"cmp_menu",
|
|
||||||
"cmp_docs",
|
|
||||||
"snacks_notif",
|
|
||||||
"scrollview",
|
|
||||||
"scrollview_sign",
|
|
||||||
},
|
|
||||||
editor_only_render_when_focused = false,
|
|
||||||
tmux_show_only_in_active_window = false,
|
|
||||||
hijack_file_patterns = {
|
|
||||||
"*.png",
|
|
||||||
"*.jpg",
|
|
||||||
"*.jpeg",
|
|
||||||
"*.gif",
|
|
||||||
"*.webp",
|
|
||||||
"*.avif",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
'EdenEast/nightfox.nvim',
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
transparent = true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
'vimwiki/vimwiki',
|
|
||||||
init = function ()
|
|
||||||
vim.g.vimwiki_list = {
|
|
||||||
{
|
|
||||||
path = '~/holocron',
|
|
||||||
path_html = '~/holocron/html',
|
|
||||||
syntax = 'markdown',
|
|
||||||
ext = '.md',
|
|
||||||
diary_rel_path = 'journal/diary',
|
|
||||||
auto_diary_index = 1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,218 +0,0 @@
|
|||||||
blakes
|
|
||||||
neovim
|
|
||||||
config
|
|
||||||
lua
|
|
||||||
keymaps
|
|
||||||
PS1
|
|
||||||
zsh
|
|
||||||
lf
|
|
||||||
dir
|
|
||||||
blake's
|
|
||||||
zshrc
|
|
||||||
abc123
|
|
||||||
abc123
|
|
||||||
nqu940
|
|
||||||
Choo
|
|
||||||
Kwang
|
|
||||||
https
|
|
||||||
hyprland
|
|
||||||
configs
|
|
||||||
hypr
|
|
||||||
myColors
|
|
||||||
conf
|
|
||||||
env
|
|
||||||
qt6ct
|
|
||||||
pseudotiling
|
|
||||||
mainMod
|
|
||||||
keybinds
|
|
||||||
bluetooth
|
|
||||||
workspace
|
|
||||||
resizing
|
|
||||||
off
|
|
||||||
Holocron
|
|
||||||
NHC
|
|
||||||
Timesheet
|
|
||||||
PLD
|
|
||||||
lifegroup
|
|
||||||
ALV
|
|
||||||
alsa
|
|
||||||
pci
|
|
||||||
skl
|
|
||||||
hda
|
|
||||||
dsp
|
|
||||||
HiFi
|
|
||||||
hw
|
|
||||||
sofhdadsp
|
|
||||||
dp1
|
|
||||||
hdmi
|
|
||||||
dp
|
|
||||||
dp3
|
|
||||||
dp2
|
|
||||||
VoiceEngine
|
|
||||||
WEBRTC
|
|
||||||
workspaces
|
|
||||||
wireplumber
|
|
||||||
backlight
|
|
||||||
BAT0
|
|
||||||
intel
|
|
||||||
thunderbird
|
|
||||||
wlp0s20f3
|
|
||||||
wifi
|
|
||||||
ethernet
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tooltip
|
|
||||||
ifname
|
|
||||||
essid
|
|
||||||
ipaddr
|
|
||||||
|
|
||||||
signalStrength
|
|
||||||
|
|
||||||
|
|
||||||
bandwidthUpBits
|
|
||||||
|
|
||||||
bandwidthDownBits
|
|
||||||
gwaddr
|
|
||||||
nmtui
|
|
||||||
pulsemixer
|
|
||||||
wpctl
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bluetuith
|
|
||||||
bluetoothctl
|
|
||||||
fi
|
|
||||||
num
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tt
|
|
||||||
mon
|
|
||||||
pos
|
|
||||||
ffead3
|
|
||||||
ecc6d9
|
|
||||||
ffdd
|
|
||||||
ffcc66
|
|
||||||
ff6699
|
|
||||||
tz
|
|
||||||
the
|
|
||||||
holocron
|
|
||||||
syncthing
|
|
||||||
repo
|
|
||||||
yveltal
|
|
||||||
#hnage
|
|
||||||
chnage/!
|
|
||||||
hwmon
|
|
||||||
sys
|
|
||||||
hwmon2
|
|
||||||
temp1
|
|
||||||
temperatureC
|
|
||||||
zone0
|
|
||||||
hwmon3
|
|
||||||
|
|
||||||
|
|
||||||
usr
|
|
||||||
tofi
|
|
||||||
xargs
|
|
||||||
hyprctl
|
|
||||||
nvim
|
|
||||||
unnamedplus
|
|
||||||
filetype
|
|
||||||
LineNr
|
|
||||||
ctermfg
|
|
||||||
greetd
|
|
||||||
tuigreet
|
|
||||||
TUI
|
|
||||||
toml
|
|
||||||
keymap
|
|
||||||
gk
|
|
||||||
gj
|
|
||||||
filename
|
|
||||||
wayland
|
|
||||||
hyprpaper
|
|
||||||
waybar
|
|
||||||
qt5
|
|
||||||
qt6
|
|
||||||
swaylock
|
|
||||||
swayidle
|
|
||||||
mako
|
|
||||||
dmenu
|
|
||||||
xdg
|
|
||||||
wlr
|
|
||||||
wlroots
|
|
||||||
nsxiv
|
|
||||||
mpv
|
|
||||||
vlc
|
|
||||||
zathura
|
|
||||||
pdf
|
|
||||||
epub
|
|
||||||
mediainfo
|
|
||||||
metadata
|
|
||||||
imagemagick
|
|
||||||
yacreader
|
|
||||||
networkmanager
|
|
||||||
CLI
|
|
||||||
systemd
|
|
||||||
DNS
|
|
||||||
resolv
|
|
||||||
ufw
|
|
||||||
pacman
|
|
||||||
uncomment
|
|
||||||
ucode
|
|
||||||
cpu
|
|
||||||
cpufreq
|
|
||||||
rtkit
|
|
||||||
cronie
|
|
||||||
exfatprogs
|
|
||||||
exfat
|
|
||||||
AUR
|
|
||||||
yay
|
|
||||||
resolvectl
|
|
||||||
symlinked
|
|
||||||
symlink
|
|
||||||
uplink
|
|
||||||
nameserver
|
|
||||||
nameserver
|
|
||||||
edns0
|
|
||||||
trust
|
|
||||||
trust
|
|
||||||
trust
|
|
||||||
trust
|
|
||||||
ad
|
|
||||||
comcast
|
|
||||||
tx
|
|
||||||
hsd1
|
|
||||||
off
|
|
||||||
filesystems
|
|
||||||
fstab
|
|
||||||
dev
|
|
||||||
nvme0n1p1
|
|
||||||
usb
|
|
||||||
UUID
|
|
||||||
ventoy
|
|
||||||
lockbox
|
|
||||||
uid
|
|
||||||
gid
|
|
||||||
lfcd
|
|
||||||
cd
|
|
||||||
lfrc
|
|
||||||
repos
|
|
||||||
Ervin
|
|
||||||
Croy
|
|
||||||
Async
|
|
||||||
Chirotouch
|
|
||||||
Steph
|
|
||||||
th
|
|
||||||
Asana
|
|
||||||
subtask
|
|
||||||
Trax
|
|
||||||
multihome
|
|
||||||
ATEM
|
|
||||||
autorun
|
|
||||||
Blackmagic
|
|
||||||
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
/nix/store/2l0mbarypjl8yrcy5bwbjhqrcnk182d5-home-manager-files/.config/zsh/.zshenv
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/nix/store/2l0mbarypjl8yrcy5bwbjhqrcnk182d5-home-manager-files/.config/zsh/.zshrc
|
|
||||||
17
users/blake/dots/gpg/default.nix
Normal file
17
users/blake/dots/gpg/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
pinentry.package = pkgs.pinentry-qt;
|
||||||
|
pinentry.program = "pinentry-qt";
|
||||||
|
};
|
||||||
|
# install pinentry programs
|
||||||
|
home.packages = with pkgs; [pinentry-qt pinentry_mac];
|
||||||
|
}
|
||||||
@@ -25,4 +25,22 @@
|
|||||||
# import sshkeys from keyring
|
# import sshkeys from keyring
|
||||||
home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
|
home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
|
||||||
home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
|
home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
|
||||||
|
|
||||||
|
|
||||||
|
# # manage secrets with sops
|
||||||
|
# sops.secrets = {
|
||||||
|
# "id_snowbelle" = {
|
||||||
|
# owner = "blake";
|
||||||
|
# group = "blake";
|
||||||
|
# mode = "0600";
|
||||||
|
# path = "/home/blake/.ssh/id_snowbelle";
|
||||||
|
# };
|
||||||
|
# "id_snowbelle.pub" = {
|
||||||
|
# owner = "blake";
|
||||||
|
# group = "blake";
|
||||||
|
# mode = "644";
|
||||||
|
# path = "/home/blake/.ssh/id_snowbelle.pub";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
|||||||
# home manager envs
|
|
||||||
. "/etc/profiles/per-user/blake/etc/profile.d/hm-session-vars.sh"
|
|
||||||
|
|
||||||
# Only source this once
|
|
||||||
if [[ -z "$__HM_ZSH_SESS_VARS_SOURCED" ]]; then
|
|
||||||
export __HM_ZSH_SESS_VARS_SOURCED=1
|
|
||||||
|
|
||||||
fi
|
|
||||||
@@ -1,206 +0,0 @@
|
|||||||
# blake's zsh config file
|
|
||||||
# 'source .zshrc' to load the config after editing
|
|
||||||
|
|
||||||
# prompt
|
|
||||||
#PS1='%B%S%F{004}[%n@%m]:%f%s%F{015}%~%f%S%F{004}$%f%s%b '
|
|
||||||
|
|
||||||
# blakes prompt
|
|
||||||
PS1='%F{0}%K{126}%B[%n@%m]%b%k%f:%F{015}%B[%~]%b%f%F{015}%S$%s%f '
|
|
||||||
|
|
||||||
# --- defaults ---
|
|
||||||
export EDITOR=nvim
|
|
||||||
export PAGER=less
|
|
||||||
|
|
||||||
# --- history ---
|
|
||||||
HISTSIZE=10000
|
|
||||||
SAVEHIST=10000
|
|
||||||
HISTFILE=~/.config/zsh/.zsh_history
|
|
||||||
setopt append_history
|
|
||||||
setopt inc_append_history
|
|
||||||
unsetopt share_history
|
|
||||||
|
|
||||||
# --- tab complete ---
|
|
||||||
autoload -Uz compinit && compinit
|
|
||||||
setopt no_menu_complete
|
|
||||||
compinit
|
|
||||||
|
|
||||||
# --- aliases ---
|
|
||||||
|
|
||||||
# zsh
|
|
||||||
alias cfz='nvim $HOME/.config/zsh/.zshrc'
|
|
||||||
alias src='source $HOME/.config/zsh/.zshrc'
|
|
||||||
|
|
||||||
# config editing
|
|
||||||
alias cfh='nvim $HOME/.config/hypr/hyprland.conf'
|
|
||||||
alias cfl='nvim $HOME/.config/lf/lfrc'
|
|
||||||
|
|
||||||
# navigation
|
|
||||||
setopt autocd
|
|
||||||
set -o vi
|
|
||||||
alias ls='ls --color=auto --group-directories-first'
|
|
||||||
alias ll='ls -lh --color=auto --group-directories-first'
|
|
||||||
alias la='ls -Alh --color=auto --group-directories-first'
|
|
||||||
alias ..='cd ..'
|
|
||||||
alias ...='cd ../..'
|
|
||||||
alias fs='du -h | sort -h'
|
|
||||||
alias ds='du -hs'
|
|
||||||
|
|
||||||
# shortcuts
|
|
||||||
alias vswap='cd ~/.local/state/nvim/swap'
|
|
||||||
alias rswap='rm ~/.local/state/nvim/swap/*'
|
|
||||||
alias tn='lf ~/documents/holocron/notes/tech'
|
|
||||||
alias nhc='lf ~/documents/holocron/work/nhc'
|
|
||||||
alias diary='cd ~/documents/holocron/notes/journal/diary'
|
|
||||||
alias screenies='lf ~/pictures/screenshots'
|
|
||||||
alias holo='lf ~/documents/holocron'
|
|
||||||
|
|
||||||
# safety
|
|
||||||
alias cp='cp -iv'
|
|
||||||
alias mv='mv -iv'
|
|
||||||
alias rm='rm -Iv'
|
|
||||||
|
|
||||||
# colors
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias fgrep='fgrep --color=auto'
|
|
||||||
alias egrep='egrep --color=auto'
|
|
||||||
|
|
||||||
# scripts
|
|
||||||
alias rebuild='sh ~/.nix/bin/rebuild.sh'
|
|
||||||
alias perms='sudo sh ~/.nix/bin/perms.sh'
|
|
||||||
alias bb='sudo sh ~/.nix/bin/backup_browse.sh'
|
|
||||||
|
|
||||||
# tools
|
|
||||||
alias v='nvim'
|
|
||||||
alias sv='sudo nvim'
|
|
||||||
alias vim='nvim'
|
|
||||||
alias wifi='nmtui'
|
|
||||||
alias bt='bluetuith --no-warning'
|
|
||||||
alias audio='pulsemixer'
|
|
||||||
alias img='nsxiv'
|
|
||||||
alias vid='mpv'
|
|
||||||
alias pdf='zathura'
|
|
||||||
alias fw='sudo ufw status verbose'
|
|
||||||
alias sec='sops ~/.nix/secrets/secrets.yaml'
|
|
||||||
|
|
||||||
# git
|
|
||||||
alias status='git status'
|
|
||||||
alias add='git add'
|
|
||||||
alias commit='git commit -am'
|
|
||||||
alias push='git push'
|
|
||||||
alias pull='git pull'
|
|
||||||
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
|
||||||
alias dtf='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
|
||||||
|
|
||||||
# systemd
|
|
||||||
alias stat='sudo systemctl status'
|
|
||||||
alias restart='sudo systemctl restart'
|
|
||||||
alias start='sudo systemctl start'
|
|
||||||
alias stop='sudo systemctl stop'
|
|
||||||
alias jou='sudo journalctl -xeu'
|
|
||||||
alias live='sudo journalctl -o short-iso -n 50 -fu'
|
|
||||||
|
|
||||||
# shortcuts
|
|
||||||
alias chil='nvim ~/documents/holocron/tech/devices/yveltal/chilton'
|
|
||||||
alias school='nvim ~/documents/holocron/school/school.md'
|
|
||||||
|
|
||||||
# system
|
|
||||||
alias peace='systemctl poweroff'
|
|
||||||
alias love='systemctl reboot'
|
|
||||||
alias lock='loginctl lock-session'
|
|
||||||
|
|
||||||
# ssh
|
|
||||||
alias nebby='ssh nebula'
|
|
||||||
|
|
||||||
# wild shit
|
|
||||||
alias mgdrive='rclone mount gdrive: /media/gdrive --daemon --vfs-cache-mode writes'
|
|
||||||
alias micloud='rclone mount icloud: /media/icloud --daemon --vfs-cache-mode writes'
|
|
||||||
alias smp='mcrcon -H 10.0.0.104 -P 25575 -p WoopaGangaRecProGamingPassLmaoJkJk'
|
|
||||||
alias mcap='sudo umount /media/microsd ; sudo cryptsetup luksClose /dev/mapper/capsule ; sudo cryptsetup luksOpen UUID=a9e81f14-1e74-4777-a37a-81a0a43ae8d9 capsule --key-file ~/.config/cred/capsule.keyfile ; sudo mount -a'
|
|
||||||
|
|
||||||
# --- ssh auth sock ---
|
|
||||||
export GPG_TTY=$(tty)
|
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
||||||
gpgconf --launch gpg-agent
|
|
||||||
|
|
||||||
# --- path ---
|
|
||||||
|
|
||||||
# Define directories to add to PATH
|
|
||||||
ADDTOPATHS=(
|
|
||||||
"$HOME/.local/bin"
|
|
||||||
"$HOME/.local/bin/timecapsule"
|
|
||||||
)
|
|
||||||
|
|
||||||
for ADDTOPATH in "${ADDTOPATHS[@]}"; do
|
|
||||||
if [ -d "$ADDTOPATH" ]; then
|
|
||||||
case ":${PATH}:" in
|
|
||||||
*:"${ADDTOPATH}":*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
PATH="${PATH}:${ADDTOPATH}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
# --- scripts ---
|
|
||||||
# make lf change the working directory upon exit
|
|
||||||
alias lf='lfcd'
|
|
||||||
lfcd () {cd "$(command lf -print-last-dir "$@")"}
|
|
||||||
|
|
||||||
# --- plugins ---
|
|
||||||
# you really hate the idea of your zshrc auto cloning
|
|
||||||
# and installling the plugin manager. To do so manually:
|
|
||||||
# git clone https://github.com/zplug/zplug "$HOME/.config/zsh/zplug"
|
|
||||||
|
|
||||||
export ZPLUG_HOME="$HOME/.config/zsh/zplug/" # Change this to your custom directory
|
|
||||||
if [ -d "$HOME/.config/zsh/zplug" ]; then
|
|
||||||
export ZPLUG_INSTALLED="1"
|
|
||||||
source "$HOME/.config/zsh/zplug/init.zsh"
|
|
||||||
else
|
|
||||||
if [[ $- == *i* ]]; then
|
|
||||||
echo "⚠️ zplug is not installed. Run: git clone https://github.com/zplug/zplug $HOME/.config/zsh/zplug"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# init zplug
|
|
||||||
if [ -n "ZPLUG_INSTALLED" ]; then
|
|
||||||
zplug "zsh-users/zsh-syntax-highlighting", defer:2
|
|
||||||
zplug "zsh-users/zsh-history-substring-search"
|
|
||||||
zplug "zsh-users/zsh-autosuggestions" # Command suggestions as you type
|
|
||||||
zplug "zsh-users/zsh-completions" # Additional completions for more commands
|
|
||||||
zplug "olivierverdier/zsh-git-prompt"
|
|
||||||
zplug load
|
|
||||||
# install if there are new plugins
|
|
||||||
if ! zplug check --verbose; then
|
|
||||||
zplug install
|
|
||||||
zplug load
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -- syntax highlighting --
|
|
||||||
# Adjusted zsh-syntax-highlighting colors for red-green color blindness
|
|
||||||
ZSH_HIGHLIGHT_STYLES[default]=none
|
|
||||||
ZSH_HIGHLIGHT_STYLES[unknown-token]=fg=magenta # (Was red)
|
|
||||||
ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[alias]=fg=blue # (Was green)
|
|
||||||
ZSH_HIGHLIGHT_STYLES[builtin]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[function]=fg=blue # (Was green)
|
|
||||||
ZSH_HIGHLIGHT_STYLES[command]=fg=blue,bold # (Was green)
|
|
||||||
ZSH_HIGHLIGHT_STYLES[precommand]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[hashed-command]=fg=blue # (Was green)
|
|
||||||
ZSH_HIGHLIGHT_STYLES[path]=fg=cyan,underline # This ensures paths are underlined
|
|
||||||
ZSH_HIGHLIGHT_STYLES[globbing]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=magenta # (Was red)
|
|
||||||
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=white,bold
|
|
||||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=white
|
|
||||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[assign]=fg=cyan
|
|
||||||
ZSH_HIGHLIGHT_STYLES[comment]=fg=yellow
|
|
||||||
|
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
./dots/lf
|
./dots/lf
|
||||||
./dots/zsh
|
./dots/zsh
|
||||||
./dots/ssh
|
./dots/ssh
|
||||||
|
./dots/gpg
|
||||||
./dots/git
|
./dots/git
|
||||||
./dots/xdg
|
./dots/xdg
|
||||||
];
|
];
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
home.homeDirectory = "/home/blake";
|
home.homeDirectory = "/home/blake";
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
|
|
||||||
# stand alone packages
|
# general packages
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ripgrep
|
ripgrep
|
||||||
btop
|
btop
|
||||||
@@ -29,42 +30,6 @@
|
|||||||
usbutils
|
usbutils
|
||||||
];
|
];
|
||||||
|
|
||||||
# setup zsh
|
# for macos
|
||||||
#home.sessionVariables.ZDOTDIR = "$HOME/.config/zsh";
|
programs.home-manager.enable = true;
|
||||||
#programs.zsh = {
|
|
||||||
# enable = true;
|
|
||||||
# # dotDir = ".config/zsh";
|
|
||||||
#};
|
|
||||||
## link dotfiles
|
|
||||||
#xdg.configFile."zsh" = {
|
|
||||||
# source = config.lib.file.mkOutOfStoreSymlink "/home/blake/.nix/users/blake/dotfiles/zsh";
|
|
||||||
# recursive = true;
|
|
||||||
#};
|
|
||||||
|
|
||||||
programs.gpg = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
#pinentry.package = pkgs.pinentry-qt;
|
|
||||||
#pinentry.program = "pinentry-qt";
|
|
||||||
};
|
|
||||||
#home.packages with pkgs; = [pinentry-qt pinentry_mac];
|
|
||||||
|
|
||||||
# # manage secrets with sops
|
|
||||||
# sops.secrets = {
|
|
||||||
# "id_snowbelle" = {
|
|
||||||
# owner = "blake";
|
|
||||||
# group = "blake";
|
|
||||||
# mode = "0600";
|
|
||||||
# path = "/home/blake/.ssh/id_snowbelle";
|
|
||||||
# };
|
|
||||||
# "id_snowbelle.pub" = {
|
|
||||||
# owner = "blake";
|
|
||||||
# group = "blake";
|
|
||||||
# mode = "644";
|
|
||||||
# path = "/home/blake/.ssh/id_snowbelle.pub";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user