kinda shit
This commit is contained in:
parent
d0f343763d
commit
0e0dcee821
5 changed files with 302 additions and 14 deletions
|
@ -1,3 +1 @@
|
|||
base/git
|
||||
base/nvim
|
||||
base/tmux
|
||||
|
|
|
@ -46,7 +46,7 @@ COPY tmux/tmux.conf /home/x/.tmux.conf
|
|||
# Should already be installed for Yay but repeating stuff to keep everything in blocks
|
||||
RUN sudo pacman -S --noconfirm git
|
||||
RUN mkdir -p /home/x/.config/git
|
||||
COPY git/gitconfig /home/x/.gitconfig
|
||||
#COPY ~/.gitconfig /home/x/.gitconfig
|
||||
COPY git/confs/ /home/x/.config/git/
|
||||
|
||||
## Tofu
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
[includeIf "gitdir:/home/x/Projects/xestro/"]
|
||||
path = ~/.config/git/xestro.conf
|
||||
|
||||
[includeIf "gitdir:/home/x/Projects/repobase/"]
|
||||
path = ~/.config/git/repobase.conf
|
||||
|
||||
[includeIf "gitdir:/home/x/Projects/gitlab/"]
|
||||
path = ~/.config/git/gitlab.conf
|
||||
|
||||
[includeIf "gitdir:/home/x/Projects/github/"]
|
||||
path = ~/.config/git/github.conf
|
240
base/nvim/init.lua
Normal file
240
base/nvim/init.lua
Normal file
|
@ -0,0 +1,240 @@
|
|||
-- Bootstrap lazy.nvim if it's not installed
|
||||
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", lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Plugin setup using lazy.nvim
|
||||
require("lazy").setup({
|
||||
|
||||
{
|
||||
"voldikss/vim-floaterm",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"preservim/nerdtree",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"junegunn/vim-easy-align",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
|
||||
{'akinsho/toggleterm.nvim', version = "*", config = true},
|
||||
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false, -- load immediately
|
||||
priority = 1000, -- make sure it loads first
|
||||
config = function()
|
||||
require("tokyonight").setup({
|
||||
style = "night",
|
||||
transparent = true,
|
||||
})
|
||||
vim.cmd("colorscheme tokyonight")
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
-- Basic on_attach function for keybindings
|
||||
local on_attach = function(_, bufnr)
|
||||
local opts = { noremap = true, silent = true, buffer = bufnr }
|
||||
local keymap = vim.keymap.set
|
||||
|
||||
keymap("n", "gd", vim.lsp.buf.definition, opts)
|
||||
keymap("n", "K", vim.lsp.buf.hover, opts)
|
||||
keymap("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
keymap("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
keymap("n", "gr", vim.lsp.buf.references, opts)
|
||||
end
|
||||
|
||||
-- Basic LSP servers setup
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- Example: Python (pyright)
|
||||
lspconfig.pyright.setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
-- Example: TypeScript/JavaScript (tsserver)
|
||||
lspconfig.ts_ls.setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
-- Example: Lua (for Neovim config dev)
|
||||
lspconfig.lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.dockerls.setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
lspconfig.terraformls.setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
lspconfig.phpactor.setup {
|
||||
on_attach = on_attach,
|
||||
cmd = { "phpactor", "language-server" },
|
||||
filetypes = { "php" },
|
||||
root_dir = lspconfig.util.root_pattern("composer.json", ".git"),
|
||||
}
|
||||
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"L3MON4D3/LuaSnip", -- snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- snippet completions
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
-- Confirm selection (only if one is explicitly selected)
|
||||
['<CR>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() and cmp.get_selected_entry() then
|
||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
-- Navigate the menu
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
},
|
||||
-- Avoid auto-selecting the first item
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = true
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = { "mason.nvim", "neovim/nvim-lspconfig" },
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls" }, -- this installs lua-language-server
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = function()
|
||||
require('gitsigns').setup({
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = {
|
||||
delay = 300,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
-- Set <leader> key
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Floaterm appearance (optional)
|
||||
vim.g.floaterm_width = 0.9
|
||||
vim.g.floaterm_height = 0.85
|
||||
vim.g.floaterm_borderchars = '─│─│╭╮╯╰'
|
||||
|
||||
-- <leader>g: open Floaterm running lazygit
|
||||
vim.keymap.set("n", "<leader>g", function()
|
||||
vim.cmd("FloatermNew --name=lazygit --autoclose=2 lazygit")
|
||||
end, { noremap = true, silent = true })
|
||||
|
||||
-- <C-t>: toggle NERDTree in current window
|
||||
vim.keymap.set("n", "<C-t>", ":NERDTreeToggle<CR>", { noremap = true, silent = true })
|
||||
|
||||
-- EasyAlign key mappings
|
||||
vim.keymap.set("x", "<leader>ga", ":EasyAlign<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "ga", "<Plug>(EasyAlign)")
|
||||
|
||||
require("toggleterm").setup {
|
||||
open_mapping = [[<C-\>]],
|
||||
direction = "horizontal", -- or "float" or "vertical"
|
||||
start_in_insert = true,
|
||||
insert_mappings = true,
|
||||
terminal_mappings = true,
|
||||
close_on_exit = true,
|
||||
shell = vim.o.shell -- use your default shell
|
||||
}
|
||||
|
||||
-- Set 2 spaces and no tabs for Terraform files
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "terraform",
|
||||
callback = function()
|
||||
vim.bo.expandtab = true -- use spaces instead of tabs
|
||||
vim.bo.shiftwidth = 2 -- size of an indent
|
||||
vim.bo.softtabstop = 2 -- number of spaces per <Tab>
|
||||
end,
|
||||
})
|
||||
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
|
||||
vim.opt.number = true -- Enable absolute line numbers
|
||||
vim.opt.relativenumber = false -- Disable relative line numbers
|
||||
vim.opt.colorcolumn = "80"
|
61
base/tmux/tmux.conf
Normal file
61
base/tmux/tmux.conf
Normal file
|
@ -0,0 +1,61 @@
|
|||
# vim:set ft=tmux:
|
||||
|
||||
# --> Catppuccin (Mocha)
|
||||
set -ogq @thm_bg "#1e1e2e"
|
||||
set -ogq @thm_fg "#cdd6f4"
|
||||
|
||||
# Colors
|
||||
set -ogq @thm_rosewater "#f5e0dc"
|
||||
set -ogq @thm_flamingo "#f2cdcd"
|
||||
set -ogq @thm_pink "#f5c2e7"
|
||||
set -ogq @thm_mauve "#cba6f7"
|
||||
set -ogq @thm_red "#f38ba8"
|
||||
set -ogq @thm_maroon "#eba0ac"
|
||||
set -ogq @thm_peach "#fab387"
|
||||
set -ogq @thm_yellow "#f9e2af"
|
||||
set -ogq @thm_green "#a6e3a1"
|
||||
set -ogq @thm_teal "#94e2d5"
|
||||
set -ogq @thm_sky "#89dceb"
|
||||
set -ogq @thm_sapphire "#74c7ec"
|
||||
set -ogq @thm_blue "#89b4fa"
|
||||
set -ogq @thm_lavender "#b4befe"
|
||||
|
||||
# Surfaces and overlays
|
||||
set -ogq @thm_subtext_1 "#a6adc8"
|
||||
set -ogq @thm_subtext_0 "#bac2de"
|
||||
set -ogq @thm_overlay_2 "#9399b2"
|
||||
set -ogq @thm_overlay_1 "#7f849c"
|
||||
set -ogq @thm_overlay_0 "#6c7086"
|
||||
set -ogq @thm_surface_2 "#585b70"
|
||||
set -ogq @thm_surface_1 "#45475a"
|
||||
set -ogq @thm_surface_0 "#313244"
|
||||
set -ogq @thm_mantle "#181825"
|
||||
set -ogq @thm_crust "#11111b"
|
||||
|
||||
# Enable mouse mode
|
||||
set -g mouse on
|
||||
|
||||
# Set status bar at bottom (default)
|
||||
set -g status-position bottom
|
||||
|
||||
# Center window list
|
||||
set -g status-justify centre
|
||||
|
||||
# Style the status bar with your theme
|
||||
set -g status-bg '#1e1e2e'
|
||||
set -g status-fg '#cdd6f4'
|
||||
|
||||
# Active window style
|
||||
set-window-option -g window-status-current-style "bg=#313244,fg=#cba6f7,bold"
|
||||
set-window-option -g window-status-current-format " #I:#W "
|
||||
|
||||
# Inactive windows style
|
||||
set-window-option -g window-status-style "bg=#1e1e2e,fg=#7f849c"
|
||||
set-window-option -g window-status-format " #I:#W "
|
||||
|
||||
# Left/right status sections (can be empty or decorated)
|
||||
set -g status-left ""
|
||||
set -g status-right ""
|
||||
|
||||
|
||||
set -g xterm-keys on
|
Loading…
Add table
Add a link
Reference in a new issue