diff --git a/vim/.vim/lua/treesitter.lua b/vim/.vim/lua/treesitter.lua index 411b096..ce30b9d 100644 --- a/vim/.vim/lua/treesitter.lua +++ b/vim/.vim/lua/treesitter.lua @@ -1,31 +1,24 @@ require('nvim-treesitter.configs').setup { - -- A list of parser names, or "all" - -- ensure_installed = { "c", "lua", "vim", "java", "kotlin"}, - ensure_installed = "all", +-- A list of parser names, or "all" +-- ensure_installed = { "c", "lua", "vim", "java", "kotlin"}, +ensure_installed = "all", - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, +-- Install parsers synchronously (only applied to `ensure_installed`) +sync_install = false, - highlight = { - -- `false` will disable the whole extension - enable = true, - - -- rainbow markdown - -- custom_captures = { - -- ["h1"] = "h1", - -- ["_h1"] = "_h1", - -- ["h2"] = "h2", - -- ["_h2"] = "_h2", - -- ["h3"] = "h3", - -- ["_h3"] = "_h3", - -- ["h4"] = "h4", - -- ["_h4"] = "_h4", - -- ["h5"] = "h5", - -- ["_h5"] = "_h5", - -- }, +highlight = { + -- `false` will disable the whole extension + enable = true, indent = { enable = true }, - -- disable = {"java"}, + disable = {"java"}, + -- + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + -- additional_vim_regex_highlighting = true, + -- additional_vim_regex_highlighting = {"java"}, }, } diff --git a/vim/.vim/prefs/google.vim b/vim/.vim/prefs/google.vim index bc3555b..fbf749b 100644 --- a/vim/.vim/prefs/google.vim +++ b/vim/.vim/prefs/google.vim @@ -64,15 +64,25 @@ function BlazeTestDebug() abort call blazeExec("blaze test --java_debug", blaze#GetTargets()) endfunction -function BuildCleaner() abort +function BuildCleanerFile() abort exe VimuxRunCommand("build_cleaner " . expand('%')) endfunction +function UnusedDeps() abort + exe VimuxRunCommand("unused_deps --nouse_build_api --blaze_options='--config=gmscore_tap' " . join(blaze#GetTargets(), ' ')) +endfunction + +function BuildCleanerTarget() abort + exe VimuxRunCommand("build_cleaner " . join(blaze#GetTargets(), ' ')) +endfunction + nnoremap br :call BlazeRun() nnoremap bb :call BlazeBuild() nnoremap bt :call BlazeTest() nnoremap btd :call BlazeTestDebug() -nnoremap bc :call BuildCleaner() +nnoremap bc :call BuildCleanerTarget() +nnoremap bcf :call BuildCleanerFile() +nnoremap ud :call UnusedDeps() let g:asyncrun_open = 1 diff --git a/vim/.vimrc b/vim/.vimrc index 0e9607f..beb7418 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -60,10 +60,6 @@ set splitbelow " Puts new split windows to the bottom of the current set scrolljump=5 " Line to scroll when cursor leaves screen set scrolloff=3 " Minumum lines to keep above and below cursor -" makes sure that when opening, files are normal, i.e. not folded. -set nofoldenable -set foldmethod=syntax - let g:clipboard = #{ \ name: 'xsel', \ copy: { @@ -165,3 +161,6 @@ endfunction set colorcolumn=80 set mouse= + +" makes sure that when opening, files are normal, i.e. not folded. +set nofoldenable diff --git a/zsh/g3path.zsh b/zsh/g3path.zsh index 3bbf145..39e715d 100644 --- a/zsh/g3path.zsh +++ b/zsh/g3path.zsh @@ -13,7 +13,7 @@ autoload -Uz add-zsh-hook add-zsh-hook chpwd g3path::hook g3path::zle::accept-line () { - if [[ -n $GOOGLE3_ROOT && ! $BUFFER =~ \\s*(blaze|g4|p4|g4d|add_dep|buildozer|build_cleaner|debug_android_lint|rabbit|hb|gqui|builddoctor) ]]; then + if [[ -n $GOOGLE3_ROOT && ! $BUFFER =~ \\s*(blaze|g4|p4|g4d|add_dep|buildozer|build_cleaner|debug_android_lint|rabbit|hb|gqui|builddoctor|unused_deps) ]]; then BUFFER=${BUFFER// \/\// $GOOGLE3_ROOT\/} fi zle .accept-line