This commit is contained in:
Job
2024-12-21 10:33:05 +01:00
commit 9aa384c1a3
11 changed files with 268 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
-- Configure custom keymaps.
local keymap = vim.keymap.set
local delkeymap = vim.keymap.del
local opts = { noremap = true, silent = true }
-- Improved line start/end
keymap({ "n", "v" }, "H", "^", opts)
keymap({ "n", "v" }, "L", "$", opts)
-- Improved escape
keymap("n", "<ESC>", "<ESC>:noh<CR>", opts)
keymap("t", "<ESC><ESC>", "<C-\\><C-n>", opts)
-- Disable alt j/k to move lines (conflict with default vim motions)
delkeymap({ "i", "v" }, "<A-j>")
delkeymap({ "i", "v" }, "<A-k>")

View File

@@ -0,0 +1,43 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "plugins" },
},
defaults = {
lazy = false,
version = false,
},
install = {},
checker = {
enabled = true,
notify = true,
},
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View File

@@ -0,0 +1,15 @@
-- Set some custom options.
local opt = vim.o
local global = vim.g
-- Set target text width for gww to 60.
opt.tw = 60
-- Use the internal clipboard.
opt.clipboard = ""
-- Use original gruvbox theme.
global.gruvbox_material_foreground = "original"
-- Disable snack animations.
global.snacks_animate = false

12
config/nvim/lazyvim.json Normal file
View File

@@ -0,0 +1,12 @@
{
"extras": [
"lazyvim.plugins.extras.ai.copilot",
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.lang.go",
"lazyvim.plugins.extras.lang.svelte",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.typescript",
"lazyvim.plugins.extras.test.core"
],
"version": 7
}

View File

@@ -0,0 +1,9 @@
-- Configure rose-pine and gruvbox-material colorschemes.
return {
{ "rose-pine/neovim", name = "rose-pine" },
{ "sainnhe/gruvbox-material" },
{
"LazyVim/LazyVim",
opts = { colorscheme = "gruvbox-material" },
},
}

View File

@@ -0,0 +1,25 @@
-- Disable unused plugins and functionality.
return {
{
-- Disable the dashboard.
"folke/snacks.nvim",
opts = {
dashboard = { enabled = false },
notifier = { level = vim.log.levels.WARN },
},
},
{
-- Disable inline hints by default.
"neovim/nvim-lspconfig",
opts = {
inlay_hints = { enabled = false },
},
},
-- Disable unused plugins.
{ "folke/flash.nvim", enabled = false },
{ "folke/todo-comments.nvim", enabled = false },
{ "folke/trouble.nvim", enabled = false },
{ "MagicDuck/grug-far.nvim", enabled = false },
{ "akinsho/bufferline.nvim", enabled = false },
}

14
config/user/bashrc Normal file
View File

@@ -0,0 +1,14 @@
. /etc/bashrc
# === environment ===
export EDITOR=nvim \
WAYLAND_DISPLAY=wayland-0 \
XDG_RUNTIME_DIR=/run/user/1000 \
SSH_AUTH_SOCK=/run/user/1000/ssh-auth-sock \
PS1='\[\e[30;46m\] container | \w \[\e[0;36m\]\[\e[m\] '
# === aliases and functions ===
alias vi=nvim
post() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; }
eval "$(zoxide init --cmd cd bash)"
eval "$(fzf --bash)"

7
config/user/profile Normal file
View File

@@ -0,0 +1,7 @@
. ~/.bashrc
# === persist copilot auth files inside .local volume ===
if [ ! -d ~/.config/github-copilot ]; then
mkdir -p ~/.local/share/github-copilot
ln -s ~/.local/share/github-copilot ~/.config
fi