various stuff
This commit is contained in:
@ -1,12 +1,8 @@
|
|||||||
-- Here are all the options and their default values:
|
-- Here are all the options and their default values:
|
||||||
require('google.comments').setup {
|
require('google.comments').setup {
|
||||||
-- The command for fetching comments, refer to `get_comments.par --help` to
|
|
||||||
-- 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', '--full', '--json', "-x=''"},
|
||||||
stubby = true,
|
-- stubby = true,
|
||||||
--
|
|
||||||
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments'},
|
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments'},
|
||||||
-- /google/bin/releases/editor-devtools/get_comments.par --json --full --noresolved --cl_comments --file_comments -x "" --cl 487267122
|
|
||||||
-- command = {'stubby --output_json call blade:codereview-rpc CodereviewRpcService.GetComments "changelist_number: $(/google/data/ro/teams/fig/bin/vcstool pending-change-number)"'},
|
-- command = {'stubby --output_json call blade:codereview-rpc CodereviewRpcService.GetComments "changelist_number: $(/google/data/ro/teams/fig/bin/vcstool pending-change-number)"'},
|
||||||
-- 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
|
||||||
@ -20,18 +16,38 @@ require('google.comments').setup {
|
|||||||
width = 50,
|
width = 50,
|
||||||
-- 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
|
--- Enable viewing comments through floating window
|
||||||
floating = true,
|
floating = true,
|
||||||
--- Options used when creating the floating window.
|
--- Options used when creating the floating window.
|
||||||
floating_window_options = require('google.comments.options').default_floating_window_options,
|
floating_window_options = floating_window_options
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function floating_window_options(parent_win_id)
|
||||||
|
local parent_width = vim.api.nvim_win_get_width(parent_win_id)
|
||||||
|
local parent_height = vim.api.nvim_win_get_height(parent_win_id)
|
||||||
|
|
||||||
|
return {
|
||||||
|
relative = 'win',
|
||||||
|
anchor = 'NW',
|
||||||
|
width = math.floor(parent_width * 0.5),
|
||||||
|
height = math.floor(parent_height * 0.3),
|
||||||
|
row = vim.api.nvim_win_get_cursor(parent_win_id)[1],
|
||||||
|
col = math.floor(parent_width * 0.25),
|
||||||
|
border = 'rounded',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local map = require("utils").map
|
local map = require("utils").map
|
||||||
-- here are some mappings you might want:
|
-- here are some mappings you might want:
|
||||||
map('n', '<Leader>nc', [[<Cmd>lua require('google.comments').goto_next_comment()<CR>]])
|
map('n', '[c', [[<Cmd>GoogleCommentsGotoNextComment<CR>]])
|
||||||
map('n', '<Leader>pc', [[<Cmd>lua require('google.comments').goto_prev_comment()<CR>]])
|
map('n', ']c', [[<Cmd>GoogleCommentsGotoPrevComment<CR>]])
|
||||||
map('n', '<Leader>lc', [[<Cmd>lua require('google.comments').toggle_line_comments()<CR>]])
|
|
||||||
map('n', '<Leader>ac', [[<Cmd>lua require('google.comments').toggle_all_comments()<CR>]])
|
map('n', '<Leader>nc', [[<Cmd>GoogleCommentsGotoNextComment<CR>]])
|
||||||
|
map('n', '<Leader>pc', [[<Cmd>GoogleCommentsGotoPrevComment<CR>]])
|
||||||
|
map('n', '<Leader>lc', [[<Cmd>GoogleCommentsToggleLineComments<CR>]])
|
||||||
|
map('n', '<Leader>ac', [[<Cmd>GoogleCommentsToggleAllComments<CR>]])
|
||||||
|
map('n', '<Leader>fc', [[<Cmd>GoogleCommentsFetchComments<CR>]])
|
||||||
|
|
||||||
vim.fn.sign_define('COMMENT_ICON', {text = ''})
|
vim.fn.sign_define('COMMENT_ICON', {text = ''})
|
||||||
|
@ -19,7 +19,8 @@ if use_google() then
|
|||||||
-- To search for imports in the file's parent directory before using Code Search across all of google3, install ripgrep and try
|
-- To search for imports in the file's parent directory before using Code Search across all of google3, install ripgrep and try
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
Glaive imp Suggest[gcl]=buffer,ripgrep,csearch,prompt
|
Glaive imp Suggest[gcl]=buffer,ripgrep,csearch,prompt
|
||||||
\ Suggest[borg]=buffer,ripgrep,csearch,prompt
|
|
||||||
\ Location[gcl]=parent Location[borg]=parent
|
\ Location[gcl]=parent Location[borg]=parent
|
||||||
|
\ Suggest[borg]=buffer,ripgrep,csearch,prompt
|
||||||
|
\ Suggest[aidl]=buffer,ripgrep,csearch,prompt
|
||||||
]])
|
]])
|
||||||
end
|
end
|
||||||
|
4
vim/.vim/lua/config/signify.lua
Normal file
4
vim/.vim/lua/config/signify.lua
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
local map = require("utils").map
|
||||||
|
|
||||||
|
map('n', ']d', '<plug>(signify-next-hunk)')
|
||||||
|
map('n', '[d', '<plug>(signify-prev-hunk)')
|
@ -277,7 +277,11 @@ require('packer').startup(function(use)
|
|||||||
|
|
||||||
use 'tpope/vim-surround'
|
use 'tpope/vim-surround'
|
||||||
use 'scrooloose/nerdcommenter'
|
use 'scrooloose/nerdcommenter'
|
||||||
use 'mhinz/vim-signify'
|
|
||||||
|
use 'mhinz/vim-signify' {
|
||||||
|
config= [[require('config.signify')]]
|
||||||
|
}
|
||||||
|
|
||||||
use { 'j-hui/fidget.nvim', config = [[require("fidget").setup()]] }
|
use { 'j-hui/fidget.nvim', config = [[require("fidget").setup()]] }
|
||||||
use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, })
|
use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, })
|
||||||
|
|
||||||
|
@ -177,11 +177,10 @@ nnoremap <leader>ps :FzfHgFiles<CR>
|
|||||||
nnoremap <leader>pl :PiperLoadActiveAsBuffers<CR>
|
nnoremap <leader>pl :PiperLoadActiveAsBuffers<CR>
|
||||||
nnoremap <leader>po :PiperOpenPath<CR>
|
nnoremap <leader>po :PiperOpenPath<CR>
|
||||||
|
|
||||||
" search in codesearch for the word under the cursor
|
|
||||||
nnoremap <leader>ws :CorpWebCs <cword> <CR>
|
|
||||||
" search in codesearch for the current file
|
|
||||||
nnoremap <leader>wf :CorpWebCsFile<CR>
|
|
||||||
|
|
||||||
nmap <leader>rbs ss <leader>rb
|
nmap <leader>rbs ss <leader>rb
|
||||||
|
|
||||||
nmap <leader>yb :let @" = join(blaze#GetTargets(), ' ')<cr>
|
nmap <leader>yb :let @" = join(blaze#GetTargets(), ' ')<cr>
|
||||||
|
|
||||||
|
Glug corpweb
|
||||||
|
nnoremap <leader>csw :CorpWebCsFile<cr>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user