Compare commits

..

36 Commits
main ... common

Author SHA1 Message Date
Trianta
85d91ed449 nvim: trim useless fat 2025-02-22 08:28:59 -06:00
Trianta
2530e4298a version: update to v0.1.0 2025-02-04 07:24:53 -06:00
Trianta
0b3190c4ae zsh: update binds 2024-09-14 00:03:39 -05:00
Trianta
04af74924f nvim: untag treesitter 2024-09-14 00:03:16 -05:00
Trianta
f1edd6e561 zshrc: move from alacritty to cool-retro-term 2024-07-29 04:02:28 -05:00
Trianta
9cc98a3b9f zshrc: add custom aliases from armory 2024-06-25 03:42:35 -05:00
Trianta
5cdedfed3e zsh: allow using cmakeg and cmakeb as subcommands 2024-06-07 23:02:15 -05:00
Trianta
91bd5b3127 nvim: remove new semi-conflicting binds 2024-06-07 23:01:48 -05:00
Trianta
281d242f33 nvim: update telescope to v0.1.8 2024-06-07 21:55:16 -05:00
Trianta
d77c920285 nvim: update harpoon keybind 2024-05-15 22:31:38 -05:00
Trianta
877411495d nvim: update lsp keybinds 2024-04-17 04:20:43 -05:00
Trianta
38d3d9db7e zsh: add cmake aliases and set default editor 2024-04-17 04:20:08 -05:00
68f055d40d Added binds similar to lsp-nvim for zsh 2024-03-29 01:08:10 -05:00
Trianta
7fb864f1ba Added zshrc to dotfiles 2024-03-26 02:18:38 -05:00
Trianta
965f5d8903 Set obsidian.nvim to v3.2.0 2024-02-14 18:55:34 -06:00
Trianta
466c040aef Set lazy.nvim to stable 2024-02-14 18:52:18 -06:00
Trianta
f2702fc46b Set treesitter to v0.9.2 and fixed harpoon bind error 2024-02-14 18:47:42 -06:00
Trianta
6ac46c0a6c Set telescope to tag, cleaned formatting for colors, and updated to harpoon2 2024-02-14 18:41:49 -06:00
Trianta
40ae02a20a Updated LSP-Zero to v3.0 and fixed Unity integration 2024-02-03 22:23:25 -06:00
f4b96ba916 Changed model for neovim ollama 2024-02-01 11:06:22 -06:00
Trianta
e920d12e8f Disable obsidian frontmatter creation 2024-01-29 03:03:37 -06:00
Trianta
2039d5d7d1 Cleaned up neovim config and added initial ollama plugin 2024-01-28 22:09:50 -06:00
Trianta
95220f277d Minor mistake with using gitignore 2024-01-28 22:09:17 -06:00
Trianta
0d65aa892d Added ignore to lazy-lock 2024-01-28 21:14:37 -06:00
1dd98b1313 Updated nvim to init Lazy properly 2024-01-25 11:56:17 -06:00
49ce904902 Fixed wrong argument in deploy 2024-01-25 11:13:44 -06:00
b9984121c8 Update deploy/update to properly clean up .config folder 2024-01-25 11:13:07 -06:00
Trianta
c05ba0c398 Removed non-common script stuff 2024-01-19 15:54:11 -06:00
Trianta
3352206526 Removed alacritty and hypr from common 2024-01-19 15:31:44 -06:00
Trianta
1cf43dcad8 Cherry-pick fix for update script 2024-01-16 19:16:47 -06:00
Trianta
45f9fc2a67 Added deploy script 2024-01-16 19:15:15 -06:00
Trianta
de7e5b0893 Added nvim 2024-01-16 19:15:03 -06:00
Trianta
96ff6fd09e Final fix on alacritty issue 2024-01-16 19:14:53 -06:00
Trianta
4bbda9fdc4 Fixed catppuccin using submodules 2024-01-16 19:14:44 -06:00
Trianta
295eae7f31 Added Hypr updating 2024-01-16 19:14:27 -06:00
Trianta
6596a0da69 Added Alacritty 2024-01-16 19:14:16 -06:00
11 changed files with 369 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
nvim/lazy-lock.json

107
.zshrc Normal file
View File

@ -0,0 +1,107 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/trianta/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Alias
alias -g vi="nvim"
alias -g vim="nvim"
alias -g cmakegd="cmake -B build -S . -DCMAKE_BUILD_TYPE:STRING=Debug"
alias -g cmakeg="cmake -B build -S ."
alias -g cmakeb="cmake --build build -j $(nproc)"
alias -g pcore="taskset -c 1-7"
alias -g a="notify"
alias -g af="taskset -c 0-19 notify"
alias -g tm="tmux new -A -s"
# Plugins from AUR
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
# Enable color support
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias l='ls -la --color -h --group-directories-first'
alias ls='ls --color -h --group-directories-first'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Hyprland login
alias hy='Hyprland'
# Export ~/.config path
export XDG_CONFIG_HOME="$HOME/.config"
# Created by `pipx` on 2023-10-16 08:33:15
export PATH="$PATH:/home/trianta/.local/bin"
# Little neat settings
set colored-stats On
set completion-ignore-case On
set completion-prefix-display-length 3
set mark-symlinked-directories On
set show-all-if-ambiguous On
set show-all-if-unmodified On
set visible-stats On
# Keyboard binds
# common
bindkey "^L" forward-word
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[3~" delete-char
# Alacritty
bindkey "^B" beginning-of-line
bindkey "^E" end-of-line
bindkey ";3D" backward-word
bindkey ";3C" forward-word
bindkey ";5D" backward-word
bindkey ";5C" forward-word
bindkey "^H" backward-word
bindkey '^K' history-substring-search-up
bindkey '^J' history-substring-search-down
# cool-retro-term
#bindkey '^K' history-substring-search-up
#bindkey '^J' history-substring-search-down
#bindkey '^H' backward-delete-char
#bindkey '^B' backward-word
#bindkey '^W' forward-word
# Set default editor
export EDITOR="nvim"
# Global CMake clangd fix
export CMAKE_EXPORT_COMPILE_COMMANDS=1
[[ "$(tty)" == /dev/tty1 ]] && Hyprland
$(&>/dev/null pw-play --volume=2.0 ~/.alert/ready.mp3 &)

13
deploy.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
echo "Syncing user with nvim..."
rsync --delete --recursive $(dirname "$0")/nvim/ ~/.config/nvim
echo "Syncing user with tmux..."
echo " Note: prefix + I for tmux setup"
mkdir -p ~/tmux
rsync --recursive $(dirname "$0")/tmux/tmux.conf ~/.config/tmux/tmux.conf
rsync $(dirname "$0")/.zshrc ~/.zshrc
echo "Syncing complete!"

View File

@ -0,0 +1,32 @@
-- Telescope
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end)
-- Harpoon 2
local harpoon = require("harpoon")
-- REQUIRED
harpoon:setup()
-- REQUIRED
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
vim.keymap.set("n", "<C-t>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<C-q>", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<C-w>", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<C-e>", function() harpoon:list():select(3) end)
vim.keymap.set("n", "<C-r>", function() harpoon:list():select(4) end)
-- Fix annoying binds
vim.keymap.del("n", "<C-W><C-D>")
vim.keymap.del("n", "<C-W>d")
-- Zenmode
vim.keymap.set("n", "<leader>pz", function()
require("zen-mode").toggle({
window = {
width = 90,
}
})
end)

View File

@ -0,0 +1,66 @@
-- lsp-zero
local lsp_zero = require('lsp-zero')
lsp_zero.on_attach(function(client, bufnr)
local opts = {buffer = bufnr, remap = false}
vim.keymap.set("n", "<leader>gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>ve", function() vim.diagnostic.open_float() end, opts)
vim.diagnostic.config({virtual_text = false})
end)
-- Cmp
local cmp = require('cmp')
local cmp_select = {behavior = cmp.SelectBehavior.Select}
cmp.setup({
sources = {
{name = 'nvim_lsp'},
{name = 'nvim_lsp_signature_help'},
{name = 'nvim_lua'},
{name = 'luasnip', keyword_length = 2},
{name = 'buffer', keyword_length = 3},
{name = 'path'},
},
formatting = lsp_zero.cmp_format(),
completion = {
completeopt = 'menu,menuone,noinsert'
},
mapping = cmp.mapping.preset.insert({
['<C-k>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-j>'] = cmp.mapping.select_next_item(cmp_select),
['<C-l>'] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping.complete(),
}),
})
-- Treesitter
vim.opt.runtimepath:append("~/.local/share/nvim/parsers")
require('nvim-treesitter.configs').setup {
ensure_installed = {
"c", "lua", "vim", "c_sharp", "cpp", "python", "json", "json5",
"bibtex", "query" },
sync_install = false,
auto_install = true,
parser_install_dir = "~/.local/share/nvim/parsers",
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}
-- Obsidian
vim.opt.conceallevel = 1
-- Colors
function ColorMyPencils(color)
color = color or "catppuccin-frappe"
vim.cmd.colorscheme(color)
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
ColorMyPencils()

2
nvim/init.lua Normal file
View File

@ -0,0 +1,2 @@
require('trianta')

View File

@ -0,0 +1,3 @@
require("trianta.vim")
require("trianta.lazy")

91
nvim/lua/trianta/lazy.lua Normal file
View File

@ -0,0 +1,91 @@
-- 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)
return require('lazy').setup({
{
"folke/lazy.nvim",
tag = "stable",
},
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
},
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000
},
-- colors
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
},
{
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
dependencies = {
-- LSP Support
"neovim/nvim-lspconfig", -- Required
-- Autocompletion
'hrsh7th/nvim-cmp', -- Required
'hrsh7th/cmp-nvim-lsp', -- Required
'hrsh7th/cmp-buffer', -- Optional
'hrsh7th/cmp-path', -- Optional
-- Snippets
'L3MON4D3/LuaSnip', -- Required
'rafamadriz/friendly-snippets', -- Optional
}
},
-- navigation
{
"nvim-telescope/telescope.nvim",
tag = '0.1.8',
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
},
-- obsidian
{
"epwalsh/obsidian.nvim",
version = "v3.2.0",
lazy = true,
ft = "markdown",
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
workspaces = {
{
name = "trinote",
path = "~/sync/obsidian/Trinote/",
},
},
disable_frontmatter = true,
},
ui = {
enable = true
}
},
})

30
nvim/lua/trianta/vim.lua Normal file
View File

@ -0,0 +1,30 @@
-- vim core settings
vim.opt.nu = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.g.mapleader = " "
vim.opt.mouse = ""
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)

12
tmux/tmux.conf Executable file
View File

@ -0,0 +1,12 @@
# Start panels at 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Plugins
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'mocha' # or frappe, latte, mocha
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '/usr/share/tmux-plugin-manager/tpm'

12
update.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
echo "Syncing dotfiles with nvim..."
rsync --delete --recursive ~/.config/nvim $(dirname "$0")
echo "Syncing dotfiles with tmux..."
rsync ~/.config/tmux/tmux.conf $(dirname "$0")/tmux/tmux.conf
echo "Syncing dotfiles with zshrc..."
rsync ~/.zshrc $(dirname "$0")/.zshrc
echo "Syncing complete!"