Fish/nvim config
This commit is contained in:
2
Makefile
2
Makefile
@@ -5,9 +5,11 @@ SHELL := /bin/bash
|
|||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
# Install dotfiles
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
# Remove all temporary files and artefacts
|
||||||
rm -rf .dotlock tmp
|
rm -rf .dotlock tmp
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
|||||||
@@ -79,6 +79,5 @@ if ! shopt -oq posix; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export NVM_DIR="$HOME/.config/nvm"
|
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
if [ -z "$PROFILE_LOCK" ]; then
|
if [ -z "$PROFILE_LOCK" ]; then
|
||||||
echo "acquiring profile lock"
|
|
||||||
export PROFILE_LOCK=1
|
export PROFILE_LOCK=1
|
||||||
|
|
||||||
# set PATH so it includes user's private bin if it exists
|
# set PATH so it includes user's private bin if it exists
|
||||||
@@ -53,10 +52,4 @@ if [ -z "$PROFILE_LOCK" ]; then
|
|||||||
export PATH="$YARN_DIR/bin:$PATH"
|
export PATH="$YARN_DIR/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if ! [ -x "$(command -v yarn)" ]; then
|
|
||||||
# export PATH="$YARN_DIR/bin:$PATH"
|
|
||||||
# else
|
|
||||||
# export PATH="$(yarn global bin):$PATH"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,37 +1,12 @@
|
|||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
# Cross-shell
|
# Cross-shell (only import if environment has been setup)
|
||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
if test -e ~/.profile
|
||||||
# # config
|
bass source ~/.profile
|
||||||
# set XDG_CONFIG_HOME $HOME/.config
|
bass source "$NVM_DIR/nvm.sh" --no-use ';' nvm use iojs
|
||||||
|
end
|
||||||
# # workspace
|
|
||||||
# set WORKSPACE $HOME/workspace
|
|
||||||
|
|
||||||
# # .local
|
|
||||||
# set -x PATH $HOME/.local/bin $PATH
|
|
||||||
|
|
||||||
# # pyenv
|
|
||||||
# set PYENV_ROOT $HOME/.pyenv
|
|
||||||
# set -x PATH $PYENV_ROOT/bin $PATH
|
|
||||||
# set -x PATH $PYENV_ROOT/shims $PATH
|
|
||||||
# type -q pyenv && pyenv init - | source
|
|
||||||
|
|
||||||
# # poetry
|
|
||||||
# set POETRY_ROOT $HOME/.poetry
|
|
||||||
# set -x PATH $POETRY_ROOT/bin $PATH
|
|
||||||
|
|
||||||
# # nvm
|
|
||||||
# set NVM_ROOT $HOME/.nvm
|
|
||||||
# set -x PATH $NVM_ROOT/bin $PATH
|
|
||||||
|
|
||||||
# # yarn
|
|
||||||
# set YARN_DIR $HOME/.yarn
|
|
||||||
# set -x PATH $YARN_DIR/bin $PATH
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
# Fish specific
|
# Fish specific
|
||||||
# ---------------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------------- #
|
||||||
|
|
||||||
# Wipe greeting
|
|
||||||
set fish_greeting
|
set fish_greeting
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
rafaelrinaldi/pure
|
rafaelrinaldi/pure
|
||||||
jorgebucaran/fish-nvm
|
edc/bass
|
||||||
|
|||||||
@@ -5,4 +5,6 @@ bash_target="$HOME"
|
|||||||
link_folder "$bash_source" "$bash_target"
|
link_folder "$bash_source" "$bash_target"
|
||||||
echo "bash dotfiles are linked"
|
echo "bash dotfiles are linked"
|
||||||
|
|
||||||
|
sudo chmod -R 0644 /etc/update-motd.d/
|
||||||
|
|
||||||
bash --version
|
bash --version
|
||||||
|
|||||||
@@ -9,15 +9,6 @@ if not_installed "fish"; then
|
|||||||
fi
|
fi
|
||||||
echo "fish is installed"
|
echo "fish is installed"
|
||||||
|
|
||||||
# current_shell="$(getent passwd $USER | cut -d: -f7)"
|
|
||||||
# fish_path="$(which fish)"
|
|
||||||
# if [ "$current_shell" != "$fish_path" ]; then
|
|
||||||
# echo "setting fish as default, current shell was $current_shell"
|
|
||||||
# sudo chsh -s "$fish_path" "$USER"
|
|
||||||
# sudo usermod -s "$fish_path" "$USER"
|
|
||||||
# fi
|
|
||||||
# echo "fish is default login shell"
|
|
||||||
|
|
||||||
fish_source="$dotfiles_dir/fish"
|
fish_source="$dotfiles_dir/fish"
|
||||||
fish_target="$XDG_CONFIG_HOME/fish"
|
fish_target="$XDG_CONFIG_HOME/fish"
|
||||||
link_folder "$fish_source" "$fish_target"
|
link_folder "$fish_source" "$fish_target"
|
||||||
@@ -31,7 +22,7 @@ if ! [ -f "$fisher_location" ]; then
|
|||||||
curl https://git.io/fisher --create-dirs -sLo "$fisher_location"
|
curl https://git.io/fisher --create-dirs -sLo "$fisher_location"
|
||||||
fi
|
fi
|
||||||
echo "fisher is installed, updating..."
|
echo "fisher is installed, updating..."
|
||||||
fish -c "fisher"
|
sh -c 'env HOME=$(mktemp -d) fish -c "fisher"'
|
||||||
|
|
||||||
fish -c "fisher --version"
|
fish -c "fisher --version"
|
||||||
|
|
||||||
|
|||||||
13
install/05-vim.sh
Executable file
13
install/05-vim.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
vim_source="$dotfiles_dir/vim"
|
||||||
|
vim_target="$XDG_CONFIG_HOME/nvim"
|
||||||
|
link_folder "$vim_source" "$vim_target"
|
||||||
|
echo "vim dotfiles are linked"
|
||||||
|
|
||||||
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
nvim -E PlugInstall -c q
|
||||||
|
|
||||||
|
nvim --version
|
||||||
|
|
||||||
@@ -9,6 +9,8 @@ if not_installed "nvm"; then
|
|||||||
run "https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh" \
|
run "https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh" \
|
||||||
"bash"
|
"bash"
|
||||||
source "$NVM_DIR/nvm.sh"
|
source "$NVM_DIR/nvm.sh"
|
||||||
|
nvm alias default lts
|
||||||
|
nvm default
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
37
vim/init.vim
Normal file
37
vim/init.vim
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
set termguicolors
|
||||||
|
|
||||||
|
call plug#begin()
|
||||||
|
|
||||||
|
Plug 'tpope/vim-sensible'
|
||||||
|
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
Plug 'APZelos/blamer.nvim'
|
||||||
|
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
|
||||||
|
if has('nvim')
|
||||||
|
Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||||
|
else
|
||||||
|
Plug 'Shougo/denite.nvim'
|
||||||
|
Plug 'roxma/nvim-yarp'
|
||||||
|
Plug 'roxma/vim-hug-neovim-rpc'
|
||||||
|
endif
|
||||||
|
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
" Define mappings
|
||||||
|
autocmd FileType denite call s:denite_my_settings()
|
||||||
|
function! s:denite_my_settings() abort
|
||||||
|
nnoremap <silent><buffer><expr> <CR>
|
||||||
|
\ denite#do_map('do_action')
|
||||||
|
nnoremap <silent><buffer><expr> d
|
||||||
|
\ denite#do_map('do_action', 'delete')
|
||||||
|
nnoremap <silent><buffer><expr> p
|
||||||
|
\ denite#do_map('do_action', 'preview')
|
||||||
|
nnoremap <silent><buffer><expr> q
|
||||||
|
\ denite#do_map('quit')
|
||||||
|
nnoremap <silent><buffer><expr> i
|
||||||
|
\ denite#do_map('open_filter_buffer')
|
||||||
|
nnoremap <silent><buffer><expr> <Space>
|
||||||
|
\ denite#do_map('toggle_select').'j'
|
||||||
|
endfunction
|
||||||
Reference in New Issue
Block a user