Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
85d91ed449 | ||
|
2530e4298a | ||
|
0b3190c4ae | ||
|
04af74924f | ||
|
f1edd6e561 | ||
|
9cc98a3b9f | ||
|
5cdedfed3e | ||
|
91bd5b3127 | ||
|
281d242f33 | ||
|
d77c920285 | ||
|
877411495d | ||
|
38d3d9db7e | ||
68f055d40d | |||
|
7fb864f1ba | ||
|
965f5d8903 | ||
|
466c040aef | ||
|
f2702fc46b | ||
|
6ac46c0a6c | ||
|
40ae02a20a | ||
f4b96ba916 | |||
|
e920d12e8f | ||
|
2039d5d7d1 | ||
|
95220f277d | ||
|
0d65aa892d | ||
1dd98b1313 | |||
49ce904902 | |||
b9984121c8 | |||
|
c05ba0c398 | ||
|
3352206526 | ||
|
1cf43dcad8 | ||
|
45f9fc2a67 | ||
|
de7e5b0893 | ||
|
96ff6fd09e | ||
|
4bbda9fdc4 | ||
|
295eae7f31 | ||
|
6596a0da69 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
nvim/lazy-lock.json
|
107
.zshrc
Normal file
107
.zshrc
Normal 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
13
deploy.sh
Executable 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!"
|
32
nvim/after/plugin/binds.lua
Normal file
32
nvim/after/plugin/binds.lua
Normal 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)
|
66
nvim/after/plugin/settings.lua
Normal file
66
nvim/after/plugin/settings.lua
Normal 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
2
nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
require('trianta')
|
||||||
|
|
3
nvim/lua/trianta/init.lua
Normal file
3
nvim/lua/trianta/init.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
require("trianta.vim")
|
||||||
|
require("trianta.lazy")
|
||||||
|
|
91
nvim/lua/trianta/lazy.lua
Normal file
91
nvim/lua/trianta/lazy.lua
Normal 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
30
nvim/lua/trianta/vim.lua
Normal 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
12
tmux/tmux.conf
Executable 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
12
update.sh
Executable 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!"
|
Loading…
Reference in New Issue
Block a user