stuff
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- A list of parser names, or "all"
|
-- A list of parser names, or "all"
|
||||||
ensure_installed = { "c", "lua", "vim", "java", "kotlin"},
|
-- ensure_installed = { "c", "lua", "vim", "java", "kotlin"},
|
||||||
|
ensure_installed = "all",
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
@ -12,7 +12,8 @@ let g:fzf_command_prefix = 'Fzf'
|
|||||||
" use the same keybindings for fzf as in shell
|
" use the same keybindings for fzf as in shell
|
||||||
" nnoremap <silent> <c-s-t> :FzfHgFiles<CR>
|
" nnoremap <silent> <c-s-t> :FzfHgFiles<CR>
|
||||||
" nnoremap <silent> <c-s-f> :FzfHgRg<space>
|
" nnoremap <silent> <c-s-f> :FzfHgRg<space>
|
||||||
let s:hg_command = 'hg whatsout --template= -- 2>/dev/null'
|
let s:hg_command = 'hg pstatus -ma -n --template= -- 2>/dev/null'
|
||||||
|
let s:rg_command = 'rg --ignore-case --hidden --follow --color auto --line-number'
|
||||||
|
|
||||||
command! -bang FzfHgFiles
|
command! -bang FzfHgFiles
|
||||||
\ call fzf#run(fzf#wrap({
|
\ call fzf#run(fzf#wrap({
|
||||||
@ -20,7 +21,7 @@ command! -bang FzfHgFiles
|
|||||||
\ }),
|
\ }),
|
||||||
\ <bang>0
|
\ <bang>0
|
||||||
\ )
|
\ )
|
||||||
command! -bang -nargs=* FzfHgRg
|
command! -bang -nargs=* ClSearch
|
||||||
\ call fzf#vim#grep(
|
\ call fzf#vim#grep(
|
||||||
\ s:rg_command . " " . <q-args> . " " . "$(" . s:hg_command . ")", 1,
|
\ s:rg_command . " " . <q-args> . " " . "$(" . s:hg_command . ")", 1,
|
||||||
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
||||||
|
@ -3,6 +3,7 @@ lua << EOF
|
|||||||
require('google.comments').setup {
|
require('google.comments').setup {
|
||||||
-- The command for fetching comments, refer to `get_comments.par --help` to
|
-- The command for fetching comments, refer to `get_comments.par --help` to
|
||||||
-- see all the options.
|
-- see all the options.
|
||||||
|
-- command = {'/google/bin/releases/editor-devtools/get_comments.par', '--full', '--json', "-x=''"},
|
||||||
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments', ' -x ""'},
|
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments', ' -x ""'},
|
||||||
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
|
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
|
||||||
-- See :help sign_define
|
-- See :help sign_define
|
||||||
@ -17,6 +18,11 @@ require('google.comments').setup {
|
|||||||
-- When showing file paths, use relative paths or not.
|
-- When showing file paths, use relative paths or not.
|
||||||
relative_path = true,
|
relative_path = true,
|
||||||
},
|
},
|
||||||
|
--- Enable viewing comments through floating window
|
||||||
|
floating = true,
|
||||||
|
--- Options used when creating the floating window.
|
||||||
|
floating_window_options = require('google.comments.options')
|
||||||
|
.default_floating_window_options,
|
||||||
}
|
}
|
||||||
-- here are some mappings you might want:
|
-- here are some mappings you might want:
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>nc',
|
vim.api.nvim_set_keymap('n', '<Leader>nc',
|
||||||
@ -36,3 +42,4 @@ vim.fn.sign_define('COMMENT_ICON', {text = ''})
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
autocmd InsertLeave * :lua require('google.comments').update_signs()
|
autocmd InsertLeave * :lua require('google.comments').update_signs()
|
||||||
|
autocmd InsertLeave * :GoogleCommentsFetchComments
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
source ~/.vim/prefs/google_comments.vim
|
|
||||||
|
|
||||||
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/vim-imp
|
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/vim-imp
|
||||||
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch
|
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch
|
||||||
|
|
||||||
|
@ -29,9 +29,10 @@ vmap <leader>v c<ESC>"+p<ESC>
|
|||||||
imap <leader>v <ESC>"+pa
|
imap <leader>v <ESC>"+pa
|
||||||
|
|
||||||
" Copy to OS clipboard
|
" Copy to OS clipboard
|
||||||
" vnoremap <silent><Leader>y "yy <Bar> :call system('xclip', @y)<CR>
|
vnoremap <leader>y "yy <Bar> :call system('xclip', @y)<CR>
|
||||||
map <leader>y !xclip -selection clipboard
|
map <leader>y "yy <Bar> :call system('xclip', @y)<CR>
|
||||||
vmap <leader>y !xclip -selection clipboard<cr>
|
" map <leader>y !xclip -selection clipboard
|
||||||
|
" vmap <leader>y !xclip -selection clipboard<cr>
|
||||||
" map <leader>y "+Y
|
" map <leader>y "+Y
|
||||||
" vmap <leader>y "+y
|
" vmap <leader>y "+y
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ let g:NERDCommentEmptyLines = 1
|
|||||||
" Enable trimming of trailing whitespace when uncommenting
|
" Enable trimming of trailing whitespace when uncommenting
|
||||||
let g:NERDTrimTrailingWhitespace = 1
|
let g:NERDTrimTrailingWhitespace = 1
|
||||||
|
|
||||||
"Enable NERDCommenterToggle to check all selected lines is commented or not
|
"Enable NERDCommenterToggle to check all selected lines is commented or not
|
||||||
let g:NERDToggleCheckAllLines = 1
|
let g:NERDToggleCheckAllLines = 1
|
||||||
|
|
||||||
nnoremap <leader>c<Space> :call nerdcommenter#Comment(0,"toggle")<CR>
|
nnoremap <leader>c<Space> :call nerdcommenter#Comment(0,"toggle")<CR>
|
||||||
@ -112,3 +113,5 @@ nmap <leader>e :e %%
|
|||||||
" replace currently selected text with default register
|
" replace currently selected text with default register
|
||||||
" without yanking it
|
" without yanking it
|
||||||
vnoremap <leader>p "_dP
|
vnoremap <leader>p "_dP
|
||||||
|
|
||||||
|
nnoremap <leader>rp :VimuxOpenRunner<cr> :VimuxRunCommand '!!'<cr> :call VimuxSendKeys("Enter")<cr>
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
" ONE LINERS ONLY
|
|
||||||
" set statusline+=%#warningmsg#
|
|
||||||
" set statusline+=%{SyntasticStatuslineFlag()}
|
|
||||||
" set statusline+=%*
|
|
||||||
set statusline=%{pathshorten(expand('%:f'))}
|
|
||||||
|
|
||||||
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
|
|
@ -43,8 +43,7 @@ Plug 'junegunn/gv.vim' " git commit browser
|
|||||||
Plug 'tpope/vim-git'
|
Plug 'tpope/vim-git'
|
||||||
Plug 'airblade/vim-gitgutter' " live git diff gutter
|
Plug 'airblade/vim-gitgutter' " live git diff gutter
|
||||||
Plug 'tmux-plugins/vim-tmux' " tmux
|
Plug 'tmux-plugins/vim-tmux' " tmux
|
||||||
Plug 'benmills/vimux'
|
Plug 'preservim/vimux'
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
|
||||||
Plug 'christoomey/vim-tmux-navigator' " tmux
|
Plug 'christoomey/vim-tmux-navigator' " tmux
|
||||||
Plug 'ferrine/md-img-paste.vim' " copy-paste images to markdown
|
Plug 'ferrine/md-img-paste.vim' " copy-paste images to markdown
|
||||||
Plug 'junegunn/vim-easy-align' " markdown table aligns
|
Plug 'junegunn/vim-easy-align' " markdown table aligns
|
||||||
@ -127,3 +126,8 @@ Plug 'kristiandupont/shades-of-teal'
|
|||||||
Plug 'joshdick/onedark.vim'
|
Plug 'joshdick/onedark.vim'
|
||||||
Plug 'google/vim-colorscheme-primary'
|
Plug 'google/vim-colorscheme-primary'
|
||||||
Plug 'kyoz/purify', { 'rtp': 'vim' }
|
Plug 'kyoz/purify', { 'rtp': 'vim' }
|
||||||
|
|
||||||
|
" ONE LINERS ONLY
|
||||||
|
set statusline=%{pathshorten(expand('%:f'))}
|
||||||
|
|
||||||
|
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
|
||||||
|
@ -89,7 +89,6 @@ call plug#begin('~/.vim/plugged')
|
|||||||
|
|
||||||
source ~/.vim/prefs/mappings.vim
|
source ~/.vim/prefs/mappings.vim
|
||||||
source ~/.vim/prefs/leader.vim
|
source ~/.vim/prefs/leader.vim
|
||||||
source ~/.vim/prefs/plug_prefs.vim
|
|
||||||
source ~/.vim/prefs/ui.vim
|
source ~/.vim/prefs/ui.vim
|
||||||
source ~/.vim/prefs/golang.vim
|
source ~/.vim/prefs/golang.vim
|
||||||
source ~/.vim/prefs/ultisnips.vim
|
source ~/.vim/prefs/ultisnips.vim
|
||||||
@ -115,6 +114,7 @@ EOF
|
|||||||
if filereadable(expand("~/use_google"))
|
if filereadable(expand("~/use_google"))
|
||||||
source ~/.vim/prefs/cmp.vim
|
source ~/.vim/prefs/cmp.vim
|
||||||
source ~/.vim/prefs/imp.vim
|
source ~/.vim/prefs/imp.vim
|
||||||
|
source ~/.vim/prefs/google_comments.vim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
filetype plugin on " redundant?
|
filetype plugin on " redundant?
|
||||||
|
@ -89,7 +89,12 @@ get_current_activity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cl_search() {
|
cl_search() {
|
||||||
hg status -n --change . --template= | xargs -i sh -c "echo {} && grep '$1' {}"
|
# hg status -n --change . --template= | xargs -i sh -c "echo {} && grep '$1' {}"
|
||||||
|
rg --ignore-case $1 $(hg pstatus -ma -n --template= -- 2>/dev/null)
|
||||||
|
}
|
||||||
|
|
||||||
|
todos() {
|
||||||
|
cl_search "TODO"
|
||||||
}
|
}
|
||||||
|
|
||||||
cl_replace() {
|
cl_replace() {
|
||||||
|
Reference in New Issue
Block a user