diff --git a/.ideavimrc b/.ideavimrc index fdf98c7..a00338a 100644 --- a/.ideavimrc +++ b/.ideavimrc @@ -6,4 +6,7 @@ set visualbell set ignorecase set smartcase set incsearch -set hlsearch \ No newline at end of file +set hlsearch + +nnoremap gr :action ShowUsages + diff --git a/README.md b/README.md index f4fd275..cb91c5d 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,20 @@ -## Config files +# Dotfiles -### [Neovim](https://neovim.io) +## Installation -Install the vim plugin manager [vim-plug](https://github.com/junegunn/vim-plug). +Run the `install.sh` script to install neovim, zsh (via oh-my-zsh) and all of the omz plugins. -Install [powerline fonts](https://github.com/powerline/fonts) for powerline statusline plugins. +## nvim -Install the plugins with the following command: +-- TODO -- -``` -:PlugInstall +- Install nerdfont + +## zsh + +Machine specific settings can be added in `./zsh/hosts/` and will be sourced for via the environment variable `$MACHINE_TYPE`, export `$MACHINE_TYPE` via `/etc/zprofile` (or another local only file, e.g. ``~/.zprofile`. + +```bash +> sudo echo "MACHINE_TYPE=" >> /etc/zprofile ``` -### .bashrc - -Added functionality to show current git branch in terminal diff --git a/nvim/lua/config/plugins/lsp/lspconfig.lua b/nvim/lua/config/plugins/lsp/lspconfig.lua index 7d83d03..df6ac8d 100644 --- a/nvim/lua/config/plugins/lsp/lspconfig.lua +++ b/nvim/lua/config/plugins/lsp/lspconfig.lua @@ -28,6 +28,7 @@ return { keymap.set('n', 'gd', 'Telescope lsp_definitions', opts('Show LSP definitions')) keymap.set('n', 'gi', 'Telescope lsp_implementations', opts('Show LSP implementations')) keymap.set('n', 'gt', 'Telescope lsp_type_definitions', opts('Show LSP type definitions')) + keymap.set('n', 'gE', vim.diagnostic.open_float, opts('Show diagnostics')) keymap.set({ 'n', 'v' }, 'ga', vim.lsp.buf.code_action, opts('Show available code actions')) wk.add({ { 'r', group = 'Rename' }, diff --git a/zsh/.zshrc b/zsh/.zshrc index 4e9a2b8..d37592a 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -121,4 +121,6 @@ export NVM_DIR="$HOME/.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 -. "$HOME/.local/bin/env" +if [[ -n "$MACHINE_TYPE" && -f "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh" ]]; then + source "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh" +fi diff --git a/zsh/hosts/personal.zsh b/zsh/hosts/personal.zsh new file mode 100644 index 0000000..577a22a --- /dev/null +++ b/zsh/hosts/personal.zsh @@ -0,0 +1,7 @@ +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + +export ANDROID_HOME=/home/johannes/Android/Sdk + +export PATH=$HOME/.local/bin:$PATH +export PATH=$PATH:$ANDROID_HOME/emulator +export PATH=$PATH:$ANDROID_HOME/platform-tools diff --git a/zsh/hosts/work.zsh b/zsh/hosts/work.zsh new file mode 100644 index 0000000..360da47 --- /dev/null +++ b/zsh/hosts/work.zsh @@ -0,0 +1 @@ +. "$HOME/.local/bin/env"