This commit is contained in:
Joey Yakimowich-Payne 2025-01-30 21:27:01 -07:00
commit 348e15d946
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
5 changed files with 83 additions and 59 deletions

View file

@ -11,13 +11,15 @@ export CXX=g++
alias nv="nvim"
alias vim="nvim"
alias did="nvim +'normal Go' +'r!date' ~/Documents/did.txt"
alias sshvalheim="ssh 10.0.0.241"
alias sshminecraft="ssh 10.0.0.76"
alias sshvalheim="ssh 192.168.1.173"
alias sshminecraft="ssh 192.168.1.232"
alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
alias lcat='pygmentize -g -O style=colorful,linenos=1 | grep -P "^\d\d\d\d:"'
alias ccat='pygmentize -g'
alias hcat='highlight -n -O ansi --force'
alias tcat='highlight -O ansi --force'
alias grep='grep --color'
alias dc="docker-compose"

View file

@ -1,5 +1,7 @@
{
"suggest.noselect": true,
"semanticTokens.enable": true,
"semanticTokens.filetypes": ["c", "cpp"],
"languageserver": {
"rescript": {
"enable": true,
@ -9,9 +11,14 @@
"rootPatterns": ["bsconfig.json"]
},
"nim": {
"enable": true,
"command": "nimlsp",
"filetypes": [ "nim" ]
"command": "nimlangserver",
"filetypes": ["nim"],
"trace.server": "verbose",
"settings": {
"nim": {
"nimsuggestPath": "~/.nimble/bin/nimsuggest"
}
}
},
"ocaml-lsp": {
"command": "opam",
@ -25,5 +32,6 @@
"filetypes": ["haskell", "lhaskell"]
}
},
"clangd.path": "~/.config/coc/extensions/coc-clangd-data/install/12.0.1/clangd_12.0.1/bin/clangd"
"clangd.path": "~/.config/coc/extensions/coc-clangd-data/install/12.0.1/clangd_12.0.1/bin/clangd",
"python.venvPath": ".venv"
}

View file

@ -1,4 +1,6 @@
lua << EOF
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
EOF
call plug#begin('~/.local/share/nvim/plugged')
Plug 'rust-lang/rust.vim'
@ -22,9 +24,12 @@ Plug 'vim-scripts/errormarker.vim'
Plug 'elixir-lang/vim-elixir'
Plug 'jreybert/vim-largefile'
Plug 'sbdchd/neoformat'
Plug 'tpope/vim-obsession'
Plug 'dhruvasagar/vim-prosession'
Plug 'tikhomirov/vim-glsl'
Plug 'svermeulen/vim-easyclip'
" Plug 'tpope/vim-obsession'
" Plug 'dhruvasagar/vim-prosession'
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'rmagatti/auto-session'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Plug 'vim-syntastic/syntastic'
@ -48,7 +53,6 @@ Plug 'kana/vim-textobj-line'
Plug 'Julian/vim-textobj-brace'
Plug 'bps/vim-textobj-python'
Plug 'wellle/targets.vim'
Plug 'svermeulen/vim-easyclip'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'jremmen/vim-ripgrep'
@ -68,8 +72,10 @@ Plug 'sindrets/diffview.nvim', {'branch': 'main'}
Plug 'lewis6991/gitsigns.nvim', {'branch': 'main'}
Plug 'peterhoeg/vim-qml'
Plug 'mfussenegger/nvim-dap'
Plug 'posva/vim-vue'
" Plug 'rcarriga/nvim-dap-ui'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" Plug 'nvim-treesitter/playground'
Plug 'nvim-telescope/telescope-dap.nvim'
Plug 'theHamsta/nvim-dap-virtual-text'
Plug 'mfussenegger/nvim-dap-python'
@ -77,11 +83,13 @@ Plug 'KabbAmine/vCoolor.vim'
" Plug 'chrisbra/Colorizer'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'edluffy/hologram.nvim'
Plug 'hashivim/vim-terraform'
Plug 'fatih/vim-go'
Plug 'folke/trouble.nvim'
"Plug 'baabelfish/nvim-nim'
call plug#end()
let g:EasyClipUseGlobalPasteToggle = 0
" map <ESC>[1;5A <C-Up>
" map <ESC>[1;5B <C-Down>
@ -177,6 +185,8 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isT
let g:NERDTreeDirArrowExpandable = 'â–¸'
let g:NERDTreeDirArrowCollapsible = 'â–¾'
autocmd Filetype nim setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype ts setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype vue setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype less setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype css setlocal ts=2 sts=2 sw=2 expandtab
let g:syntastic_javascript_checkers = ['eslint', 'flow']
@ -226,7 +236,7 @@ nmap =j :%!python3 -m json.tool<CR>
if !exists("autocommands_loaded")
let autocommands_loaded = 1
autocmd BufRead,BufNewFile,FileReadPost *.py source ~/.vim/python
" autocmd BufRead,BufNewFile,FileReadPost *.py source ~/.vim/python
endif
au BufRead,BufNewFile *.shpaml setfiletype shpaml
@ -303,11 +313,19 @@ let g:ctrlp_prompt_mappings = {
noremap ËgT
noremap ¬ gt
noremap <M-h> gT
noremap <M-l> gt
" inoremap Ëš <Esc>:tabr<cr>i
" inoremap ∆ <Esc>:tabl<cr>i
inoremap Ë<Esc>gTi
inoremap ¬ <Esc>gti
inoremap <M-h> <Esc>gTi
inoremap <M-l> <Esc>gti
set clipboard=
let g:EasyClipShareYanks = 1
@ -325,9 +343,7 @@ let g:gitsigns_head = "main"
" lewis6991/gitsigns.nvim
lua << EOF
require('gitsigns').setup({
\ word_diff = true
\ })
require('gitsigns').setup({word_diff = true })
EOF
" let g:vimspector_install_gadgets = [ 'debugpy', 'vscode-cpptools', 'CodeLLDB' ]
@ -502,29 +518,6 @@ exe 'hi htmlSpecialTagName guifg='s:keyword
exe 'hi mkdCode guifg='s:builtin
" au User asyncomplete_setup call asyncomplete#register_source({
" \ 'name': 'nim',
" \ 'whitelist': ['nim'],
" \ 'triggers': {'nim': ['.'] },
" \ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
" \ })
" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
" imap <silent> . .<Plug>(asyncomplete_force_refresh)
" let g:asyncomplete_auto_popup = 0
" function! s:check_back_space() abort
" let col = col('.') - 1
" return !col || getline('.')[col - 1] =~ '\s'
" endfunction
" inoremap <silent><expr> <TAB>
" \ pumvisible() ? "\<C-n>" :
" \ <SID>check_back_space() ? "\<TAB>" :
" \ asyncomplete#force_refresh()
"inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
@ -579,6 +572,8 @@ let g:asyncomplete_auto_completeopt=0
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
" unicode characters in the file autoload/float.vim
set encoding=utf-8
set nobackup
set nowritebackup
" TextEdit might fail if hidden is not set.
set hidden
@ -825,7 +820,7 @@ set noshowmode
" endfor
" ## end of OPAM user-setup addition for vim / base ## keep this line
let g:ale_linters = {'java': [], 'python': []}
let g:ale_linters = {'java': [], 'python': [], 'typescript': []}
" " for normal mode - the word under the cursor
" nmap <Leader>di <Plug>VimspectorBalloonEval
@ -857,7 +852,7 @@ EOF
lua << EOF
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the four listed parsers should always be installed)
ensure_installed = { "c", "lua", "vim", "help", "go", "python" },
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline", "go" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
@ -887,19 +882,41 @@ require'nvim-treesitter.configs'.setup {
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
playground = {
enable = true,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false, -- Whether the query persists across vim sessions
keybindings = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
toggle_injected_languages = 't',
toggle_anonymous_nodes = 'a',
toggle_language_display = 'I',
focus_language = 'f',
unfocus_language = 'F',
update = 'R',
goto_node = '<cr>',
show_help = '?',
},
}
}
require('auto-session').setup {
auto_save_enabled = true,
auto_restore_enabled = true
}
EOF
let b:current_syntax = 'nim'
nnoremap <leader><space> :Telescope git_files<CR>
nnoremap <leader><space> :Telescope find_files<CR>
nnoremap <leader>fd :lua telescope_find_files_in_path()<CR>
nnoremap <leader>fD :lua telescope_live_grep_in_path()<CR>
nnoremap <leader>ft :lua telescope_find_files_in_path("./tests")<CR>
nnoremap <leader>fT :lua telescope_live_grep_in_path("./tests")<CR>
" nnoremap <leader>ff :Telescope live_grep<CR>
nnoremap <leader>fo :Telescope file_browser<CR>
nnoremap <leader>fn :Telescope find_files<CR>
nnoremap <leader>fn :Telescope git_files<CR>
nnoremap <leader>fg :Telescope git_branches<CR>
nnoremap <leader>fb :Telescope buffers<CR>
nnoremap <leader>fs :Telescope lsp_document_symbols<CR>
@ -1056,3 +1073,8 @@ nmap <F1> :CocCommand java.debug.vimspector.start<CR>
let @t = '/^proc ?^\_[\n]## V/\_[€kbkbkb^\_[\n\€kb]prckboc m/\.} pdd'
let &t_SI = "\e[5 q"
let &t_EI = "\e[2 q"
au FileType vue let b:coc_root_patterns = ['.git', '.env', 'package.json', 'tsconfig.json', 'jsconfig.json', 'vite.config.ts', 'vite.config.js', 'vue.config.js', 'nuxt.config.ts']
autocmd Filetype typescript setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype vue setlocal ts=2 sts=2 sw=2 expandtab

View file

@ -6,11 +6,11 @@
[core]
editor = nvim
autocrlf = input
pager = diff-so-fancy | less --tabs=4 -RFX
compression = 9
[pull]
rebase = false
[color]
ui = true
ui = auto
[push]
default = current
[alias]
@ -22,20 +22,7 @@
# (better for interactive use)
stat = !bash -c 'source $HOME/.bashrc && git diff --stat $(git merge-base HEAD \"$(git basebranch)\")'
review = !nvim -p $(git files) +\"tabdo Gdiff $(git basebranch)\" +\"let g:gitgutter_diff_base = '$(git basebranch)'\"
[interactive]
diffFilter = diff-so-fancy --patch
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
func = 146 bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[commit]
gpgsign = true
[init]
defaultBranch = master

View file

@ -178,6 +178,11 @@ set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# for vim
set -g @resurrect-strategy-vim 'session'
# for neovim
set -g @resurrect-strategy-nvim 'session'
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \