diff --git a/README.md b/README.md index 0ef2c20..453653d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Get up and going in Linux with some nice bash aliases, neovim configuration + pl # Installation -Symlink the config files to `~/.config/nvim` and `~`, respectively. +Symlink the config files to `~/.config/nvim` and `~`, respectively, OR just run `./install.sh` which will do that for you. > ln -s $HOME/repos/dotfiles/init.lua $HOME/.config/nvim/init.lua > ln -s $HOME/repos/dotfiles/vimrc.vim $HOME/.config/nvim/vimrc.vim @@ -21,6 +21,6 @@ After Coc is installed, install coc-pyright and pyright: # terminal: > npm install -g pyright - > sudo apt install ripgrep + > sudo apt install ripgrep # or brew install # inside nvim: :CocInstall coc-pyright diff --git a/bash_aliases b/bash_aliases index 7c91161..92463d2 100644 --- a/bash_aliases +++ b/bash_aliases @@ -1,24 +1,19 @@ -alias nvim=~/nvim-linux64/bin/nvim -alias vi=nvim -alias ss='source ~/.bashrc' -alias bb='vi ~/.bashrc' -alias ba='vi ~/.bash_aliases' -alias bs='vi ~/.git_secret' -alias r='cd ~/repos && pwd' -alias vl='vi ~/.config/nvim/init.lua' -alias vv='vi ~/.config/nvim/vimrc.vim' -alias gb='git branch' -alias gl='git log' -alias pp='vi ~/.profile' -alias pg='git pull origin $(git branch --show-current)' -alias gp='git push origin $(git branch --show-current)' -alias gs='git status' -alias gd='git diff' -alias ga='git add --all' -alias l='ls -l' -alias i='ipython' -alias python=python3 - -function gc() { - git commit -m "$1" -} +alias vi=nvim +alias ss='source ~/.bashrc' +alias bb='vi ~/.bashrc' +alias ba='vi ~/.bash_aliases' +alias bs='vi ~/.git_secret' +alias r='cd ~/repos && pwd' +alias vl='vi ~/.config/nvim/init.lua' +alias vv='vi ~/.config/nvim/vimrc.vim' +alias gb='git branch' +alias gl='git log' +alias pp='vi ~/.profile' +alias pg='git pull origin $(git branch --show-current)' +alias gp='git push origin $(git branch --show-current)' +alias gs='git status' +alias gd='git diff' +alias ga='git add --all' +alias l='ls -l' +alias i='ipython' +alias python=python3 diff --git a/init.lua b/init.lua index 2ff69d5..6c875d0 100644 --- a/init.lua +++ b/init.lua @@ -42,6 +42,7 @@ require("lazy").setup({ {'neovim/nvim-lspconfig'}, {'hrsh7th/cmp-nvim-lsp'}, {'hrsh7th/nvim-cmp'}, + {"mfussenegger/nvim-jdtls"}, {'L3MON4D3/LuaSnip'}, {"neoclide/coc.nvim", branch = 'release'}, { @@ -75,3 +76,37 @@ end) require('lspconfig').pyright.setup({ virtual_text=false, }) + +local config = { + cmd = { + -- + "/usr/bin/java", -- Or the absolute path '/path/to/java11_or_newer/bin/java' + "-Declipse.application=org.eclipse.jdt.ls.core.id1", + "-Dosgi.bundles.defaultStartLevel=4", + "-Declipse.product=org.eclipse.jdt.ls.core.product", + "-Dlog.protocol=true", + "-Dlog.level=ALL", + "-Xms1g", + "--add-modules=ALL-SYSTEM", + "--add-opens", + "java.base/java.util=ALL-UNNAMED", + "--add-opens", + "java.base/java.lang=ALL-UNNAMED", + -- + "-jar", + "/usr/local/Cellar/jdtls/1.32.0/libexec/plugins/org.eclipse.equinox.launcher_1.6.700.v20231214-2017.jar", + "-configuration", "/usr/local/Cellar/jdtls/1.32.0/libexec/config_mac", + "-data", "/Users/zev/.local/share/nvim/java" + }, + settings = { + java = { + signatureHelp = {enabled = true}, + import = {enabled = true}, + rename = {enabled = true} + } + }, + init_options = { + bundles = {} + } +} + diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..47022c9 --- /dev/null +++ b/install.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +ln -s $HOME/repos/dotfiles/tmux.conf $HOME/.tmux.conf +ln -s $HOME/repos/dotfiles/bash_aliases $HOME/.bash_aliases +ln -s $HOME/repos/dotfiles/init.lua $HOME/.config/nvim/init.lua +ln -s $HOME/repos/dotfiles/vimrc.vim $HOME/.config/nvim/vimrc.vim diff --git a/tmux.conf b/tmux.conf index 62e57a1..92f7215 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,4 +1,14 @@ -# remap prefix -unbind C-b -set-option -g prefix ` -bind-key ` send-prefix +# remap prefix +unbind C-b +set-option -g prefix ` +bind-key ` send-prefix + +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @continuum-restore 'on' +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' +run-shell ~/clone/path/resurrect.tmux + diff --git a/vimrc.vim b/vimrc.vim index 722cc94..7098df5 100644 --- a/vimrc.vim +++ b/vimrc.vim @@ -1,48 +1,48 @@ -set autoindent expandtab tabstop=4 shiftwidth=4 -set hidden - -" When editing a file, always jump to the last known cursor position. -autocmd BufReadPost * - \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' - \ | exe "normal! g`\"" - \ | endif - -nnoremap :w -nnoremap :noh -nnoremap :bn -nnoremap :bp -inoremap :wi -let mapleader=" " -nnoremap w :w:bw -nnoremap W :bw -nnoremap v :e ~/.config/nvim/init.lua -nnoremap r :e ~/.config/nvim/vimrc.vim -nnoremap t :e ~/.tmux.conf -nnoremap x :Sex -nnoremap s :source ~/.config/nvim/init.lua -nnoremap q :xa -nnoremap f Telescope find_files -nnoremap g Telescope live_grep -nnoremap b Telescope buffers -nnoremap h Telescope help_tags -nmap j (coc-diagnostic-prev) -nmap d (coc-diagnostic-next) -inoremap CheckBackspace() ? "\" : "\" - -vnoremap :m '<-2gv=gv -vnoremap :m '>+1gv=gv -nnoremap :m -2 -nnoremap :m +1 - -function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -colorscheme tokyonight-night - -let g:LanguageClient_useVirtualText = 0 " disable inline errors - -set undodir=~/.config/nvim/undodir -set undofile -set number relativenumber +set autoindent expandtab tabstop=4 shiftwidth=4 +set hidden + +" When editing a file, always jump to the last known cursor position. +autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' + \ | exe "normal! g`\"" + \ | endif + +nnoremap :w +nnoremap :noh +nnoremap :bn +nnoremap :bp +inoremap :wi +let mapleader=" " +nnoremap w :w:bw +nnoremap W :bw +nnoremap v :e ~/.config/nvim/init.lua +nnoremap r :e ~/.config/nvim/vimrc.vim +nnoremap t :e ~/.tmux.conf +nnoremap x :Sex +nnoremap s :source ~/.config/nvim/init.lua +nnoremap q :xa +nnoremap f Telescope find_files +nnoremap g Telescope live_grep +nnoremap b Telescope buffers +nnoremap h Telescope help_tags +nmap j (coc-diagnostic-prev) +nmap d (coc-diagnostic-next) +inoremap CheckBackspace() ? "\" : "\" + +vnoremap :m '<-2gv=gv +vnoremap :m '>+1gv=gv +nnoremap :m -2 +nnoremap :m +1 + +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +colorscheme tokyonight-night + +let g:LanguageClient_useVirtualText = 0 " disable inline errors + +set undodir=~/.config/nvim/undodir +set undofile +set number relativenumber