merge dotfiles and add machine specific config

This commit is contained in:
Johannes Knopp
2025-03-27 14:49:33 +01:00
parent 0899054aef
commit 5145f60ed5
6 changed files with 29 additions and 12 deletions

View File

@ -7,3 +7,6 @@ set ignorecase
set smartcase set smartcase
set incsearch set incsearch
set hlsearch set hlsearch
nnoremap gr :action ShowUsages<CR>

View File

@ -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 --
``` - Install nerdfont
:PlugInstall
## 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=<name>" >> /etc/zprofile
``` ```
### .bashrc
Added functionality to show current git branch in terminal

View File

@ -28,6 +28,7 @@ return {
keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<cr>', opts('Show LSP definitions')) keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<cr>', opts('Show LSP definitions'))
keymap.set('n', 'gi', '<cmd>Telescope lsp_implementations<cr>', opts('Show LSP implementations')) keymap.set('n', 'gi', '<cmd>Telescope lsp_implementations<cr>', opts('Show LSP implementations'))
keymap.set('n', 'gt', '<cmd>Telescope lsp_type_definitions<cr>', opts('Show LSP type definitions')) keymap.set('n', 'gt', '<cmd>Telescope lsp_type_definitions<cr>', 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')) keymap.set({ 'n', 'v' }, 'ga', vim.lsp.buf.code_action, opts('Show available code actions'))
wk.add({ wk.add({
{ '<leader>r', group = 'Rename' }, { '<leader>r', group = 'Rename' },

View File

@ -121,4 +121,6 @@ export NVM_DIR="$HOME/.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
. "$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

7
zsh/hosts/personal.zsh Normal file
View File

@ -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

1
zsh/hosts/work.zsh Normal file
View File

@ -0,0 +1 @@
. "$HOME/.local/bin/env"