Added my dotfiles

This commit is contained in:
SHuRiKeN 2023-08-02 06:50:33 +05:30
parent 4ecfb02f2d
commit 220630016c
8 changed files with 183 additions and 0 deletions

View File

@ -0,0 +1,12 @@
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx

View File

@ -0,0 +1,25 @@
function fish_greeting
echo """
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣯⣽⣿⣿⣦⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⡿⢿⡟⢿⣽⣿⣿⡣⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢰⢿⣯⠁⠀⠀⠸⣷⣌⣿⣿⣿⡟⠄⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠘⣾⣾⣶⣄⠰⠟⠻⠆⠘⣧⡟⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢫⠉⠉⡀⠀⠀⠀⢠⣿⣿⡂⠀⠀⠀⠀⠀⠀⠀⠀⠀ Loose & you die. Win & you live.
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⡀⢘⡂⠄⢀⡾⡏⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ You can't win if you don't fight.
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⣠⠔⣻⢱⠁⢳⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣶⡿⠹⠾⠁⣸⢀⣈⣻⣧⠉⢻⣦⡀⠀⠀⠀⠀ 勝てなきゃ死ぬ。勝てば生きる。
⠀⠀⠀⠀⠀⠀⣠⣾⢿⣽⠯⢶⡇⠀⣠⣗⣛⠶⢾⡇⢰⣿⡣⣿⣆ 戦わなければ勝てない。
⠀⠀⠀⠀⠀⣰⣿⣿⡻⣿⡉⢱⣤⡼⢯⡨⠃⣰⣿⣵⠟⣁⡴⠋⠁⣷⡄⠀
⠀⠀⠀⠀⢸⣿⢻⣎⢷⡇⢣⡏⣿⠭⢹⠀⢰⣿⢟⣵⠾⠋⠀⠀⢠⠟⣽⠀
⠀⠀⠀⠀⣿⣿⠀⠹⣾⣷⡀⠳⠦⠒⠉⢀⣾⣿⣿⠁⢠⣆⠀⠀⡎⠀⢸⡄
⠀⠀⠀⢸⣿⣿⠀⠀⣿⠀⢳⡀⠀⣀⠴⡋⣿⣿⡁⠀⢈⣿⠀⣸⡃⠀⢽⡃
⠀⠀⠀⢸⡟⣿⠀⠀⡿⠀⠀⠱⠀⠀⠀⠀⣿⡟⠁⠀⢻⣽⡆⠋⡇⠀⢸⡇⠀
"""
end
starship init fish | source
set EDITOR "nvim" # Set nvim as the default editor
set VISUAL "nvim"
fish_add_path ~/.cargo/bin

View File

@ -0,0 +1,37 @@
#Set true color
set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on
# Start windows and panes at 1, not 0
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
# Set prefix
unbind C-b
set -g prefix C-Space
bind C-space send-prefix
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'
#set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Open panes in current directory
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

View File

@ -0,0 +1,12 @@
---@type ChadrcConfig
local M = {}
M.ui = {
theme = 'catppuccin',
nvdash = {
load_on_startup = true
}
}
M.plugins = 'custom.plugins'
M.mappings = require "custom.mappings"
return M

View File

@ -0,0 +1,11 @@
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local options = {
server = {
on_attach = on_attach,
capabilities = capabilities
}
}
return options

View File

@ -0,0 +1 @@
vim.opt.rnu = true

View File

@ -0,0 +1,40 @@
local M = {}
M.general = {
n = {
["<C-h>"] = { "<cmd> TmuxNavigateLeft<CR>", "window left"},
["<C-l>"] = { "<cmd> TmuxNavigateRight<CR>", "window right"},
["<C-j>"] = { "<cmd> TmuxNavigateDown<CR>", "window down"},
["<C-k>"] = { "<cmd> TmuxNavigateUp<CR>", "window up"},
}
}
M.dap = {
n = {
["<leader>db"] = {
"<cmd> DapToggleBreakpoint <CR>",
"Toggle breakpoint"
},
["<leader>dus"] = {
function ()
local widgets = require('dap.ui.widgets');
local sidebar = widgets.sidebar(widgets.scopes);
sidebar.open();
end,
"Open debugging sidebar"
}
}
}
M.crates = {
n = {
["<leader>rcu"] = {
function ()
require('crates').upgrade_all_crates()
end,
"update crates"
}
}
}
return M

View File

@ -0,0 +1,45 @@
local plugins = {
{
"christoomey/vim-tmux-navigator",
lazy = false
},
{
"rust-lang/rust.vim",
ft = "rust",
init = function ()
vim.g.rustfmt_autosave = 1
end
},
{
"simrat39/rust-tools.nvim",
ft = "rust",
dependencies = "neovim/nvim-lspconfig",
opts = function ()
return require "custom.configs.rust-tools"
end,
config = function(_, opts)
require('rust-tools').setup(opts)
end
},
{
"mfussenegger/nvim-dap"
},
{
"saecki/crates.nvim",
ft = {"rust", "toml"},
config = function (_,opts)
local crates = require('crates')
crates.setup(opts)
crates.show()
end
},
{
"hrsh7th/nvim-cmp",
opts = function ()
local M = require "plugins.configs.cmp"
table.insert(M.sources, {name = "crates"})
return M
end
}
}
return plugins