Compare commits
6 Commits
785e1e57e8
...
b3031571c6
Author | SHA1 | Date |
---|---|---|
Ensar Sarajčić | b3031571c6 | |
Ensar Sarajčić | 0397f22418 | |
Ensar Sarajčić | 0b0f0d4731 | |
Ensar Sarajčić | c7a43c8a74 | |
Ensar Sarajčić | 85964e068f | |
Ensar Sarajčić | 566b391dcc |
47
Makefile
47
Makefile
|
@ -117,7 +117,7 @@ bootstrap_mac: check_os link bootstrap_common oh_my_zsh homebrew install_brew_ba
|
|||
@echo "Bootstrapped mac components!"
|
||||
|
||||
.PHONY: bootstrap_common
|
||||
bootstrap_common: check_os link_all_common prepare_projects_dir prepare_screenshots_dir prepare_scripts_cache_dir install_vim install_asdf alacritty_terminfo
|
||||
bootstrap_common: check_os link_all_common prepare_projects_dir prepare_screenshots_dir prepare_scripts_cache_dir install_vim install_mise alacritty_terminfo
|
||||
@echo "Bootstrapped common components!"
|
||||
|
||||
.PHONY: link
|
||||
|
@ -183,9 +183,9 @@ link_script_utils: check_os
|
|||
|
||||
.PHONY: link_tool_versions
|
||||
link_tool_versions: check_os
|
||||
@echo "Linking tool-versions file for asdf"
|
||||
@echo "Linking tool-versions file for mise"
|
||||
$(call link,tool-versions,.tool-versions)
|
||||
$(call link,config/asdf/.default-gems,.default-gems)
|
||||
$(call link,config/mise/.default-gems,.default-gems)
|
||||
|
||||
.PHONY: link_profile
|
||||
link_profile: check_os
|
||||
|
@ -286,42 +286,13 @@ install_brew_basics: homebrew check_os
|
|||
@echo "Installig basic brew packages..."
|
||||
@brew bundle --file $(DOTFILES_DIR)/installed_packages/core/Brewfile
|
||||
|
||||
.PHONY: install_asdf
|
||||
install_asdf: check_os
|
||||
@echo "Installing ASDF VM..."
|
||||
@git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0
|
||||
@echo "Installed ASDF Version 0.10.0"
|
||||
@echo "To install latest version:"
|
||||
@echo ""
|
||||
@echo "cd ~/.asdf"
|
||||
@echo "git fetch"
|
||||
@echo "git checkout \"$$\(git describe --abbrev=0 --tags\)\""
|
||||
@echo ""
|
||||
@echo "Consider installing configured ASDF tools:"
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Run in home directory:"
|
||||
@echo "asdf install"
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Consider installing ASDF plugins:"
|
||||
@echo "=================================="
|
||||
@echo "DIRENV:"
|
||||
@echo "----------------------------------"
|
||||
@echo "asdf plugin-add direnv"
|
||||
@echo "asdf install direnv latest"
|
||||
@echo ""
|
||||
@echo "Check out installed version using: "
|
||||
@echo "asdf list direnv"
|
||||
@echo ""
|
||||
@echo "Configure it as global using: "
|
||||
@echo "asdf global direnv $$version"
|
||||
@echo ""
|
||||
@echo "Configure it with provided function:"
|
||||
@echo "asdf direnv setup --shell fish --version latest"
|
||||
@echo ""
|
||||
.PHONY: install_mise
|
||||
install_mise: check_os
|
||||
@echo "Installing mise..."
|
||||
@curl https://mise.run | sh
|
||||
@mise direnv activate > ~/.config/direnv/lib/use_mise.sh
|
||||
@echo "When using in projects, put the following in .envrc: "
|
||||
@echo "use asdf"
|
||||
@echo "use mise"
|
||||
@echo "=================================="
|
||||
@echo ""
|
||||
|
||||
|
|
|
@ -117,6 +117,4 @@ if ! shopt -oq posix; then
|
|||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
. $HOME/.asdf/asdf.sh
|
||||
. $HOME/.asdf/completions/asdf.bash
|
||||
. "$HOME/.cargo/env"
|
||||
|
|
|
@ -18,8 +18,8 @@ if test -S $SERVER_NAME; then
|
|||
/usr/bin/wmctrl -a "$WINDOW_NAME"
|
||||
fi
|
||||
fi
|
||||
~/.asdf/shims/nvim --server $SERVER_NAME --remote $2
|
||||
~/.asdf/shims/nvim --server $SERVER_NAME --remote-send ":call cursor($LINE, $COLUMN)<CR>"
|
||||
~/.local/share/mise/shims/nvim --server $SERVER_NAME --remote $2
|
||||
~/.local/share/mise/shims/nvim --server $SERVER_NAME --remote-send ":call cursor($LINE, $COLUMN)<CR>"
|
||||
else
|
||||
/usr/bin/alacritty --title "$WINDOW_NAME" -e /usr/bin/fish -c "nvim --listen $SERVER_NAME $2 --cmd \"call cursor($LINE, $COLUMN)\""
|
||||
fi
|
||||
|
|
|
@ -71,23 +71,9 @@ then
|
|||
command vim +PlugUpdate +qall
|
||||
fi
|
||||
|
||||
if [ "${RUN[asdf]}" = "1" ]
|
||||
if [ "${RUN[mise]}" = "1" ]
|
||||
then
|
||||
asdf update
|
||||
asdf plugin-update --all
|
||||
|
||||
echo "========== ASDF UPDATES =========="
|
||||
echo "Available updates: "
|
||||
while IFS= read -r PKG; do
|
||||
if [ $(echo "$PKG" | cut -f3) = "missing" ]; then
|
||||
PKG_NAME=$(echo $PKG | cut -f1 -d " ")
|
||||
if [ "$PKG_NAME" != "java" -a "$PKG_NAME" != "ruby" ]; then
|
||||
PKG_VER=$(echo $PKG | cut -f2 -d " ")
|
||||
echo " $PKG_NAME - $PKG_VER (install with 'asdf install $PKG_NAME $PKG_VER' and set as global default with 'asdf global $PKG_NAME $PKG_VER')"
|
||||
fi
|
||||
fi
|
||||
done <<< "$(asdf latest --all)"
|
||||
echo "========== ASDF UPDATES =========="
|
||||
mise self-update
|
||||
fi
|
||||
|
||||
if [ "${RUN[brew]}" = "1" ]
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
[general]
|
||||
import = ["~/.config/alacritty/font.toml", "~/.config/alacritty/colors.toml", "~/.config/alacritty/keymap.toml"]
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# if "usage" is not installed show an error
|
||||
if ! command -v usage &> /dev/null
|
||||
echo >&2
|
||||
echo "Error: usage CLI not found. This is required for completions to work in mise." >&2
|
||||
echo "See https://usage.jdx.dev for more information." >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
if ! set -q _usage_spec_mise_2024_11_13
|
||||
set -g _usage_spec_mise_2024_11_13 (mise usage | string collect)
|
||||
end
|
||||
complete -xc mise -a '(usage complete-word --shell fish -s "$_usage_spec_mise_2024_11_13" -- (commandline -cop) (commandline -t))'
|
|
@ -0,0 +1 @@
|
|||
source "$HOME/.cargo/env.fish"
|
|
@ -2,7 +2,7 @@ fenv source ~/.profile
|
|||
|
||||
set -g fish_prompt_pwd_dir_length 0
|
||||
set -gx PROJECT_PATHS ~/Projects/*/* ~/Projects/Personal/Mixed\ Technology/Practice
|
||||
set -gx ASDF_PYTHON_DEFAULT_PACKAGES_FILE ~/.config/asdf/.python-default-packages
|
||||
set -gx MISE_PYTHON_DEFAULT_PACKAGES_FILE ~/.config/asdf/.python-default-packages
|
||||
set -gx FZF_DEFAULT_COMMAND 'rg --files'
|
||||
|
||||
if which termux-info &> /dev/null
|
||||
|
@ -29,27 +29,8 @@ abbr -a gcm "git checkout (__git.default_branch)"
|
|||
|
||||
source ~/.config/fish/platform_config/$MACHINE_TYPE.fish
|
||||
|
||||
if [ -f /opt/asdf-vm/asdf.sh ]
|
||||
set -gx ASDF_DIR /opt/asdf-vm
|
||||
set -gx ASDF_CONFIG_FILE $XDG_CONFIG_HOME/asdf/asdfrc
|
||||
set -gx ASDF_DATA_DIR $XDG_DATA_HOME/asdf
|
||||
source $ASDF_DIR/asdf.sh
|
||||
if status is-interactive
|
||||
mise activate fish | source
|
||||
else
|
||||
source ~/.asdf/asdf.fish
|
||||
if [ -f ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish ]
|
||||
. ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish
|
||||
end
|
||||
end
|
||||
|
||||
eval (asdf exec direnv hook fish | source)
|
||||
|
||||
function direnv
|
||||
asdf exec direnv "$argv"
|
||||
end
|
||||
|
||||
function asdfexec
|
||||
begin
|
||||
asdf shell $argv[1] $argv[2]
|
||||
$argv[3..]
|
||||
end
|
||||
mise activate fish --shims | source
|
||||
end
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
" Explicit declaration of python host program to "prevent suprises"
|
||||
" -----------------------------------------------------------------------------
|
||||
if !has('win32')
|
||||
let g:python_host_prog = $HOME.'/.asdf/shims/python2'
|
||||
let g:python3_host_prog = $HOME.'/.asdf/shims/python3'
|
||||
let g:python_host_prog = $HOME.'/.local/share/mise/shims/python2'
|
||||
let g:python3_host_prog = $HOME.'/.local/share/mise/shims/python3'
|
||||
else
|
||||
let g:python_host_prog = $HOME.'/scoop/shims/python2'
|
||||
let g:python3_host_prog = $HOME.'/scoop/shims/python3'
|
||||
|
|
|
@ -45,6 +45,7 @@ return require("lazy").setup({
|
|||
"nvim-neotest/nvim-nio",
|
||||
"nvim-neotest/neotest-plenary",
|
||||
"rouge8/neotest-rust",
|
||||
"saecki/crates.nvim",
|
||||
"nvim-neotest/neotest-vim-test", -- vim-test plugin for neotest
|
||||
"vim-test/vim-test", -- Running tests from vim
|
||||
"mfussenegger/nvim-dap", -- Debug Adapter Protocol
|
||||
|
|
|
@ -82,7 +82,7 @@ end
|
|||
-- Flutter tools
|
||||
require("flutter-tools").setup({
|
||||
lsp = common_config,
|
||||
flutter_lookup_cmd = "asdf where flutter",
|
||||
flutter_lookup_cmd = "mise where flutter",
|
||||
})
|
||||
|
||||
-- Rust tools
|
||||
|
@ -111,3 +111,15 @@ vim.g.rustaceanvim = {
|
|||
},
|
||||
}),
|
||||
}
|
||||
|
||||
require("crates").setup({
|
||||
lsp = {
|
||||
enabled = true,
|
||||
on_attach = function(client, bufnr)
|
||||
common_config.on_attach(client, bufnr)
|
||||
end,
|
||||
actions = true,
|
||||
completion = true,
|
||||
hover = true,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" - Neovim ruby host -
|
||||
" -----------------------------------------------------------------------------
|
||||
if !has('win32')
|
||||
let g:ruby_host_prog = '~/.asdf/shims/ruby'
|
||||
let g:ruby_host_prog = '~/.local/share/mise/shims/ruby'
|
||||
else
|
||||
let g:ruby_host_prog = '~/scoop/shims/ruby'
|
||||
endif
|
||||
|
|
|
@ -38,3 +38,5 @@ connect = ["127.0.0.1", 27631] # same as `listen`
|
|||
# is documented in the `env_logger` documentation here:
|
||||
# <https://docs.rs/env_logger/0.9.0/env_logger/index.html#enabling-logging>
|
||||
log_filters = "info"
|
||||
|
||||
pass_environment = ["PATH"]
|
||||
|
|
|
@ -4,7 +4,7 @@ bindsym $alt+L exec 'swaylock'
|
|||
# IDLE CONFIG
|
||||
exec swayidle -w \
|
||||
timeout 300 'swaylock' \
|
||||
timeout 330 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
timeout 330 'swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' \
|
||||
timeout 600 'systemctl suspend' \
|
||||
before-sleep 'swaylock; playerctl pause'
|
||||
|
|
|
@ -3,7 +3,7 @@ input type:pointer {
|
|||
}
|
||||
|
||||
input type:tablet_tool {
|
||||
map_to_output HDMI-A-1
|
||||
map_to_output DP-1
|
||||
map_from_region 0.0x0.0 1.0x0.9
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Rust analyzer multiplex server
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=%h/.asdf/shims/ra-multiplex server
|
||||
ExecStart=%h/.cargo/bin/ra-multiplex server
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
|
|
@ -57,6 +57,7 @@ tags
|
|||
|
||||
# ASDF
|
||||
.tool-versions
|
||||
mise.local.toml
|
||||
|
||||
# Idea
|
||||
.idea
|
||||
|
|
|
@ -40,3 +40,5 @@ export ANDROID_HOME="$HOME/Android/Sdk"
|
|||
|
||||
alias vim="nvim"
|
||||
alias vi="nvim"
|
||||
|
||||
source "$HOME/.cargo/env"
|
||||
|
|
|
@ -21,7 +21,7 @@ done
|
|||
|
||||
declare -A RUN=()
|
||||
|
||||
for command in "pacman" "apt" "dnf" "flatpak" "gem" "nvim" "asdf" "brew" "pacman" "pip" "pip2" "pip3";
|
||||
for command in "pacman" "apt" "dnf" "flatpak" "gem" "nvim" "mise" "brew" "pacman" "pip" "pip2" "pip3";
|
||||
do
|
||||
if type $command > /dev/null 2>&1
|
||||
then
|
||||
|
|
|
@ -46,7 +46,7 @@ ZSH_THEME="agnoster"
|
|||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git mix asdf)
|
||||
plugins=(git mix)
|
||||
|
||||
# User configuration
|
||||
|
||||
|
|
|
@ -35,8 +35,6 @@ if [ -f "$HOME/.zshrc.local" ]; then
|
|||
source $HOME/.zshrc.local
|
||||
fi
|
||||
|
||||
source /usr/local/opt/asdf/asdf.sh
|
||||
|
||||
# Print update date
|
||||
print-last-brew-update
|
||||
|
||||
|
|
Loading…
Reference in New Issue