update: neovim background, .zshrc alias,tmux
This commit is contained in:
parent
6bf8fcbe9b
commit
b54773c06d
@ -14,7 +14,13 @@ require("lazy").setup({
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "williamboman/mason.nvim", config = true },
|
||||
{ "mason-org/mason-lspconfig.nvim", opts = {}, dependencies = {"mason-org/mason.nvim"}},
|
||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,},
|
||||
{ "hrsh7th/nvim-cmp", dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
@ -26,15 +32,18 @@ require("lazy").setup({
|
||||
{ "akinsho/toggleterm.nvim", version = "*", config = true },
|
||||
{ "sindrets/diffview.nvim", dependencies = "nvim-lua/plenary.nvim" },
|
||||
{ "airblade/vim-gitgutter" },
|
||||
{ 'windwp/nvim-autopairs', event = "InsertEnter", config = true }
|
||||
{ 'windwp/nvim-autopairs', event = "InsertEnter", config = true },
|
||||
{ "dasupradyumna/midnight.nvim", lazy = true, priority = 1000, opts = {} }
|
||||
})
|
||||
|
||||
-- neovim configuration
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.o.encoding = 'utf-8'
|
||||
vim.o.fileencoding = 'utf-8'
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.tabstop = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.expandtab = true
|
||||
vim.o.smartindent = true
|
||||
vim.o.hidden = false
|
||||
@ -63,9 +72,9 @@ vim.keymap.set('n', '<leader>fg', require('telescope.builtin').live_grep)
|
||||
vim.keymap.set('n', '<leader>fb', require('telescope.builtin').buffers)
|
||||
vim.keymap.set('n', '<leader>fh', require('telescope.builtin').help_tags)
|
||||
vim.keymap.set('n', '<leader>fr', require('telescope.builtin').lsp_references)
|
||||
vim.keymap.set('n', '<leader>frr', require('telescope.builtin').diagnostics)
|
||||
|
||||
-- Error Keymaps
|
||||
vim.keymap.set('n', '<leader>tr', require('telescope.builtin').diagnostics)
|
||||
vim.keymap.set('n', '<leader>tn', vim.diagnostic.goto_next);
|
||||
vim.keymap.set('n', '<leader>tf', vim.diagnostic.open_float);
|
||||
|
||||
@ -153,3 +162,5 @@ require('lualine').setup {
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
vim.cmd("colorscheme midnight")
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
|
||||
"LuaSnip": { "branch": "master", "commit": "ccf25a5452b8697a823de3e5ecda63ed3d723b79" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "202d8e92b3a74ac88eb3a7f1e40fb59b4c2a6535" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "106c4bcc053a5da783bf4a9d907b6f22485c2ea0" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "c8503e63c6afab3ed34b49865a4a4edbb1ebf4a8" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "cf22c9e32512de3be1fd6b65fd25e3aabead4d8b" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a89bfcfd0e44f898341ac8a80ba83ccf6218bef3" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "3a12a853ebf21ec1cce9a92290e3013f8ae75f02" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"vim-gitgutter": { "branch": "main", "commit": "488c0555e47e2aabe273c635f7dd233e985311a6" }
|
||||
}
|
||||
|
||||
@ -24,11 +24,18 @@ bind-key -n M-j select-pane -D
|
||||
bind-key -n M-k select-pane -U
|
||||
bind-key -n M-l select-pane -R
|
||||
|
||||
bind-key -n M-ù split-window -h
|
||||
bind-key -n M-$ split-window -v
|
||||
bind-key -n M-$ split-window -h
|
||||
bind-key -n M-% split-window -v
|
||||
|
||||
bind-key -n M-c new-window
|
||||
|
||||
|
||||
bind -n M-1 select-window -t 1
|
||||
bind -n M-2 select-window -t 2
|
||||
bind -n M-3 select-window -t 3
|
||||
bind -n M-4 select-window -t 4
|
||||
bind -n M-5 select-window -t 5
|
||||
|
||||
# Prefix
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
@ -38,11 +45,11 @@ bind C-a send-prefix
|
||||
set -g status on
|
||||
set -g status-interval 5
|
||||
set -g status-position bottom
|
||||
set -g status-left "#[fg=white]#[fg=black,bg=cyan] #(whoami) #[fg=blue,bg=default] "
|
||||
set -g status-right "#[fg=cyan,bg=default]#[fg=black,bg=cyan] #(hostname) %H:%M #[fg=cyan,bg=default]"
|
||||
set -g status-left " #(whoami) "
|
||||
set -g status-right " #(hostname) %H:%M "
|
||||
set -g status-style bg=default,fg=white
|
||||
set -g window-status-format "#[fg=white]#[fg=black bg=cyan] #I #W #[fg=blue, bg=default]"
|
||||
set -g window-status-current-format "#[fg=white,bg=black]#[fg=colour232,bg=yellow] #I #W #[fg=cyan,bg=default]"
|
||||
set -g window-status-format " #I #W "
|
||||
set -g window-status-current-format "-> #I #W "
|
||||
|
||||
# Pane and window style
|
||||
set -g pane-border-status bottom
|
||||
|
||||
52
zsh/.zshrc
52
zsh/.zshrc
@ -1,52 +0,0 @@
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
ZSH_THEME="sorin"
|
||||
plugins=(git)
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
export EDITOR=nvim
|
||||
|
||||
alias vim="nvim"
|
||||
alias vi="nvim"
|
||||
alias ls="lsd"
|
||||
|
||||
# Zoxide
|
||||
eval "$(zoxide init zsh)"
|
||||
alias cd='z'
|
||||
alias zi='zoxide query -i'
|
||||
alias zq='zoxide query'
|
||||
|
||||
alias attach='tmux attach-session -t'
|
||||
alias list='tmux list-sessions'
|
||||
|
||||
fzfedit() {
|
||||
local file
|
||||
file=$(find . -type f ! -path '*/.*' | fzf --preview 'bat --style=full --color=always {} 2>/dev/null') || return
|
||||
[[ -n "$file" ]] && nvim "$file"
|
||||
}
|
||||
|
||||
cfg() {
|
||||
local file
|
||||
file=$(find ~/.config -type f | fzf --preview 'bat --style=full --color=always {} 2>/dev/null') || return
|
||||
[[ -n "$file" ]] && nvim "$file"
|
||||
}
|
||||
|
||||
# Herd configurations
|
||||
export HERD_PHP_83_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/83/"
|
||||
export HERD_PHP_82_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/82/"
|
||||
export PATH="/Users/nasr/Library/Application Support/Herd/bin/":$PATH
|
||||
export HERD_PHP_85_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/85/"
|
||||
export HERD_PHP_84_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/84/"
|
||||
export NVM_DIR="/Users/nasr/Library/Application Support/Herd/config/nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[[ -f "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" ]] && builtin source "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh"
|
||||
|
||||
# Angular autocompletion
|
||||
source <(ng completion script)
|
||||
|
||||
# Homebrew configuration
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH" # Add Homebrew pkg-config path
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/Cellar/raylib/5.5/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
|
||||
# Syntax highlighting
|
||||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
52
zsh/zshrc
52
zsh/zshrc
@ -1,22 +1,54 @@
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
ZSH_THEME="miepa"
|
||||
|
||||
ZSH_THEME="sorin"
|
||||
plugins=(git)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
export EDITOR=nvim
|
||||
|
||||
alias update="brew update && brew upgrade"
|
||||
alias cleanup="brew cleanup"
|
||||
alias vim="nvim"
|
||||
alias runmain="clang++ main.cpp -o main&& ./main"
|
||||
alias vi="nvim"
|
||||
alias ls="lsd"
|
||||
|
||||
# Zoxide
|
||||
eval "$(zoxide init zsh)"
|
||||
alias cd='z'
|
||||
alias zi='zoxide query -i'
|
||||
alias zq='zoxide query'
|
||||
|
||||
alias attach='tmux attach-session -t'
|
||||
alias new='tmux new-session -t'
|
||||
alias list='tmux list-sessions'
|
||||
alias nnd='~/nnd'
|
||||
|
||||
fzfedit() {
|
||||
local file
|
||||
file=$(find . -type f ! -path '*/.*' | fzf --preview 'bat --style=full --color=always {} 2>/dev/null') || return
|
||||
[[ -n "$file" ]] && nvim "$file"
|
||||
}
|
||||
|
||||
cfg() {
|
||||
local file
|
||||
file=$(find ~/.config -type f | fzf --preview 'bat --style=full --color=always {} 2>/dev/null') || return
|
||||
[[ -n "$file" ]] && nvim "$file"
|
||||
}
|
||||
|
||||
# Herd configurations
|
||||
export HERD_PHP_83_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/83/"
|
||||
export HERD_PHP_82_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/82/"
|
||||
export PATH="/Users/nasr/Library/Application Support/Herd/bin/":$PATH
|
||||
export HERD_PHP_85_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/85/"
|
||||
export HERD_PHP_84_INI_SCAN_DIR="/Users/nasr/Library/Application Support/Herd/config/php/84/"
|
||||
export NVM_DIR="/Users/nasr/Library/Application Support/Herd/config/nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[[ -f "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh" ]] && builtin source "/Applications/Herd.app/Contents/Resources/config/shell/zshrc.zsh"
|
||||
|
||||
# Angular autocompletion
|
||||
source <(ng completion script)
|
||||
|
||||
# Homebrew configuration
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH" # Add Homebrew pkg-config path
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/Cellar/raylib/5.5/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
|
||||
export EDITOR=nvim
|
||||
|
||||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
# source ~/emsdk/emsdk_env.sh
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user