Update dotfiles

This commit is contained in:
Joey Yakimowich-Payne 2021-09-12 10:07:31 -06:00
commit c19ed85b3d
6 changed files with 227 additions and 57 deletions

View file

@ -14,9 +14,7 @@ alias tcat='highlight -O ansi --force'
alias dc="docker-compose"
# PS1="\n\[\e[30;01m\](\[\e[31;01m\]\w\[\e[30;01m\])\[\e[30;1m\]\n\[\e[30;1m\](\[\e[34m\]\$(/bin/date +'%a %b %e %-I:%M:%S %Z %Y')\[\e[30;1m\])\n\[\e[30;1m\](\[\e[32;1m\]\u @ \h\[\e[30;1m\])-> \[\e[0m\]"
PS1="\n\[\e[30;01m\](\[\e[31;01m\]\w\[\e[30;01m\]) \[\033[30;01m\]\$(parse_git_branch)\n\[\e[30;1m\]\[\e[30;1m\](\[\e[34m\]\$(/bin/date +'%a %b %e %-I:%M:%S %Z %Y')\[\e[30;1m\])\n\[\e[30;1m\](\[\e[32;1m\]\u\[\e[30;1m\])-> \[\e[0m\]"
PS1="\n\[\e[30;01m\](\[\e[31;01m\]\w\[\e[30;01m\])\[\e[30;1m\]\n\[\e[30;1m\](\[\e[34m\]\$(/bin/date +'%a %b %e %-I:%M:%S %Z %Y')\[\e[30;1m\])\n\[\e[30;1m\](\[\e[32;1m\]\u\[\e[30;1m\])-> \[\e[0m\]"
# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
@ -46,10 +44,9 @@ source ~/bashscripts/disable_trackpad.bash
HISTSIZE=50000
HISTFILESIZE=500000
export TERM=screen-256color
export TERM=xterm-256color
#source $HOME/.sdkman/bin/sdkman-init.sh
export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
. $HOME/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
. /home/joey/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
eval "$(hub alias -s)"

49
.bashrc
View file

@ -127,3 +127,52 @@ if [ -f '/home/joey/cloudsdk/google-cloud-sdk/path.bash.inc' ]; then source '/ho
if [ -f '/home/joey/cloudsdk/google-cloud-sdk/completion.bash.inc' ]; then source '/home/joey/cloudsdk/google-cloud-sdk/completion.bash.inc'; fi
export GOOGLE_APPLICATION_CREDENTIALS="$HOME/Documents/Keys/Test Cloud TTS-28e661a83ec0.json"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export HISTTIMEFORMAT="%F %T "
export BASH_SILENCE_DEPRECATION_WARNING=1
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
alias vim="nvim"
export JAVA_HOME=$(/usr/libexec/java_home -v 16.0.1)
export PATH="/Users/joey/Library/Python/3.9/bin:$PATH"
export PATH="$HOME/.ghcup/bin/:$PATH"
export PATH="/usr/local/opt/gettext/bin:/usr/local/opt/grep/libexec/gnubin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export PATH="/opt/homebrew/bin:/opt/homebrew/lib:/opt/homebrew/include:$PATH"
export PATH="/Users/joey/.local/bin:/usr/local/bin:$PATH"
export PATH="/usr/local/opt/sqlite/bin:$PATH"
export PATH="$HOME/Nim/bin:$HOME/.nimble/bin:$PATH"
#export PATH="$HOME/.nimble/bin:$PATH"
#export LDFLAGS="-L/usr/local/opt/sqlite/lib"
#export CPPFLAGS="-I/usr/local/opt/sqlite/include"
#export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"
eval "$(hub alias -s)"
export PATH="/usr/local/opt/python@3.8/bin:$PATH"
#export PATH="/Library/Developer/CommandLineTools/usr/bin:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib:$PATH"
export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export PATH="/usr/local/opt/php@7.3/bin:$PATH"
export PATH="/usr/local/opt/php@7.3/sbin:$PATH"
export GODOT_BIN="/Applications/Godot.app/Contents/MacOS/Godot"
# opam configuration
test -r /Users/joey/.opam/opam-init/init.sh && . /Users/joey/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
export PATH="/opt/homebrew/opt/sqlite/bin:$PATH"
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export CPLUS_INCLUDE_PATH=$(llvm-config --includedir):/opt/homebrew/include:$CPLUS_INCLUDE_PATH
export LD_LIBRARY_PATH=$(llvm-config --libdir):/opt/homebrew/lib:$LD_LIBRARY_PATH
source $HOME/.ghcup/env
source /usr/local/lib/bazel/bin/bazel-complete.bash
export PATH="/opt/homebrew/opt/qt\@5/bin:$PATH"
# export LDFLAGS="-L/opt/homebrew/opt/qt\@5/lib"
# export CPPFLAGS="-I/opt/homebrew/opt/qt\@5/include"
# export PKG_CONFIG_PATH="/opt/homebrew/opt/qt\@5/lib/pkgconfig"
export CMAKE_PREFIX_PATH=/opt/homebrew/Cellar/qt\@5/5.15.2
alias sshkvm4g="ssh root@172.111.1.101"
alias sshkvm2g="ssh root@172.111.1.102"

View file

@ -16,6 +16,12 @@
"command": "opam",
"args": ["config", "exec", "--", "ocamllsp"],
"filetypes": ["ocaml", "reason"]
}
},
"haskell": {
"command": "haskell-language-server-wrapper",
"args": ["--lsp"],
"rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"],
"filetypes": ["haskell", "lhaskell"]
}
}
}

View file

@ -210,13 +210,13 @@ let g:ctrlp_prompt_mappings = {
\ }
noremap ˚ :tabr<cr>
noremap ∆ :tabl<cr>
" noremap ˚ :tabr<cr>
" noremap ∆ :tabl<cr>
noremap ˙ gT
noremap ¬ gt
inoremap ˚ <Esc>:tabr<cr>i
inoremap<Esc>:tabl<cr>i
" inoremap ˚ <Esc>:tabr<cr>i
" inoremap ∆ <Esc>:tabl<cr>i
inoremap ˙ <Esc>gTi
inoremap ¬ <Esc>gti
@ -289,19 +289,28 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'kassio/neoterm'
Plug 'reasonml-editor/vim-reason-plus'
Plug 'jyapayne/vim-code-dark'
Plug 'puremourning/vimspector'
" Plug 'jyapayne/vimspector'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'ryanoasis/vim-devicons'
Plug 'TimUntersberger/neogit'
Plug 'sindrets/diffview.nvim'
Plug 'lewis6991/gitsigns.nvim'
Plug 'sindrets/diffview.nvim', {'branch': 'main'}
Plug 'lewis6991/gitsigns.nvim', {'branch': 'main'}
Plug 'peterhoeg/vim-qml'
Plug 'KabbAmine/vCoolor.vim'
Plug 'mfussenegger/nvim-dap'
" Plug 'rcarriga/nvim-dap-ui'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-telescope/telescope-dap.nvim'
Plug 'theHamsta/nvim-dap-virtual-text'
"Plug 'baabelfish/nvim-nim'
call plug#end()
let g:gitsigns_head = "main"
" lewis6991/gitsigns.nvim
lua << EOF
require('gitsigns').setup({
@ -309,6 +318,41 @@ lua << EOF
\ })
EOF
" let g:vimspector_install_gadgets = [ 'debugpy', 'vscode-cpptools', 'CodeLLDB' ]
" puremourning/vimspector
" fun! GotoWindow(id)
" :call win_gotoid(a:id)
" endfun
" func! AddToWatch()
" let word = expand("<cexpr>")
" call vimspector#AddWatch(word)
" endfunction
" let g:vimspector_base_dir = expand('$HOME/.config/vimspector-config')
" let g:vimspector_sidebar_width = 60
" nnoremap <leader>da :call vimspector#Launch()<CR>
" nnoremap <leader>dc :call GotoWindow(g:vimspector_session_windows.code)<CR>
" nnoremap <leader>dv :call GotoWindow(g:vimspector_session_windows.variables)<CR>
" nnoremap <leader>dw :call GotoWindow(g:vimspector_session_windows.watches)<CR>
" nnoremap <leader>ds :call GotoWindow(g:vimspector_session_windows.stack_trace)<CR>
" nnoremap <leader>do :call GotoWindow(g:vimspector_session_windows.output)<CR>
" nnoremap <leader>di :call AddToWatch()<CR>
" nnoremap <leader>dx :call vimspector#Reset()<CR>
" nnoremap <leader>dX :call vimspector#ClearBreakpoints()<CR>
" nnoremap <S-k> :call vimspector#StepOut()<CR>
" nnoremap <S-l> :call vimspector#StepInto()<CR>
" nnoremap <S-j> :call vimspector#StepOver()<CR>
" nnoremap <leader>d_ :call vimspector#Restart()<CR>
" nnoremap <leader>dn :call vimspector#Continue()<CR>
" nnoremap <leader>drc :call vimspector#RunToCursor()<CR>
" nnoremap <leader>dh :call vimspector#ToggleBreakpoint()<CR>
" nnoremap <leader>de :call vimspector#ToggleConditionalBreakpoint()<CR>
" let g:vimspector_sign_priority = {
" \ 'vimspectorBP': 998,
" \ 'vimspectorBPCond': 997,
" \ 'vimspectorBPDisabled': 996,
" \ 'vimspectorPC': 999,
" \ }
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set termguicolors
@ -444,29 +488,6 @@ exe 'hi htmlSpecialTagName guifg='s:keyword
" Markdown Highlighting
exe 'hi mkdCode guifg='s:builtin
set hlsearch
highlight Search ctermbg=blue ctermfg=white guibg=#006891 guifg=white
highlight IncSearch ctermbg=blue ctermfg=white guifg=#7D008D guibg=white
filetype on
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
highlight OverLength ctermbg=red ctermfg=black guibg=#592929 gui=bold
highlight ALEError ctermfg=black ctermbg=red guifg=black guibg=red
highlight ALEErrorSign ctermfg=none ctermbg=black guifg=red guibg=#212121
highlight ALEWarning ctermfg=black ctermbg=yellow guifg=black guibg=#a09500
highlight ALEWarningSign ctermfg=yellow ctermbg=none guibg=#212121 guifg=#a09500
highlight SignColumn ctermbg=darkgrey guibg=#212121
highlight TabLineFill guibg=none guifg=none gui=none
highlight TabLineSel guibg=#353535 guifg=none
highlight TabLine guibg=none guifg=none
hi Normal ctermbg=none guibg=none
hi NonText ctermbg=none guibg=none
hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE guibg=black gui=NONE guifg=NONE
set noshowmode
" au User asyncomplete_setup call asyncomplete#register_source({
" \ 'name': 'nim',
@ -716,6 +737,7 @@ let g:neoterm_term_per_tab = 1
nnoremap <c-t> :Ttoggle<CR>
inoremap <c-t> <Esc>:Ttoggle<CR>
tnoremap <c-t> <c-\><c-n>:Ttoggle<CR>
tnoremap <Esc> <C-\><C-n>
" color scheme
colorscheme codedark
@ -731,9 +753,9 @@ highlight ALEErrorSign ctermfg=none ctermbg=black guifg=red guibg=#212121
highlight ALEWarning ctermbg=yellow guibg=#504a08
highlight ALEWarningSign ctermfg=yellow ctermbg=none guibg=#212121 guifg=#ecd517
highlight SignColumn ctermbg=darkgrey guibg=#212121
highlight TabLineFill guibg=none guifg=none gui=none
highlight TabLineSel guibg=#353535 guifg=none
highlight TabLine guibg=none guifg=none
" highlight TabLineFill guibg=none guifg=none gui=none
" highlight TabLineSel guibg=#353535 guifg=none
" highlight TabLine guibg=none guifg=none
highlight CocHighlightText ctermbg=lightblue guibg=#002c4b
@ -783,11 +805,11 @@ endfor
" ## end of OPAM user-setup addition for vim / base ## keep this line
let g:ale_linters = {'java': []}
" for normal mode - the word under the cursor
nmap <Leader>di <Plug>VimspectorBalloonEval
" for visual mode, the visually selected text
xmap <Leader>di <Plug>VimspectorBalloonEval
let g:vimspector_enable_mappings = 'HUMAN'
" " for normal mode - the word under the cursor
" nmap <Leader>di <Plug>VimspectorBalloonEval
" " for visual mode, the visually selected text
" xmap <Leader>di <Plug>VimspectorBalloonEval
" let g:vimspector_enable_mappings = 'HUMAN'
" nnoremap <leader><space> :GFiles<CR>
@ -805,6 +827,8 @@ _G.telescope_live_grep_in_path = function(path)
end
EOF
let b:current_syntax = 'nim'
nnoremap <leader><space> :Telescope git_files<CR>
nnoremap <leader>fd :lua telescope_find_files_in_path()<CR>
nnoremap <leader>fD :lua telescope_live_grep_in_path()<CR>
@ -819,6 +843,102 @@ nnoremap <leader>fs :Telescope lsp_document_symbols<CR>
nnoremap <leader>ff :Telescope live_grep<CR>
nnoremap <leader>FF :Telescope grep_string<CR>
" mfussenegger/nvim-dap
lua << EOF
local dap = require('dap')
function os.capture(cmd)
local f = assert(io.popen(cmd .. ' 2>&1', 'r'))
local s = assert(f:read('*a'))
f:close()
return s
end
dap.adapters.lldb = {
type = 'executable',
command = '/opt/homebrew/opt/llvm/bin/lldb-vscode', -- adjust as needed
name = "lldb"
}
dap.configurations.nim = {
{
name = "Launch",
type = "lldb",
request = "launch",
program = function()
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
print("Compiling...")
local filename = vim.api.nvim_buf_get_name(0)
local res = os.capture('nim c --debugger:native ' .. filename)
print("Running...")
return filename:match("(.+)%..+$");
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = function()
return vim.fn.input('Args: ', '')
end,
-- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
--
-- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
--
-- Otherwise you might get the following error:
--
-- Error on launch: Failed to attach to the target process
--
-- But you should be aware of the implications:
-- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
runInTerminal = false
},
}
-- If you want to use this for rust and c, add something like this:
-- dap.configurations.c = dap.configurations.cpp
-- dap.configurations.nim = dap.configurations.cpp
vim.fn.sign_define('DapBreakpoint', {text='●', texthl='ErrorMsg', linehl='', numhl=''})
vim.fn.sign_define('DapBreakpointRejected', {text='●', texthl='LineNr', linehl='', numhl=''})
vim.fn.sign_define('DapLogPoint', {text='L', texthl='', linehl='', numhl=''})
vim.fn.sign_define('DapStopped', {text='→', texthl='WarningMsg', linehl='debugPC', numhl=''})
EOF
au FileType dap-repl lua require('dap.ext.autocompl').attach()
nnoremap <silent> <leader>db :lua require'dap'.toggle_breakpoint()<CR>
nnoremap <silent> ø :lua require'dap'.step_out()<CR>
nnoremap <silent> ˚ :lua require'dap'.step_into()<CR>
nnoremap <silent> ∆ :lua require'dap'.step_over()<CR>
nnoremap <silent> <leader>ds :lua require'dap'.close()<CR>
nnoremap <silent> <leader>dn :lua require'dap'.continue()<CR>
nnoremap <silent> <leader>dk :lua require'dap'.up()<CR>
nnoremap <silent> <leader>dj :lua require'dap'.down()<CR>
nnoremap <silent> <leader>d_ :lua require'dap'.disconnect();require'dap'.stop();require'dap'.run_last()<CR>
nnoremap <silent> <leader>dr :lua require'dap'.repl.toggle()<CR><C-w>l
nnoremap <silent> <leader>rc :lua require'dap'.run_to_cursor()<CR><C-w>l
nnoremap <silent> <leader>rb :lua require'dap'.reverse_continue()<CR><C-w>l
"nnoremap <silent> <leader>di :lua require'dap.ui.variables'.hover()<CR>
vnoremap <silent> <leader>di :lua require'dap.ui.variables'.visual_hover()<CR>
nnoremap <silent> <leader>d? :lua require'dap.ui.variables'.scopes()<CR>
nnoremap <silent> <leader>de :lua require'dap'.set_exception_breakpoints({"all"})<CR>
nnoremap <silent> <leader>da :lua require'debugHelper'.attach()<CR>
nnoremap <silent> <leader>dA :lua require'debugHelper'.attachToRemote()<CR>
nnoremap <silent> <leader>di :lua require'dap.ui.widgets'.hover()<CR>
nnoremap <silent> <leader>q :q<CR>
nnoremap <silent> <leader>d? :lua local widgets=require'dap.ui.widgets';widgets.centered_float(widgets.scopes)<CR>
" Plug 'nvim-telescope/telescope-dap.nvim'
lua << EOF
require('telescope').setup()
require('telescope').load_extension('dap')
EOF
nnoremap <leader>df :Telescope dap frames<CR>
nnoremap <leader>dc :Telescope dap commands<CR>
nnoremap <leader>dh :Telescope dap list_breakpoints<CR>
" theHamsta/nvim-dap-virtual-text and mfussenegger/nvim-dap
let g:dap_virtual_text = v:true
" TimUntersberger/neogit and sindrets/diffview.nvim
lua << EOF
require("neogit").setup {

View file

@ -9,15 +9,12 @@
# -- general -------------------------------------------------------------------
# Add truecolor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Default terminal is 256 colors
# set t_ZH=^[[3m
# set t_ZR=^[[23m
set-option -s default-terminal "tmux-256color"
set-option -sa terminal-overrides ",xterm-256color:RGB"
set-option -sa terminal-overrides ",xterm-255color*:Tc"
# Default terminal is 256 colors
# set -g default-terminal "screen-256color" # colors!
#set -g default-terminal "screen-256color" # colors!
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout

17
.vimrc
View file

@ -285,6 +285,15 @@ nnoremap <F6> :MundoToggle<CR>
"let base16colorspace=256
" set background=dark
"colorscheme base16-default-dark
autocmd Filetype ocaml setlocal ts=2 sts=2 sw=2 expandtab
"colorscheme tender
hi Normal ctermbg=none
hi NonText ctermbg=none
hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE
set noshowmode
" ## added by OPAM user-setup for vim / base ## 93ee63e278bdfc07d1139a748ed3fff2 ## you can edit, but keep this line
let s:opam_share_dir = system("opam config var share")
let s:opam_share_dir = substitute(s:opam_share_dir, '[\r\n]*$', '', '')
@ -317,11 +326,3 @@ for tool in s:opam_packages
endif
endfor
" ## end of OPAM user-setup addition for vim / base ## keep this line
autocmd Filetype ocaml setlocal ts=2 sts=2 sw=2 expandtab
"colorscheme tender
hi Normal ctermbg=none
hi NonText ctermbg=none
hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE
set noshowmode