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`
|
||||
local cmp = require 'cmp'
|
||||
local luasnip = require 'luasnip'
|
||||
local lspkind = require('lspkind')
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
luasnip.config.setup {}
|
||||
|
||||
|
|
|
@ -61,4 +61,11 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||
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
|
||||
|
|
|
@ -26,7 +26,7 @@ require('lazy').setup({
|
|||
|
||||
-- Useful status updates for LSP
|
||||
-- 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!
|
||||
'folke/neodev.nvim',
|
||||
|
@ -51,7 +51,7 @@ require('lazy').setup({
|
|||
},
|
||||
|
||||
-- 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
|
||||
'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
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
|
@ -192,7 +228,7 @@ require('lazy').setup({
|
|||
build = ':TSUpdate',
|
||||
},
|
||||
|
||||
require 'kickstart.plugins.autoformat',
|
||||
-- require 'kickstart.plugins.autoformat',
|
||||
-- require 'kickstart.plugins.debug',
|
||||
-- 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
|
||||
-- define the property 'filetypes' to the map in question.
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- tsserver = {},
|
||||
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
||||
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
docker_compose_language_service = {},
|
||||
dockerls = {},
|
||||
gopls = {},
|
||||
html = {},
|
||||
jsonls = {},
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
|
@ -90,6 +90,14 @@ local servers = {
|
|||
-- diagnostics = { disable = { 'missing-fields' } },
|
||||
},
|
||||
},
|
||||
marksman = {},
|
||||
mutt_ls = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
tailwindcss = {},
|
||||
tsserver = {},
|
||||
yamlls = {},
|
||||
zls = {},
|
||||
}
|
||||
|
||||
-- Setup neovim lua configuration
|
||||
|
@ -104,6 +112,7 @@ local mason_lspconfig = require 'mason-lspconfig'
|
|||
|
||||
mason_lspconfig.setup {
|
||||
ensure_installed = vim.tbl_keys(servers),
|
||||
automatic_installation = true,
|
||||
}
|
||||
|
||||
mason_lspconfig.setup_handlers {
|
||||
|
|
|
@ -4,12 +4,17 @@
|
|||
vim.defer_fn(function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- 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!)
|
||||
auto_install = true,
|
||||
|
||||
highlight = { enable = true },
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# Keyboard lights
|
||||
[ -x "$(command -v g610-led)" ] && g610-led -a ff
|
||||
|
||||
# Colors
|
||||
[ -x "$(command -v wal)" ] && wal -R
|
||||
[ -x "$(command -v wal)" ] && wal -Rnq
|
||||
|
||||
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':' -)"
|
||||
if test -d $HOME/.local/share/cargo/bin; then
|
||||
export PATH=$PATH:$HOME/.local/share/cargo/bin
|
||||
export PATH
|
||||
PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':' -)"
|
||||
|
||||
if test -d "$HOME"/.local/share/cargo/bin; then
|
||||
PATH="$PATH:$HOME/.local/share/cargo/bin"
|
||||
fi
|
||||
|
||||
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 LESS=-R
|
||||
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 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
|
||||
export XZ_DEFAULTS="-T 0"
|
||||
|
|
|
@ -24,38 +24,38 @@ VI_MODE_SET_CURSOR=true
|
|||
|
||||
# /comfy/
|
||||
alias \
|
||||
v="vim ." \
|
||||
x="exit" \
|
||||
ka="killall" \
|
||||
bb="byobu" \
|
||||
t="tree -L" \
|
||||
glow="clear && glow" \
|
||||
push="rsync -avzP" \
|
||||
vs="source bin/activate" \
|
||||
vd="deactivate" \
|
||||
drm='docker rm -vf $(docker ps -aq)' \
|
||||
drmi='docker rmi -f $(docker images -aq)' \
|
||||
drmv='docker volume rm $(docker volume ls -q)' \
|
||||
dicheck='rsync -havn . /dev/shm --exclude-from .dockerignore' \
|
||||
v="vim ." \
|
||||
x="exit" \
|
||||
ka="killall" \
|
||||
bb="byobu" \
|
||||
t="tree -L" \
|
||||
glow="clear && glow" \
|
||||
push="rsync -avzP" \
|
||||
vs="source bin/activate" \
|
||||
vd="deactivate" \
|
||||
drm='docker rm -vf $(docker ps -aq)' \
|
||||
drmi='docker rmi -f $(docker images -aq)' \
|
||||
drmv='docker volume rm $(docker volume ls -q)' \
|
||||
dicheck='rsync -havn . /dev/shm --exclude-from .dockerignore' \
|
||||
|
||||
# Add verbosity
|
||||
# Add verbosity
|
||||
alias \
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -vI" \
|
||||
mkd="mkdir -pv" \
|
||||
cp="cp -iv" \
|
||||
mv="mv -iv" \
|
||||
rm="rm -vI" \
|
||||
mkd="mkdir -pv" \
|
||||
|
||||
# Add color
|
||||
# Add color
|
||||
alias \
|
||||
ls="ls -hN --color=auto --group-directories-first" \
|
||||
grep="grep --color=auto" \
|
||||
diff="diff --color=auto" \
|
||||
ccat="highlight --out-format=ansi" \
|
||||
ls="ls -hN --color=auto --group-directories-first" \
|
||||
grep="grep --color=auto" \
|
||||
diff="diff --color=auto" \
|
||||
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
|
||||
mkdir $ZSH_CACHE_DIR
|
||||
mkdir "$ZSH_CACHE_DIR"
|
||||
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
|
||||
|
||||
|
@ -8,15 +8,17 @@ echo "Choose your adventure:
|
|||
1. Shell/CLI stuff only
|
||||
2. Above plus basic GUI
|
||||
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
|
||||
|
||||
echo "Error: Not a number"
|
||||
exit 1
|
||||
|
||||
elif [ $input -lt 1 ] || [ $input -gt 3 ]; then
|
||||
elif [ "$input" -lt 1 ] || [ "$input" -gt 3 ]; then
|
||||
|
||||
echo "Error: Input out of range"
|
||||
exit 1
|
||||
|
@ -31,7 +33,7 @@ sudo echo ''
|
|||
OS=$NAME
|
||||
|
||||
# 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..."
|
||||
sudo pacman -S --noconfirm less # <<< should handle other distros here
|
||||
fi
|
||||
|
@ -49,27 +51,36 @@ echo ':::::::-. ... ... :::::::.. .::::::.
|
|||
MMMMP"` "YMMMMMP" "YMMMMMP" MMMM "W" "YMmMY" '
|
||||
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
|
||||
echo "Enabling Pacman colors..."
|
||||
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
|
||||
|
||||
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
|
||||
git pull
|
||||
cd
|
||||
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
|
||||
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
|
||||
# elif [[ $OS == *buntu* ]]; then
|
||||
|
@ -84,34 +95,29 @@ if [[ $OS == *Arch* ]]; then
|
|||
# git clone https://github.com/adoyle0/Doors.git .doors
|
||||
# $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
|
||||
cd $HOME/.doors &&
|
||||
cd "$HOME"/.doors &&
|
||||
git submodule init && git submodule update
|
||||
|
||||
# Copy and link files
|
||||
cd $HOME/.doors &&
|
||||
$HOME/.doors/scripts/copy_and_link $input
|
||||
cd "$HOME"/.doors &&
|
||||
"$HOME"/.doors/scripts/copy_and_link "$input"
|
||||
|
||||
# Copy default wallpaper
|
||||
if ! test -d $HOME/Pictures; then
|
||||
mkdir $HOME/Pictures
|
||||
if ! test -d $HOME/Pictures/Wallpapers; then
|
||||
mkdir $HOME/Pictures/Wallpapers
|
||||
if ! test -d "$HOME"/Pictures; then
|
||||
mkdir "$HOME"/Pictures
|
||||
if ! test -d "$HOME"/Pictures/Wallpapers; then
|
||||
mkdir "$HOME"/Pictures/Wallpapers
|
||||
fi
|
||||
|
||||
if ! test -f $HOME/Pictures/Wallpapers/door2.jpg; then
|
||||
curl -o $HOME/Pictures/Wallpapers/door2.jpg https://old.doordesk.net/door2.jpg
|
||||
$HOME/.local/bin/doorsbg
|
||||
if ! test -f "$HOME"/Pictures/Wallpapers/door2.jpg; then
|
||||
curl -o "$HOME"/Pictures/Wallpapers/door2.jpg https://old.doordesk.net/door2.jpg
|
||||
"$HOME"/.local/bin/doorsbg
|
||||
fi
|
||||
fi
|
||||
|
||||
# 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
|
||||
sleep 1 && killall -s SIGINT less
|
||||
|
|
Loading…
Add table
Reference in a new issue