Compare commits

...

10 Commits

9 changed files with 143 additions and 88 deletions

View File

@@ -1,25 +1,13 @@
#!/bin/bash
clicmd="zsh"
if command -v "$clicmd"&> /dev/null; then
echo "$clicmd already installed"
else
sudo dnf install "$clicmd" -y
fi
clicmd="tmux"
if command -v "$clicmd" &> /dev/null; then
echo "$clicmd already installed"
else
sudo dnf install "$clicmd" -y
fi
clicmd="nvim"
if command -v "$clicmd" &> /dev/null; then
echo "$clicmd already installed"
else
sudo dnf install "neovim" -y
fi
sudo dnf install vlc kdenlive x264 x264-devel x246-libs neovim zsh-syntax-highlighting -y
for cmd in "zsh" "git" "tmux" "kitty" "go" "bat"; do
if command -v "$cmd"&> /dev/null; then
echo "$clicmd already installed"
else
sudo dnf install "$clicmd" -y
fi
done
CONFIGDIR=$HOME/.config
@@ -41,6 +29,8 @@ fi
ln -s "$PWD/zsh/ohmyposh/" "$POSHDIR"
echo "Setting up oh-my-zsh"
OMZDIR="$HOME/.oh-my-zsh"
if [ -e "$OMZDIR" ]; then
@@ -83,3 +73,6 @@ fi
git clone https://github.com/tmux-plugins/tpm ./tmux/plugins/tpm
ln -s "$PWD/tmux/" "$TMUXFILE"
echo "done with initialization"

View File

@@ -1,8 +0,0 @@
echo "Installing various dnf dependencies"
sudo dnf install neovim -y
sudo dnf install vlc -y
sudo dnf install kdenlive -y
sudo dnf install x264 x264-devel x246-libs --allowerasing -y
sudo dnf install docker-ce docker-ce-cli docker-compose -y

View File

@@ -1,32 +1,34 @@
{
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
"emmet": { "branch": "main", "commit": "bff967b1d91948a88104987b427842deb78bacf5" },
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "ed4dc336a73c18da6fea6e1cf7ad6e1b76d281eb" },
"lazydev.nvim": { "branch": "main", "commit": "01bc2aacd51cf9021eb19d048e70ce3dd09f7f93" },
"markview.nvim": { "branch": "main", "commit": "c93ea99d96b4bfda5b7c7d0dfca9c26edf6e78f0" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1d77bd86e1c3eaa777010c95dad455b83823f247" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"markview.nvim": { "branch": "main", "commit": "0a5033326f703d99a8788e2d47753d6298195e8a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0b9bb925c000ae649ff7e7149c8cd00031f4b539" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" },
"mini.nvim": { "branch": "main", "commit": "d1a91582bf2d16026ae84292874c70fb2d0ffe42" },
"neo-tree.nvim": { "branch": "main", "commit": "8cdd6b1940f333c1dd085526a9c45b30fb2dbf50" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
"mini.nvim": { "branch": "main", "commit": "e27fcecf6cbffd8ed391bdf0eb746fdb5b9bfa44" },
"neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim": { "branch": "main", "commit": "8c4125e3c746976ba025dc5d908fa22c6aa09486" },
"nvim-lspconfig": { "branch": "master", "commit": "a9b2fb560c4ab22c10728fd5149dbd7b62aa4f69" },
"nvim": { "branch": "main", "commit": "193e123cdbc4dd3e86db883d55349e9587f0ded6" },
"nvim-lspconfig": { "branch": "master", "commit": "a2bd1cf7b0446a7414aaf373cea5e4ca804c9c69" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"venn.nvim": { "branch": "main", "commit": "b09c2f36ddf70b498281845109bedcf08a7e0de0" },
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
}

View File

@@ -0,0 +1,42 @@
return {
'pedro757/emmet',
config = function ()
local lspconfig = require'lspconfig'
local configs = require'lspconfig.configs'
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
if not configs.ls_emmet then
configs.ls_emmet = {
default_config = {
cmd = { 'emmet-ls', '--stdio' };
filetypes = {
'html',
'css',
'scss',
'javascriptreact',
'typescriptreact',
'haml',
'xml',
'xsl',
'pug',
'slim',
'sass',
'stylus',
'less',
'sss',
'hbs',
'handlebars',
};
root_dir = function(fname)
return vim.loop.cwd()
end;
settings = {};
};
}
end
lspconfig.ls_emmet.setup { capabilities = capabilities }
end
}

21
nvim/lua/plugins/html.lua Normal file
View File

@@ -0,0 +1,21 @@
return {
'windwp/nvim-ts-autotag',
config = function()
require('nvim-ts-autotag').setup({
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = true -- Auto close on trailing </
},
-- Also override individual filetype configs, these take priority.
-- Empty by default, useful if one of the "opts" global settings
-- doesn't work well in a specific filetype
per_filetype = {
["html"] = {
enable_close = false
}
}
})
end
}

View File

@@ -175,6 +175,7 @@ return {
},
},
},
emmet_ls = {},
}
-- Ensure the servers and tools above are installed
@@ -190,14 +191,14 @@ return {
--
-- You can add other tools here that you want Mason to install
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
local ensure_installed = vim.tbl_keys(servers)
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
require('mason-lspconfig').setup {
ensure_installed = {},
ensure_installed = ensure_installed,
automatic_installation = false,
handlers = {
function(server_name)

View File

@@ -23,20 +23,24 @@ return {
end
end,
opts = {
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
filesystem = {
filtered_items = {
hide_dotfiles = false,
hide_gitignored = false,
hide_by_name = {
'.git',
'__pycache__/',
}
},
never_show = {
'__pycache__',
'.DS_Store',
},
},
use_libuv_file_watcher = true,
never_show = {},
window = {
mappings = {
['\\'] = 'close_window',
['P'] = 'toggle_preview',
},
},
},

View File

@@ -53,8 +53,8 @@ set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
@@ -70,12 +70,13 @@ set -g @plugin 'tmux-plugins/tmux-continuum'
# More Theme
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_directory}"
set -ag status-right "#{E:@catppuccin_status_user}"
set -ag status-right "#{E:@catppuccin_status_host}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -ag status-right-length "160"
set -g mode-style fg=#D8DEE9,bg=#3B4253
# set vi-mode
@@ -89,3 +90,4 @@ bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
run '~/.config/tmux/plugins/tpm/tpm'

View File

@@ -11,8 +11,9 @@ fi
#############################
# Global Variables
source "$HOME/.cargo/env"
export PATH="$PATH:$HOME/.local/bin"
export PATH="$HOME/Projects/Scripts:$PATH:$HOME/.local/bin"
export projects="/media/shared/Projects/"
export LESS='-FRX'
export classes=$(eza --absolute -1 $HOME/Documents/Classes 2>/dev/null | sort -t_ -k 1,1 -k 2,2r | tail -n 1)
export steam_loc="$HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata"
@@ -25,20 +26,17 @@ ZSH_THEME="xiong-chiamiov"
plugins=(
zsh-autosuggestions
common-aliases
# ripgrep
zoxide
qrcode
pip
rust
# git
# sudo
git
zsh-syntax-highlighting
)
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $ZSH/oh-my-zsh.sh
## Oh My Zsh Initialization
export ZSH="$HOME/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh
################################################################################
# Colours
@@ -201,32 +199,46 @@ function extract()
}
forget () {
print "Forgetting last line with '$@'. Please reload shell after completion."
if [ -z "$@" ]; then
echo "ERROR: No keyword given"
return
fi
temp=$(mktemp)
echo "Forgetting last command with '$@'."
sed -e '$ d' ~/.zsh_history | tac | awk "!/$@/ || f++" | tac > $temp
new_zsh_history=$(tac ~/.zsh_history | awk "/$@/ && p<2 {p++; next}1" | tac)
print "Difference between .zsh_history and new .zsh_history"
diff ~/.zsh_history $temp
echo $new_zsh_history | diff ~/.zsh_history -
mv $temp ~/.zsh_history
if [ -f $temp ]; then
rm -f $temp
read answer
if [ "$answer" = "y" ]; then
echo $new_zsh_history > ~/.zsh_history
echo "Last line with '$@' forgotten"
echo "You will need to reload your shell for the changes to take effect."
else
echo "Changes not applied."
fi
}
forgetall () {
print "Forgetting all lines with '$@'. Please reload shell after completion."
if [ -z "$@" ]; then
echo "ERROR: No keyword given"
return
fi
temp=$(mktemp)
sed "/$@/d" ~/.zsh_history > $temp
echo "Forgetting all command with '$@'."
new_zsh_history=$(grep --inverse-match "$@" ~/.zsh_history)
print "Difference between .zsh_history and new .zsh_history"
diff ~/.zsh_history $temp
mv $temp ~/.zsh_history
echo $new_zsh_history | diff ~/.zsh_history -
if [ -f $temp ]; then
rm -f $temp
read -p 'Apply changes? (y/n): ' answer
if [ "$answer" = "y" ]; then
echo $new_zsh_history > ~/.zsh_history
echo "Last line with '$@' forgotten"
echo "You will need to reload your shell for the changes to take effect."
else
echo "Changes not applied."
fi
}
@@ -240,17 +252,3 @@ fcd() {
fi
}
tcd() {
DIR=$(mktemp -d 2>/dev/null)
if [[ -e "$DIR" ]]; then
cd $DIR
print "Moved to \"$DIR\""
else
print "\"$DIR\" failed to be created"
fi
}
ttcd() {
cd /tmp
tcd
}