Compare commits
10 commits
77cbe2530d
...
653b1f28c1
Author | SHA1 | Date | |
---|---|---|---|
|
653b1f28c1 | ||
|
6ce69c6848 | ||
|
62af8db1f9 | ||
|
cde130f275 | ||
|
31827ab732 | ||
|
7ee9277b12 | ||
|
ac048c44b3 | ||
|
11b6fe4b15 | ||
|
6a6580cef9 | ||
|
37872eb856 |
8 changed files with 161 additions and 83 deletions
|
@ -2,7 +2,6 @@
|
||||||
-- See `:help cmp`
|
-- See `:help cmp`
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
local lspkind = require('lspkind')
|
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
luasnip.config.setup {}
|
luasnip.config.setup {}
|
||||||
|
|
||||||
|
|
|
@ -61,4 +61,11 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
pattern = '*',
|
pattern = '*',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Git stuff
|
||||||
|
vim.keymap.set('n', '<leader>gs', ":G status<CR>")
|
||||||
|
vim.keymap.set('n', '<leader>ga', ":G add %<CR>")
|
||||||
|
vim.keymap.set('n', '<leader>gc', [[:G commit -m ''<Left>]])
|
||||||
|
vim.keymap.set('n', '<leader>gp', ":G push<CR>")
|
||||||
|
|
||||||
|
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
|
@ -26,7 +26,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- Useful status updates for LSP
|
-- Useful status updates for LSP
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
||||||
-- Additional lua configuration, makes nvim stuff amazing!
|
-- Additional lua configuration, makes nvim stuff amazing!
|
||||||
'folke/neodev.nvim',
|
'folke/neodev.nvim',
|
||||||
|
@ -51,7 +51,7 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Useful plugin to show you pending keybinds.
|
-- Useful plugin to show you pending keybinds.
|
||||||
{ 'folke/which-key.nvim', opts = {} },
|
{ 'folke/which-key.nvim', opts = {} },
|
||||||
{
|
{
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
|
@ -183,6 +183,42 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'stevearc/conform.nvim',
|
||||||
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
|
config = function()
|
||||||
|
local conform = require 'conform'
|
||||||
|
|
||||||
|
conform.setup {
|
||||||
|
formatters_by_ft = {
|
||||||
|
bash = { 'shellharden', 'beautysh' },
|
||||||
|
css = { { 'prettierd', 'prettier' } },
|
||||||
|
html = { 'htmlbeautifier' },
|
||||||
|
javascript = { { 'prettierd', 'prettier' } },
|
||||||
|
javascriptreact = { { 'prettierd', 'prettier' } },
|
||||||
|
json = { { 'prettierd', 'prettier' } },
|
||||||
|
lua = { 'stylua' },
|
||||||
|
markdown = { { 'prettierd', 'prettier' } },
|
||||||
|
rust = { 'rustfmt' },
|
||||||
|
scss = { { 'prettierd', 'prettier' } },
|
||||||
|
sh = { 'shellharden', 'beautysh' },
|
||||||
|
toml = { 'taplo' },
|
||||||
|
typescript = { { 'prettierd', 'prettier' } },
|
||||||
|
typescriptreact = { { 'prettierd', 'prettier' } },
|
||||||
|
yaml = { 'yamlfix' },
|
||||||
|
zsh = { 'shellharden', 'beautysh' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<leader>f', function()
|
||||||
|
conform.format {
|
||||||
|
lsp_fallback = true,
|
||||||
|
async = true,
|
||||||
|
timeout_ms = 500,
|
||||||
|
}
|
||||||
|
end, { desc = 'Format file or range (in visual mode)' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
-- Highlight, edit, and navigate code
|
-- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
@ -192,7 +228,7 @@ require('lazy').setup({
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
},
|
},
|
||||||
|
|
||||||
require 'kickstart.plugins.autoformat',
|
-- require 'kickstart.plugins.autoformat',
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
||||||
}, {})
|
}, {})
|
||||||
|
|
|
@ -75,13 +75,13 @@ require('mason-lspconfig').setup()
|
||||||
-- If you want to override the default filetypes that your language server will attach to you can
|
-- If you want to override the default filetypes that your language server will attach to you can
|
||||||
-- define the property 'filetypes' to the map in question.
|
-- define the property 'filetypes' to the map in question.
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
bashls = {},
|
||||||
-- gopls = {},
|
cssls = {},
|
||||||
-- pyright = {},
|
docker_compose_language_service = {},
|
||||||
-- rust_analyzer = {},
|
dockerls = {},
|
||||||
-- tsserver = {},
|
gopls = {},
|
||||||
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
html = {},
|
||||||
|
jsonls = {},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = { checkThirdParty = false },
|
workspace = { checkThirdParty = false },
|
||||||
|
@ -90,6 +90,14 @@ local servers = {
|
||||||
-- diagnostics = { disable = { 'missing-fields' } },
|
-- diagnostics = { disable = { 'missing-fields' } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
marksman = {},
|
||||||
|
mutt_ls = {},
|
||||||
|
pyright = {},
|
||||||
|
rust_analyzer = {},
|
||||||
|
tailwindcss = {},
|
||||||
|
tsserver = {},
|
||||||
|
yamlls = {},
|
||||||
|
zls = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Setup neovim lua configuration
|
-- Setup neovim lua configuration
|
||||||
|
@ -104,6 +112,7 @@ local mason_lspconfig = require 'mason-lspconfig'
|
||||||
|
|
||||||
mason_lspconfig.setup {
|
mason_lspconfig.setup {
|
||||||
ensure_installed = vim.tbl_keys(servers),
|
ensure_installed = vim.tbl_keys(servers),
|
||||||
|
automatic_installation = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
mason_lspconfig.setup_handlers {
|
mason_lspconfig.setup_handlers {
|
||||||
|
|
|
@ -4,12 +4,17 @@
|
||||||
vim.defer_fn(function()
|
vim.defer_fn(function()
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
|
ensure_installed = {
|
||||||
|
'markdown_inline' -- Markdown has/needs(atm) 2 packages and this one isn't installed automatically
|
||||||
|
},
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
|
},
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Keyboard lights
|
# Keyboard lights
|
||||||
[ -x "$(command -v g610-led)" ] && g610-led -a ff
|
[ -x "$(command -v g610-led)" ] && g610-led -a ff
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
[ -x "$(command -v wal)" ] && wal -R
|
[ -x "$(command -v wal)" ] && wal -Rnq
|
||||||
|
|
||||||
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':' -)"
|
export PATH
|
||||||
if test -d $HOME/.local/share/cargo/bin; then
|
PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':' -)"
|
||||||
export PATH=$PATH:$HOME/.local/share/cargo/bin
|
|
||||||
|
if test -d "$HOME"/.local/share/cargo/bin; then
|
||||||
|
PATH="$PATH:$HOME/.local/share/cargo/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unsetopt PROMPT_SP
|
unsetopt PROMPT_SP
|
||||||
|
@ -34,14 +36,28 @@ export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zsh"
|
||||||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||||
export LESS=-R
|
export LESS=-R
|
||||||
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
||||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
|
||||||
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
|
|
||||||
export LESS_TERMCAP_me="$(printf '%b' '[0m')"
|
|
||||||
export LESS_TERMCAP_se="$(printf '%b' '[0m')"
|
|
||||||
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
|
|
||||||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
|
||||||
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
|
||||||
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
|
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
|
||||||
|
|
||||||
|
export LESS_TERMCAP_mb
|
||||||
|
LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
||||||
|
|
||||||
|
export LESS_TERMCAP_md
|
||||||
|
LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
|
||||||
|
|
||||||
|
export LESS_TERMCAP_me
|
||||||
|
LESS_TERMCAP_me="$(printf '%b' '[0m')"
|
||||||
|
|
||||||
|
export LESS_TERMCAP_se
|
||||||
|
LESS_TERMCAP_se="$(printf '%b' '[0m')"
|
||||||
|
|
||||||
|
export LESS_TERMCAP_so
|
||||||
|
LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
|
||||||
|
|
||||||
|
export LESS_TERMCAP_ue
|
||||||
|
LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
||||||
|
|
||||||
|
export LESS_TERMCAP_us
|
||||||
|
LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
||||||
|
|
||||||
# Multithreading
|
# Multithreading
|
||||||
export XZ_DEFAULTS="-T 0"
|
export XZ_DEFAULTS="-T 0"
|
||||||
|
|
|
@ -24,38 +24,38 @@ VI_MODE_SET_CURSOR=true
|
||||||
|
|
||||||
# /comfy/
|
# /comfy/
|
||||||
alias \
|
alias \
|
||||||
v="vim ." \
|
v="vim ." \
|
||||||
x="exit" \
|
x="exit" \
|
||||||
ka="killall" \
|
ka="killall" \
|
||||||
bb="byobu" \
|
bb="byobu" \
|
||||||
t="tree -L" \
|
t="tree -L" \
|
||||||
glow="clear && glow" \
|
glow="clear && glow" \
|
||||||
push="rsync -avzP" \
|
push="rsync -avzP" \
|
||||||
vs="source bin/activate" \
|
vs="source bin/activate" \
|
||||||
vd="deactivate" \
|
vd="deactivate" \
|
||||||
drm='docker rm -vf $(docker ps -aq)' \
|
drm='docker rm -vf $(docker ps -aq)' \
|
||||||
drmi='docker rmi -f $(docker images -aq)' \
|
drmi='docker rmi -f $(docker images -aq)' \
|
||||||
drmv='docker volume rm $(docker volume ls -q)' \
|
drmv='docker volume rm $(docker volume ls -q)' \
|
||||||
dicheck='rsync -havn . /dev/shm --exclude-from .dockerignore' \
|
dicheck='rsync -havn . /dev/shm --exclude-from .dockerignore' \
|
||||||
|
|
||||||
# Add verbosity
|
# Add verbosity
|
||||||
alias \
|
alias \
|
||||||
cp="cp -iv" \
|
cp="cp -iv" \
|
||||||
mv="mv -iv" \
|
mv="mv -iv" \
|
||||||
rm="rm -vI" \
|
rm="rm -vI" \
|
||||||
mkd="mkdir -pv" \
|
mkd="mkdir -pv" \
|
||||||
|
|
||||||
# Add color
|
# Add color
|
||||||
alias \
|
alias \
|
||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
diff="diff --color=auto" \
|
diff="diff --color=auto" \
|
||||||
ccat="highlight --out-format=ansi" \
|
ccat="highlight --out-format=ansi" \
|
||||||
|
|
||||||
|
|
||||||
ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
|
ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
|
||||||
if [[ ! -d $ZSH_CACHE_DIR ]]; then
|
if [[ ! -d $ZSH_CACHE_DIR ]]; then
|
||||||
mkdir $ZSH_CACHE_DIR
|
mkdir "$ZSH_CACHE_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source "$ZSH"/oh-my-zsh.sh
|
||||||
|
|
60
setup
60
setup
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -8,15 +8,17 @@ echo "Choose your adventure:
|
||||||
1. Shell/CLI stuff only
|
1. Shell/CLI stuff only
|
||||||
2. Above plus basic GUI
|
2. Above plus basic GUI
|
||||||
3. Above plus extras like steam, messengers (bloat)
|
3. Above plus extras like steam, messengers (bloat)
|
||||||
"
|
|
||||||
read -p "Enter number[1-3]: " input
|
Enter number[1-3]: "
|
||||||
|
|
||||||
|
read -r input
|
||||||
|
|
||||||
if ! [ "$input" -eq "$input" ] 2> /dev/null; then
|
if ! [ "$input" -eq "$input" ] 2> /dev/null; then
|
||||||
|
|
||||||
echo "Error: Not a number"
|
echo "Error: Not a number"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
elif [ $input -lt 1 ] || [ $input -gt 3 ]; then
|
elif [ "$input" -lt 1 ] || [ "$input" -gt 3 ]; then
|
||||||
|
|
||||||
echo "Error: Input out of range"
|
echo "Error: Input out of range"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -31,7 +33,7 @@ sudo echo ''
|
||||||
OS=$NAME
|
OS=$NAME
|
||||||
|
|
||||||
# Check for less and install if not found
|
# Check for less and install if not found
|
||||||
if ! type "less" &> /dev/null; then
|
if ! type "less" > /dev/null 2>&1; then
|
||||||
echo "less not found, installing..."
|
echo "less not found, installing..."
|
||||||
sudo pacman -S --noconfirm less # <<< should handle other distros here
|
sudo pacman -S --noconfirm less # <<< should handle other distros here
|
||||||
fi
|
fi
|
||||||
|
@ -49,27 +51,36 @@ echo ':::::::-. ... ... :::::::.. .::::::.
|
||||||
MMMMP"` "YMMMMMP" "YMMMMMP" MMMM "W" "YMmMY" '
|
MMMMP"` "YMMMMMP" "YMMMMMP" MMMM "W" "YMmMY" '
|
||||||
echo "Doors are sturdier than windows.
|
echo "Doors are sturdier than windows.
|
||||||
-------------------------------------------------------"
|
-------------------------------------------------------"
|
||||||
echo -e "\nSetup for $OS"
|
printf "\nSetup for %s\n" "$OS"
|
||||||
|
|
||||||
if [[ $OS == *Arch* ]]; then
|
case "$OS" in
|
||||||
|
*Arch*)
|
||||||
cd
|
cd
|
||||||
echo "Enabling Pacman colors..."
|
echo "Enabling Pacman colors..."
|
||||||
sudo sed '/Color/s/^#//' -i /etc/pacman.conf
|
sudo sed '/Color/s/^#//' -i /etc/pacman.conf
|
||||||
|
|
||||||
echo -e "\nVerifying base requirements..."
|
printf '\nVerifying base requirements...'
|
||||||
sudo pacman -S --needed --noconfirm git base-devel
|
sudo pacman -S --needed --noconfirm git base-devel
|
||||||
|
|
||||||
if test -d .doors; then
|
if test -d .doors; then
|
||||||
echo -e "\n$HOME/.doors found, checking for updates..."
|
printf '\n%s/.doors found, checking for updates...' "$HOME"
|
||||||
cd .doors
|
cd .doors
|
||||||
git pull
|
git pull
|
||||||
cd
|
cd
|
||||||
else
|
else
|
||||||
echo -e "\n$HOME/.doors not found, creating..."
|
printf '\n%s/.doors not found, creating...' "$HOME"
|
||||||
git clone https://github.com/adoyle0/Doors.git .doors
|
git clone https://github.com/adoyle0/Doors.git .doors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$HOME/.doors/scripts/install_arch $input
|
"$HOME"/.doors/scripts/install_arch "$input"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$OS is not supported by this script at this time."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Add "Arch ARM"
|
||||||
|
|
||||||
# These are broken for now
|
# These are broken for now
|
||||||
# elif [[ $OS == *buntu* ]]; then
|
# elif [[ $OS == *buntu* ]]; then
|
||||||
|
@ -84,34 +95,29 @@ if [[ $OS == *Arch* ]]; then
|
||||||
# git clone https://github.com/adoyle0/Doors.git .doors
|
# git clone https://github.com/adoyle0/Doors.git .doors
|
||||||
# $HOME/.doors/scripts/install_min_fedora
|
# $HOME/.doors/scripts/install_min_fedora
|
||||||
|
|
||||||
else
|
|
||||||
echo "$OS is not supported by this script at this time."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Init and update awesome widgets submodule
|
# Init and update awesome widgets submodule
|
||||||
cd $HOME/.doors &&
|
cd "$HOME"/.doors &&
|
||||||
git submodule init && git submodule update
|
git submodule init && git submodule update
|
||||||
|
|
||||||
# Copy and link files
|
# Copy and link files
|
||||||
cd $HOME/.doors &&
|
cd "$HOME"/.doors &&
|
||||||
$HOME/.doors/scripts/copy_and_link $input
|
"$HOME"/.doors/scripts/copy_and_link "$input"
|
||||||
|
|
||||||
# Copy default wallpaper
|
# Copy default wallpaper
|
||||||
if ! test -d $HOME/Pictures; then
|
if ! test -d "$HOME"/Pictures; then
|
||||||
mkdir $HOME/Pictures
|
mkdir "$HOME"/Pictures
|
||||||
if ! test -d $HOME/Pictures/Wallpapers; then
|
if ! test -d "$HOME"/Pictures/Wallpapers; then
|
||||||
mkdir $HOME/Pictures/Wallpapers
|
mkdir "$HOME"/Pictures/Wallpapers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! test -f $HOME/Pictures/Wallpapers/door2.jpg; then
|
if ! test -f "$HOME"/Pictures/Wallpapers/door2.jpg; then
|
||||||
curl -o $HOME/Pictures/Wallpapers/door2.jpg https://old.doordesk.net/door2.jpg
|
curl -o "$HOME"/Pictures/Wallpapers/door2.jpg https://old.doordesk.net/door2.jpg
|
||||||
$HOME/.local/bin/doorsbg
|
"$HOME"/.local/bin/doorsbg
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wrap up
|
# Wrap up
|
||||||
echo -e "\nDone!\nLog out and back in for changes to take effect."
|
printf "\nDone!\nLog out and back in for changes to take effect."
|
||||||
|
|
||||||
# Give less time to catch up and tell it we're done
|
# Give less time to catch up and tell it we're done
|
||||||
sleep 1 && killall -s SIGINT less
|
sleep 1 && killall -s SIGINT less
|
||||||
|
|
Loading…
Add table
Reference in a new issue