Compare commits

..

3 Commits

Author SHA1 Message Date
632424ecf9 Update nvim plugins 2022-12-23 21:52:09 +02:00
Ismo Vuorinen
8c8436254e Change $EDITOR to nvim 2022-12-23 21:45:53 +02:00
Ismo Vuorinen
fe6f070beb -m Tweaks 2022-12-23 13:30:52 +02:00
7 changed files with 41 additions and 10 deletions

View File

@@ -68,9 +68,10 @@ alias code_scanner='docker run \
alias composerUp='composer global update'
alias npmUp='npm -g up'
alias zedit='code ~/.zshrc ~/.alias'
alias zedit='$EDITOR ~/.zshrc ~/.alias'
if [[ -f "$HOME/.aliases.local" ]]; then
# shellcheck disable=SC1091
source "$HOME/.aliases.local"
fi

View File

@@ -57,6 +57,17 @@ require('packer').startup(function(use)
-- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', cond = vim.fn.executable 'make' == 1 }
use {
"folke/which-key.nvim",
config = function()
require("which-key").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}
-- Add custom plugins to packer from ~/.config/nvim/lua/custom/plugins.lua
local has_plugins, plugins = pcall(require, 'custom.plugins')
if has_plugins then
@@ -196,8 +207,12 @@ require('telescope').setup {
pcall(require('telescope').load_extension, 'fzf')
-- See `:help telescope.builtin`
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, {
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()
-- You can pass additional configuration to telescope to change theme, layout, etc.
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {

View File

@@ -188,10 +188,20 @@ _G.packer_plugins = {
loaded = true,
path = "/Users/ivuorinen/.local/share/nvim/site/pack/packer/start/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)
-- 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
time([[Conditional loading of telescope-fzf-native.nvim]], true)
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins)

View File

@@ -32,7 +32,7 @@ function section_install
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 Done!"
;;
brew)
brew bundle install --file="$BREWFILE" && echo "🎉 Done!"
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
;;
macos)
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Done!"
@@ -70,7 +70,7 @@ function section_brew
case "$1" in
install)
brew bundle install --file="$BREWFILE" && echo "🎉 Done!"
brew bundle install --file="$BREWFILE" && msg_done "🎉 Done!"
;;
update)
brew update && brew outdated && brew upgrade && brew cleanup
@@ -81,7 +81,7 @@ function section_brew
brew bundle dump \
--force \
--file="$BREWFILE" \
--describe && msg_ok "🎉 Done!"
--describe && msg_done "🎉 Done!"
;;
autoupdate)
brew autoupdate start 43200 --upgrade --cleanup --immediate
@@ -102,7 +102,7 @@ function section_dotfiles
case "$1" in
link)
rcup -B "$HOSTNAME" -f -v && echo "🎉 Done!"
rcup -B "$HOSTNAME" -f -v && msg_done "🎉 Done!"
;;
update)
# 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|install.sh|$(basename $INSTALL_SCRIPT)|g" "$INSTALL_SCRIPT"
$0 dotfiles shfmt
echo "🎉 Done!"
msg_done "🎉 Done!"
;;
shfmt)
# Format shell scripts according to following rules.
@@ -121,7 +121,6 @@ function section_dotfiles
--write \
--diff \
--simplify \
--language-dialect bash \
--indent 2 \
--binary-next-line \
--case-indent \

View File

@@ -2,6 +2,7 @@ Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
Host github.com
User git
HostName github.com
IdentityFile ~/.ssh/id_rsa

3
vuerc
View File

@@ -20,4 +20,5 @@
"cssPreprocessor": "dart-sass"
}
}
}
}

4
zshrc
View File

@@ -27,6 +27,10 @@ if command -v go &> /dev/null; then
fi
fi
if command -v nvim &> /dev/null; then
export EDITOR="nvim"
fi
LOCAL_BIN="$HOME/.local/bin"
COMPOSER_DIR="$HOME/.composer/vendor/bin"
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"