cleanup
This commit is contained in:
@ -2,7 +2,7 @@ vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
|
||||
local colors = require("catppuccin.palettes").get_palette()
|
||||
|
||||
require("catppuccin").setup({
|
||||
flavour = vim.g.catppuccin_flavour, --"macchiato",
|
||||
flavour = "macchiato",
|
||||
integrations = {
|
||||
cmp = true,
|
||||
-- coc_nvim = false,
|
||||
|
@ -1,40 +1,36 @@
|
||||
-- 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', '--unreplied_only', ' -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,
|
||||
-- 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=''"},
|
||||
stubby = true,
|
||||
--
|
||||
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--resolved', '--cl_comments', '--file_comments'},
|
||||
-- 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 = ' '})`.
|
||||
-- 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,
|
||||
}
|
||||
|
||||
local map = require("utils").map
|
||||
-- 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 })
|
||||
map('n', '<Leader>nc', [[<Cmd>lua require('google.comments').goto_next_comment()<CR>]])
|
||||
map('n', '<Leader>pc', [[<Cmd>lua require('google.comments').goto_prev_comment()<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>]])
|
||||
|
||||
vim.fn.sign_define('COMMENT_ICON', {text = ''})
|
||||
|
@ -30,6 +30,19 @@ local function getLightbulb()
|
||||
return require('nvim-lightbulb').get_status_text()
|
||||
end
|
||||
|
||||
local comments = require("google.comments")
|
||||
local tracker = require("google.comments.tracker")
|
||||
local dump = require("utils").dump
|
||||
|
||||
local function getLGTMs()
|
||||
print(dump(tracker.get_all_comments()))
|
||||
local lgtm = comments.get_lgtms()
|
||||
local appr = comments.get_approvals()
|
||||
print("lgtms"..dump(lgtm))
|
||||
print("approvals"..dump(appr))
|
||||
return "LGTM:"..table.concat(lgtm, ",").." Approval:"..table.concat(appr, ",")
|
||||
end
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'auto',
|
||||
@ -58,7 +71,8 @@ require('lualine').setup {
|
||||
-- lualine_c = {'filename'},
|
||||
lualine_x = {
|
||||
{ 'diagnostics', sources = {"nvim_lsp", "nvim_workspace_diagnostic"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
||||
}
|
||||
},
|
||||
-- lualine_y = { getLGTMs }
|
||||
},
|
||||
-- default
|
||||
-- sections = {
|
||||
|
@ -2,3 +2,4 @@ local colors = require("catppuccin.palettes").get_palette()
|
||||
require("notify").setup({
|
||||
background_colour = colors.base,
|
||||
})
|
||||
vim.notify = require("notify")
|
||||
|
@ -6,12 +6,15 @@ if fn.empty(fn.glob(install_path)) > 0 then
|
||||
end
|
||||
|
||||
vim.cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||
augroup end
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||
augroup end
|
||||
]])
|
||||
|
||||
|
||||
local file_exists = require("utils").file_exists
|
||||
|
||||
require('packer').startup(function(use)
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
@ -41,6 +44,7 @@ require('packer').startup(function(use)
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'lukas-reineke/cmp-under-comparator',
|
||||
'williamboman/nvim-lsp-installer',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'f3fora/cmp-spell',
|
||||
'hrsh7th/cmp-nvim-lsp-document-symbol',
|
||||
@ -78,12 +82,34 @@ require('packer').startup(function(use)
|
||||
}
|
||||
end
|
||||
}
|
||||
use 'sso://googler@user/vintharas/telescope-codesearch.nvim'
|
||||
|
||||
use {
|
||||
'sso://googler@user/vintharas/telescope-codesearch.nvim',
|
||||
cond = file_exists(os.getenv("HOME").."/use_google"),
|
||||
}
|
||||
|
||||
use {
|
||||
-- 'sso://googler@user/chmnchiang/google-comments',
|
||||
-- '/google/src/head/depot/google3/experimental/users/chmnchiang/neovim/google-comments',
|
||||
'/google/src/cloud/cnieves/google-comments/google3/experimental/users/chmnchiang/neovim/google-comments',
|
||||
cond = file_exists(os.getenv("HOME").."/use_google"),
|
||||
requires = {'rcarriga/nvim-notify', 'nvim-lua/plenary.nvim'},
|
||||
config = [[ require("google_comments") ]]
|
||||
}
|
||||
|
||||
use {
|
||||
'/google/src/cloud/cnieves/google-comments/google3/experimental/users/cnieves/neovim/critique',
|
||||
config = [[ require("critique").setup() ]]
|
||||
}
|
||||
|
||||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = [[ require("lualine_config") ]]
|
||||
}
|
||||
use 'rcarriga/nvim-notify'
|
||||
use {
|
||||
'rcarriga/nvim-notify',
|
||||
config = [[ require("notify_config") ]]
|
||||
}
|
||||
|
||||
-- Git
|
||||
use {
|
||||
@ -158,7 +184,6 @@ require("lsp")
|
||||
require("diagnostics")
|
||||
require("treesitter")
|
||||
require("telescope_config")
|
||||
require("notify_config")
|
||||
require("symbols-outline-config")
|
||||
require("spell_config")
|
||||
|
||||
|
@ -8,4 +8,22 @@ function M.map(mode, lhs, rhs, opts)
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
function M.file_exists(name)
|
||||
local f=io.open(name,"r")
|
||||
if f~=nil then io.close(f) return true else return false end
|
||||
end
|
||||
|
||||
function M.dump(o)
|
||||
if type(o) == 'table' then
|
||||
local s = '{ '
|
||||
for k,v in pairs(o) do
|
||||
if type(k) ~= 'number' then k = '"'..k..'"' end
|
||||
s = s .. '['..k..'] = ' .. dump(v) .. ','
|
||||
end
|
||||
return s .. '} '
|
||||
else
|
||||
return tostring(o)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
Submodule vim/.vim/plugged/google-comments deleted from ad50cd3c71
Submodule vim/.vim/plugged/nvim-lsp-installer deleted from 23820a878a
Submodule vim/.vim/plugged/vim-signify deleted from 8bc268c79d
@ -1,76 +0,0 @@
|
||||
" AirLine visual settings
|
||||
if !exists('g:airline_symbols')
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
|
||||
let g:airline_theme='onedark'
|
||||
" let g:airline_stl_path_style = 'short'
|
||||
|
||||
let g:airline#extensions#coc#enabled = 1
|
||||
|
||||
let g:airline_left_sep=''
|
||||
let g:airline_left_alt_sep = ''
|
||||
let g:airline_right_sep=''
|
||||
let g:airline_right_alt_sep = ''
|
||||
let g:airline_symbols.branch = ''
|
||||
let g:airline_symbols.readonly = ''
|
||||
let g:airline_symbols.dirty = ''
|
||||
let g:airline_symbols.linenr = ''
|
||||
"let g:airline_symbols.whitespace = 'Ξ'
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
|
||||
let g:airline#extensions#tabline#show_buffers = 0
|
||||
let g:airline#extensions#tabline#show_splits = 1
|
||||
let g:airline#extensions#tabline#show_tabs = 1
|
||||
let g:airline#extensions#tabline#show_tab_nr = 0
|
||||
let g:airline#extensions#tabline#show_tab_type = 0
|
||||
let g:airline#extensions#tabline#exclude_preview = 1
|
||||
let g:airline#extensions#tabline#show_close_button = 0
|
||||
let g:airline#extensions#tabline#fnamemod = ':t'
|
||||
|
||||
lua << EOF
|
||||
function getCitc()
|
||||
local fname = vim.api.nvim_buf_get_name(0)
|
||||
if string.find(fname, '/google/src/cloud/', 1, true) then
|
||||
local parts = split(fname, '/')
|
||||
return parts[5]
|
||||
end
|
||||
end
|
||||
EOF
|
||||
|
||||
" let g:airline_section_c = execute("lua getCitc()")
|
||||
let g:airline_mode_map = {
|
||||
\ '__' : '------',
|
||||
\ 'n' : 'NORMAL',
|
||||
\ 'c' : 'COMMAND',
|
||||
\ 'i' : 'INSERT',
|
||||
\ 'R' : 'REPLACE',
|
||||
\ 's' : 'SELECT',
|
||||
\ 'S' : 'S-LINE',
|
||||
\ '' : 'S-BLOCK',
|
||||
\ 'v' : 'VISUAL',
|
||||
\ 'V' : 'V-LINE',
|
||||
\ '' : 'V-BLOCK',
|
||||
\ }
|
||||
|
||||
let g:PaperColor_Theme_Options = {
|
||||
\ 'language': {
|
||||
\ 'python': {
|
||||
\ 'highlight_builtins' : 1
|
||||
\ },
|
||||
\ 'cpp': {
|
||||
\ 'highlight_standard_library': 1
|
||||
\ },
|
||||
\ 'c': {
|
||||
\ 'highlight_builtins' : 1
|
||||
\ }
|
||||
\ },
|
||||
\ 'theme': {
|
||||
\ 'default.dark': {
|
||||
\ 'transparent_background': 1
|
||||
\ }
|
||||
\ }
|
||||
\ }
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
function! s:FindProjectRoot(buffer) abort
|
||||
for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h'))
|
||||
if filereadable(l:path . '/BUILD')
|
||||
return l:path
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
let ciderlsp = {
|
||||
\ 'name': 'CiderLSP',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': '/google/bin/releases/cider/ciderlsp/ciderlsp',
|
||||
\ 'command': '%e --noforward_sync_responses',
|
||||
\ 'project_root': function('s:FindProjectRoot'),
|
||||
\}
|
||||
|
||||
call ale#linter#Define('java', ciderlsp)
|
||||
let g:ale_lint_on_save = 1
|
||||
let g:ale_detail_to_floating_preview = 1
|
||||
let g:ale_linters={'java': ['CiderLSP']}
|
||||
let g:ale_completion_enabled = 1
|
@ -1,53 +0,0 @@
|
||||
Plug 'prabirshrestha/vim-lsp'
|
||||
Plug 'prabirshrestha/asyncomplete.vim'
|
||||
Plug 'prabirshrestha/asyncomplete-lsp.vim'
|
||||
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'CiderLSP',
|
||||
\ 'cmd': {server_info->[
|
||||
\ '/google/bin/releases/cider/ciderlsp/ciderlsp',
|
||||
\ '--tooltag=vim-lsp',
|
||||
\ '--noforward_sync_responses',
|
||||
\ '-hub_addr=blade:languageservices-staging'
|
||||
\ ]},
|
||||
\ 'allowlist': ['c', 'cpp', 'java', 'kotlin', 'proto', 'textproto', 'go', 'python', 'bzl', 'sql', 'yaml', 'googlesql', 'build', 'typescript', 'gcl', 'soy'],
|
||||
\})
|
||||
|
||||
" Send async completion requests.
|
||||
" WARNING: Might interfere with other completion plugins.
|
||||
let g:lsp_async_completion = 1
|
||||
|
||||
" Enable UI for diagnostics
|
||||
let g:lsp_signs_enabled = 1 " enable diagnostics signs in the gutter
|
||||
let g:lsp_diagnostics_echo_cursor = 1 " enable echo under cursor when in normal mode
|
||||
let g:lsp_diagnostics_float_cursor = 1 " enable floating window diagnostics
|
||||
|
||||
|
||||
" Automatically show completion options
|
||||
let g:asyncomplete_auto_popup = 1
|
||||
|
||||
function! s:on_lsp_buffer_enabled() abort
|
||||
setlocal omnifunc=lsp#complete
|
||||
setlocal signcolumn=yes
|
||||
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
||||
nmap <buffer> gd <plug>(lsp-definition)
|
||||
nmap <buffer> gs <plug>(lsp-document-symbol-search)
|
||||
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
|
||||
nmap <buffer> gr <plug>(lsp-references)
|
||||
nmap <buffer> gi <plug>(lsp-implementation)
|
||||
nmap <buffer> gt <plug>(lsp-type-definition)
|
||||
nmap <buffer> ga <plug>(lsp-code-action)
|
||||
nmap <buffer> <leader>rn <plug>(lsp-rename)
|
||||
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
|
||||
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
|
||||
inoremap <buffer> <expr><c-f> lsp#scroll(+4)
|
||||
inoremap <buffer> <expr><c-d> lsp#scroll(-4)
|
||||
|
||||
nmap <buffer> L <plug>(lsp-hover)
|
||||
endfunction
|
||||
|
||||
augroup lsp_install
|
||||
au!
|
||||
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
|
||||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||
augroup END
|
@ -1,22 +0,0 @@
|
||||
let s:brown = "964B00"
|
||||
let s:aqua = "3AFFDB"
|
||||
let s:blue = "689FB6"
|
||||
let s:darkBlue = "44788E"
|
||||
let s:purple = "834F79"
|
||||
let s:lightPurple = "834F79"
|
||||
let s:red = "AE403F"
|
||||
let s:beige = "F5C06F"
|
||||
let s:yellow = "F09F17"
|
||||
let s:orange = "D4843E"
|
||||
let s:darkOrange = "F16529"
|
||||
let s:pink = "CB6F6F"
|
||||
let s:salmon = "EE6E73"
|
||||
let s:green = "8FAA54"
|
||||
let s:lightGreen = "31B53E"
|
||||
let s:white = "FFFFFF"
|
||||
let s:rspec_red = 'FE405F'
|
||||
let s:git_orange = 'F54D27'
|
||||
|
||||
" If you have vim-devicons you can customize your icons for each file type.
|
||||
let g:NERDTreeExtensionHighlightColor = {} "this line is needed to avoid error
|
||||
let g:NERDTreeExtensionHighlightColor['java'] = s:lightGreen "assigning it to an empty string will skip highlight
|
@ -2,9 +2,7 @@ source /usr/share/vim/google/glug/bootstrap.vim
|
||||
source /usr/share/vim/google/core.vim
|
||||
|
||||
Plug 'vim-scripts/vcscommand.vim'
|
||||
Plug 'sso://user/chmnchiang/google-comments'
|
||||
Plug 'sso://googler@user/piloto/cmp-nvim-ciderlsp'
|
||||
Plug 'williamboman/nvim-lsp-installer'
|
||||
|
||||
let g:signify_skip_filename_pattern = ['\.pipertmp.*']
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
autocmd InsertLeave * :lua require('google.comments').update_signs()
|
||||
autocmd InsertLeave * :GoogleCommentsFetchComments
|
Reference in New Issue
Block a user