This commit is contained in:
Christian Nieves
2022-10-18 23:32:44 +00:00
parent 21837e0336
commit 99215a3333
10 changed files with 109 additions and 63 deletions

View File

@ -1,45 +1,2 @@
lua << EOF
-- Here are all the options and their default values:
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', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments', ' -x ""'},
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
-- See :help sign_define
-- The sign property passed to setup should be the 'ICON_NAME' in the define
-- example above.
sign = 'COMMENT_ICON',
-- Fetch the comments after calling `setup`.
auto_fetch = true,
display = {
-- The width of the comment display window.
width = 50,
-- When showing file paths, use relative paths or not.
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:
vim.api.nvim_set_keymap('n', '<Leader>nc',
[[<Cmd>lua require('google.comments').goto_next_comment()<CR>]],
{ noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>pc',
[[<Cmd>lua require('google.comments').goto_prev_comment()<CR>]],
{ noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>lc',
[[<Cmd>lua require('google.comments').toggle_line_comments()<CR>]],
{ noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>ac',
[[<Cmd>lua require('google.comments').toggle_all_comments()<CR>]],
{ noremap = true, silent = true })
vim.fn.sign_define('COMMENT_ICON', {text = ''})
EOF
autocmd InsertLeave * :lua require('google.comments').update_signs()
autocmd InsertLeave * :GoogleCommentsFetchComments

View File

@ -35,7 +35,6 @@ Plug 'rcarriga/nvim-notify'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'Konfekt/vim-scratchpad'
Plug 'guns/xterm-color-table.vim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'mbbill/undotree'
Plug 'tversteeg/registers.nvim', { 'branch': 'main' }
" Plug 'ryanoasis/vim-devicons'
@ -131,6 +130,7 @@ Plug 'kristiandupont/shades-of-teal'
Plug 'joshdick/onedark.vim'
Plug 'google/vim-colorscheme-primary'
Plug 'kyoz/purify', { 'rtp': 'vim' }
Plug 'kyazdani42/nvim-web-devicons'
" ONE LINERS ONLY
set statusline=%{pathshorten(expand('%:f'))}