mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-05 11:49:04 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e98f61942 | ||
|
|
e2583f4d91 | ||
| 80b2e542bf | |||
| 9c3ba8f2e8 | |||
| 632424ecf9 | |||
|
|
8c8436254e | ||
|
|
fe6f070beb |
@@ -68,9 +68,11 @@ alias code_scanner='docker run \
|
|||||||
alias composerUp='composer global update'
|
alias composerUp='composer global update'
|
||||||
alias npmUp='npm -g up'
|
alias npmUp='npm -g up'
|
||||||
|
|
||||||
alias zedit='code ~/.zshrc ~/.alias'
|
alias zedit='$EDITOR ~/.zshrc ~/.alias'
|
||||||
|
alias zdots='$EDITOR ~/.dotfiles'
|
||||||
|
|
||||||
if [[ -f "$HOME/.aliases.local" ]]; then
|
if [[ -f "$HOME/.aliases.local" ]]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source "$HOME/.aliases.local"
|
source "$HOME/.aliases.local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -95,8 +95,9 @@ vim.api.nvim_create_autocmd('BufWritePost', {
|
|||||||
-- Set highlight on search
|
-- Set highlight on search
|
||||||
vim.o.hlsearch = false
|
vim.o.hlsearch = false
|
||||||
|
|
||||||
-- Make line numbers default
|
-- Make line numbers default, enabled relative linenumbers
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode
|
-- Enable mouse mode
|
||||||
vim.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
@@ -117,7 +118,7 @@ vim.wo.signcolumn = 'yes'
|
|||||||
|
|
||||||
-- Set colorscheme
|
-- Set colorscheme
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
vim.cmd.colorscheme('palenight')
|
-- vim.cmd.colorscheme('palenight')
|
||||||
|
|
||||||
-- Set completeopt to have a better completion experience
|
-- Set completeopt to have a better completion experience
|
||||||
vim.o.completeopt = 'menuone,noselect'
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
@@ -150,10 +151,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||||||
-- See `:help lualine.txt`
|
-- See `:help lualine.txt`
|
||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = false,
|
icons_enabled = true,
|
||||||
theme = 'onedark',
|
theme = 'auto',
|
||||||
component_separators = '|',
|
component_separators = '|',
|
||||||
section_separators = '',
|
section_separators = '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,8 +197,12 @@ require('telescope').setup {
|
|||||||
pcall(require('telescope').load_extension, 'fzf')
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, {
|
||||||
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
desc = '[?] Find recently opened files'
|
||||||
|
})
|
||||||
|
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, {
|
||||||
|
desc = '[ ] Find existing buffers'
|
||||||
|
})
|
||||||
vim.keymap.set('n', '<leader>/', function()
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||||
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||||
@@ -335,7 +340,14 @@ require('mason').setup()
|
|||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed
|
||||||
local servers = { 'clangd', 'rust_analyzer', 'pyright', 'tsserver', 'sumneko_lua', 'gopls' }
|
local servers = {
|
||||||
|
'clangd',
|
||||||
|
'rust_analyzer',
|
||||||
|
'pyright',
|
||||||
|
'tsserver',
|
||||||
|
'sumneko_lua',
|
||||||
|
'gopls'
|
||||||
|
}
|
||||||
|
|
||||||
-- Ensure the servers above are installed
|
-- Ensure the servers above are installed
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
|
|||||||
13
config/nvim/lua/custom/plugins.lua
Normal file
13
config/nvim/lua/custom/plugins.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return function(use)
|
||||||
|
use({
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
config = function()
|
||||||
|
require("which-key").setup({})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- catppuccin theme
|
||||||
|
use { "catppuccin/nvim", as = "catppuccin" }
|
||||||
|
vim.cmd.colorscheme('catppuccin-latte')
|
||||||
|
end
|
||||||
|
|
||||||
@@ -84,6 +84,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||||
},
|
},
|
||||||
|
catppuccin = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/catppuccin",
|
||||||
|
url = "https://github.com/catppuccin/nvim"
|
||||||
|
},
|
||||||
["cmp-nvim-lsp"] = {
|
["cmp-nvim-lsp"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
@@ -188,10 +193,20 @@ _G.packer_plugins = {
|
|||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/vim-sleuth",
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/vim-sleuth",
|
||||||
url = "https://github.com/tpope/vim-sleuth"
|
url = "https://github.com/tpope/vim-sleuth"
|
||||||
|
},
|
||||||
|
["which-key.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0" },
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
||||||
|
url = "https://github.com/folke/which-key.nvim"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
|
-- Config for: which-key.nvim
|
||||||
|
time([[Config for which-key.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0", "config", "which-key.nvim")
|
||||||
|
time([[Config for which-key.nvim]], false)
|
||||||
-- Conditional loads
|
-- Conditional loads
|
||||||
time([[Conditional loading of telescope-fzf-native.nvim]], true)
|
time([[Conditional loading of telescope-fzf-native.nvim]], true)
|
||||||
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins)
|
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function section_install
|
|||||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 Done!"
|
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
brew)
|
brew)
|
||||||
brew bundle install --file="$BREWFILE" && echo "🎉 Done!"
|
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
macos)
|
macos)
|
||||||
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Done!"
|
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Done!"
|
||||||
@@ -70,7 +70,7 @@ function section_brew
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install)
|
install)
|
||||||
brew bundle install --file="$BREWFILE" && echo "🎉 Done!"
|
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
brew update && brew outdated && brew upgrade && brew cleanup
|
brew update && brew outdated && brew upgrade && brew cleanup
|
||||||
@@ -81,7 +81,7 @@ function section_brew
|
|||||||
brew bundle dump \
|
brew bundle dump \
|
||||||
--force \
|
--force \
|
||||||
--file="$BREWFILE" \
|
--file="$BREWFILE" \
|
||||||
--describe && msg_ok "🎉 Done!"
|
--describe && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
autoupdate)
|
autoupdate)
|
||||||
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
brew autoupdate start 43200 --upgrade --cleanup --immediate
|
||||||
@@ -102,7 +102,7 @@ function section_dotfiles
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
link)
|
link)
|
||||||
rcup -B "$HOSTNAME" -f -v && echo "🎉 Done!"
|
rcup -B "$HOSTNAME" -f -v && msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
# Updates .dotfiles/scripts/install.sh and formats it
|
# Updates .dotfiles/scripts/install.sh and formats it
|
||||||
@@ -111,7 +111,7 @@ function section_dotfiles
|
|||||||
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT" \
|
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT" \
|
||||||
&& sed -i '' "s|install.sh|$(basename $INSTALL_SCRIPT)|g" "$INSTALL_SCRIPT"
|
&& sed -i '' "s|install.sh|$(basename $INSTALL_SCRIPT)|g" "$INSTALL_SCRIPT"
|
||||||
$0 dotfiles shfmt
|
$0 dotfiles shfmt
|
||||||
echo "🎉 Done!"
|
msg_done "🎉 Done!"
|
||||||
;;
|
;;
|
||||||
shfmt)
|
shfmt)
|
||||||
# Format shell scripts according to following rules.
|
# Format shell scripts according to following rules.
|
||||||
@@ -121,7 +121,6 @@ function section_dotfiles
|
|||||||
--write \
|
--write \
|
||||||
--diff \
|
--diff \
|
||||||
--simplify \
|
--simplify \
|
||||||
--language-dialect bash \
|
|
||||||
--indent 2 \
|
--indent 2 \
|
||||||
--binary-next-line \
|
--binary-next-line \
|
||||||
--case-indent \
|
--case-indent \
|
||||||
|
|||||||
@@ -75,7 +75,9 @@ handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
|||||||
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/after/plugin/defaults.lua" "$HOME/.config/nvim/after/plugin/defaults.lua"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
||||||
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/custom/plugins.lua" "$HOME/.config/nvim/lua/custom/plugins.lua"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/plugin/packer_compiled.lua" "$HOME/.config/nvim/plugin/packer_compiled.lua"
|
handle_file_ln "$HOME/.dotfiles/config/nvim/plugin/packer_compiled.lua" "$HOME/.config/nvim/plugin/packer_compiled.lua"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/tmux/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
handle_file_ln "$HOME/.dotfiles/config/tmux/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
Host *
|
|
||||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
|
||||||
|
|
||||||
Host github.com
|
Host github.com
|
||||||
|
User git
|
||||||
HostName github.com
|
HostName github.com
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
@@ -13,3 +11,6 @@ Host gitlab.com
|
|||||||
Hostname gitlab.com
|
Hostname gitlab.com
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
Host *
|
||||||
|
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||||
|
|
||||||
|
|||||||
3
vuerc
3
vuerc
@@ -20,4 +20,5 @@
|
|||||||
"cssPreprocessor": "dart-sass"
|
"cssPreprocessor": "dart-sass"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
zshrc
10
zshrc
@@ -5,7 +5,7 @@
|
|||||||
autoload -U colors zsh/terminfo
|
autoload -U colors zsh/terminfo
|
||||||
colors
|
colors
|
||||||
|
|
||||||
export PATH="/opt/homebrew/bin:/usr/local/sbin:$PATH"
|
export PATH="/opt/homebrew/opt/ruby/bin:/opt/homebrew/bin:/usr/local/sbin:$PATH"
|
||||||
|
|
||||||
if [ command -v brew &> /dev/null ]; then
|
if [ command -v brew &> /dev/null ]; then
|
||||||
BREW_BIN=$(brew --prefix)/bin
|
BREW_BIN=$(brew --prefix)/bin
|
||||||
@@ -27,6 +27,10 @@ if command -v go &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if command -v nvim &> /dev/null; then
|
||||||
|
export EDITOR="nvim"
|
||||||
|
fi
|
||||||
|
|
||||||
LOCAL_BIN="$HOME/.local/bin"
|
LOCAL_BIN="$HOME/.local/bin"
|
||||||
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
||||||
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"
|
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"
|
||||||
@@ -68,13 +72,13 @@ if command -v antigen &> /dev/null; then
|
|||||||
antigen bundle zsh-users/zsh-completions
|
antigen bundle zsh-users/zsh-completions
|
||||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||||
|
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||||
# antigen bundle git-auto-fetch
|
# antigen bundle git-auto-fetch
|
||||||
|
|
||||||
hash php 2>/dev/null && antigen bundle php
|
hash php 2>/dev/null && antigen bundle php
|
||||||
hash nvm 2>/dev/null && antigen bundle nvm
|
hash nvm 2>/dev/null && antigen bundle nvm
|
||||||
hash docker 2>/dev/null && antigen bundle docker
|
hash docker 2>/dev/null && antigen bundle docker
|
||||||
|
hash ruby 2>/dev/null && antigen bundle ruby
|
||||||
hash nvm 2>/dev/null && antigen bundle Sparragus/zsh-auto-nvm-use
|
|
||||||
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||||
|
|||||||
Reference in New Issue
Block a user