stuff
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
%include /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgshort.hgrc
|
%include /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgshort.hgrc
|
||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
editor = vim
|
editor = nvim
|
||||||
paginate = never
|
paginate = never
|
||||||
merge = vimdiff
|
merge = vimdiff
|
||||||
username = Christian Nieves <cnieves@google.com>
|
username = Christian Nieves <cnieves@google.com>
|
||||||
@ -41,6 +41,7 @@ changeset = {desc}\n\n
|
|||||||
|
|
||||||
[alias]
|
[alias]
|
||||||
whatsout = status -n --change . --template=hgshort_status
|
whatsout = status -n --change . --template=hgshort_status
|
||||||
|
what = status -n --change . --template=hgshort_status
|
||||||
whatsoutall = status --rev p4base --no-status --template=hgshort_status
|
whatsoutall = status --rev p4base --no-status --template=hgshort_status
|
||||||
# unbranch = cp --forget --at-rev . $1
|
# unbranch = cp --forget --at-rev . $1
|
||||||
unbranch = !$HG uncommit --keep $1 && $HG forget $1 && $HG add $1 && $HG amend $1
|
unbranch = !$HG uncommit --keep $1 && $HG forget $1 && $HG add $1 && $HG amend $1
|
||||||
|
@ -66,14 +66,14 @@ set -g mode-style bg=brightcyan,fg=black
|
|||||||
set -g message-style bg=brightblack,fg=cyan
|
set -g message-style bg=brightblack,fg=cyan
|
||||||
set -g message-command-style bg=brightblack,fg=cyan
|
set -g message-command-style bg=brightblack,fg=cyan
|
||||||
|
|
||||||
set -g status-style fg=white,bg=black
|
set -g status-style fg=white,bg=default
|
||||||
set -g status-left '#{?pane_synchronized, ¤ ,}#{?window_zoomed_flag, ↕ ,}'
|
set -g status-left '#{?pane_synchronized, ¤ ,}#{?window_zoomed_flag, ↕ ,}'
|
||||||
|
|
||||||
set -g status-right "#{cpu_bg_color}#{cpu_fg_color} CPU:#{cpu_percentage} #{fg=black}$right_alt_sep#{ram_fg_color}#{ram_bg_color} RAM:#{ram_percentage} #{ram_bg_color} #[fg=black]$right_sep#[fg=default]#[bg=default] #H"
|
set -g status-right "#{cpu_bg_color}#{cpu_fg_color} CPU:#{cpu_percentage} #{fg=black}$right_alt_sep#{ram_fg_color}#{ram_bg_color} RAM:#{ram_percentage} #{ram_bg_color} #[fg=black]$right_sep#[fg=default]#[bg=default] #H"
|
||||||
set -g status-right-length 55
|
set -g status-right-length 55
|
||||||
|
|
||||||
set -g pane-border-style fg=brightblack,bg=black
|
set -g pane-border-style fg=brightblack,bg=default
|
||||||
set -g pane-active-border-style fg=colour104,bg=black
|
set -g pane-active-border-style fg=colour104,bg=default
|
||||||
|
|
||||||
set-window-option -g window-status-style fg=colour104,bg=default
|
set-window-option -g window-status-style fg=colour104,bg=default
|
||||||
set-window-option -g window-status-current-style fg=colour147,bg=default
|
set-window-option -g window-status-current-style fg=colour147,bg=default
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
|
vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
|
||||||
|
|
||||||
|
local colors = require("catppuccin.palettes").get_palette()
|
||||||
|
|
||||||
require("catppuccin").setup({
|
require("catppuccin").setup({
|
||||||
compile_path = vim.fn.stdpath("cache") .. "/catppuccin",
|
compile_path = vim.fn.stdpath("cache") .. "/catppuccin",
|
||||||
transparent_background = false,
|
transparent_background = false,
|
||||||
term_colors = false,
|
term_colors = false,
|
||||||
dim_inactive = {
|
dim_inactive = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
shade = "dark",
|
shade = "dark",
|
||||||
percentage = 0.15,
|
percentage = 0.15,
|
||||||
},
|
},
|
||||||
@ -83,5 +87,15 @@ require("catppuccin").setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
color_overrides = {},
|
color_overrides = {},
|
||||||
custom_highlights = {},
|
custom_highlights = {
|
||||||
|
-- Type = { fg = colors.blue },
|
||||||
|
-- Function = { fg = colors.sapphire },
|
||||||
|
-- Identifier = { fg = colors.mauve },
|
||||||
|
-- --
|
||||||
|
Function = { fg = colors.mauve },
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require('catppuccin').compile()
|
||||||
|
|
||||||
|
vim.api.nvim_command "colorscheme catppuccin"
|
||||||
|
@ -4,7 +4,8 @@ require("trouble").setup({
|
|||||||
height = 10, -- height of the trouble list when position is top or bottom
|
height = 10, -- height of the trouble list when position is top or bottom
|
||||||
width = 50, -- width of the list when position is left or right
|
width = 50, -- width of the list when position is left or right
|
||||||
icons = true, -- use devicons for filenames
|
icons = true, -- use devicons for filenames
|
||||||
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
-- mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||||
|
mode = "document_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||||
fold_open = "", -- icon used for open folds
|
fold_open = "", -- icon used for open folds
|
||||||
fold_closed = "", -- icon used for closed folds
|
fold_closed = "", -- icon used for closed folds
|
||||||
group = true, -- group results by file
|
group = true, -- group results by file
|
||||||
|
40
vim/.vim/lua/google_comments.lua
Normal file
40
vim/.vim/lua/google_comments.lua
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
-- 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,
|
||||||
|
}
|
||||||
|
-- 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 = ''})
|
@ -1,11 +1,12 @@
|
|||||||
-- 1. Configure CiderLSP
|
-- 1. Configure CiderLSP
|
||||||
local nvim_lsp = require("lspconfig")
|
local nvim_lsp = require("lspconfig")
|
||||||
local configs = require("lspconfig.configs")
|
local configs = require("lspconfig.configs")
|
||||||
|
local notify = require 'notify'
|
||||||
configs.ciderlsp = {
|
configs.ciderlsp = {
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-lsp", "--forward_sync_responses", "--enable_semantic_tokens", "--relay_mode=true", "--hub_addr=blade:languageservices-staging" ,"--enable_document_highlight"},
|
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-cmp", "--forward_sync_responses", "--enable_semantic_tokens", "--relay_mode=true", "--hub_addr=blade:languageservices-staging" ,"--enable_document_highlight"},
|
||||||
-- cmd = {'/google/bin/releases/cider/ciderlsp/ciderlsp', '--forward_sync_responses', '--enable_document_highlight'};
|
-- cmd = {'/google/bin/releases/cider/ciderlsp/ciderlsp', '--forward_sync_responses', '--enable_document_highlight'};
|
||||||
filetypes = { "c", "cpp", "java", "kotlin", "proto", "textproto", "go", "python", "bzl" },
|
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
||||||
root_dir = nvim_lsp.util.root_pattern("BUILD"),
|
root_dir = nvim_lsp.util.root_pattern("BUILD"),
|
||||||
settings = {},
|
settings = {},
|
||||||
},
|
},
|
||||||
@ -121,8 +122,9 @@ cmp.setup({
|
|||||||
with_text = true,
|
with_text = true,
|
||||||
maxwidth = 40, -- half max width
|
maxwidth = 40, -- half max width
|
||||||
menu = {
|
menu = {
|
||||||
nvim_ciderlsp = "[🤖]",
|
-- nvim_ciderlsp = "[]",
|
||||||
buffer = "[buffer]",
|
nvim_ciderlsp = "",
|
||||||
|
buffer = "",
|
||||||
nvim_lsp = "[CiderLSP]",
|
nvim_lsp = "[CiderLSP]",
|
||||||
nvim_lua = "[API]",
|
nvim_lua = "[API]",
|
||||||
path = "[path]",
|
path = "[path]",
|
||||||
@ -157,7 +159,7 @@ cider_lsp_handlers["$/syncResponse"] = function(_, result, ctx)
|
|||||||
local first_fire = vim.b['is_cider_lsp_attached'] == 'no'
|
local first_fire = vim.b['is_cider_lsp_attached'] == 'no'
|
||||||
vim.b['is_cider_lsp_attached'] = 'yes'
|
vim.b['is_cider_lsp_attached'] = 'yes'
|
||||||
if first_fire then
|
if first_fire then
|
||||||
require('notify')('CiderLSP attached', 'info', {timeout=150})
|
notify('CiderLSP attached', 'info', {timeout=500})
|
||||||
require('lualine').refresh()
|
require('lualine').refresh()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -169,6 +171,23 @@ cider_lsp_handlers["workspace/diagnostic/refresh"] = function(_, result, ctx)
|
|||||||
VPrint(ctx)
|
VPrint(ctx)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
cider_lsp_handlers['window/showMessage'] = function(_, result, ctx)
|
||||||
|
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||||
|
local lvl = ({
|
||||||
|
'ERROR',
|
||||||
|
'WARN',
|
||||||
|
'INFO',
|
||||||
|
'DEBUG',
|
||||||
|
})[result.type]
|
||||||
|
notify({ result.message }, lvl, {
|
||||||
|
title = 'LSP | ' .. client.name,
|
||||||
|
timeout = 1000,
|
||||||
|
keep = function()
|
||||||
|
return lvl == 'ERROR' or lvl == 'WARN'
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- 3. Set up CiderLSP
|
-- 3. Set up CiderLSP
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
vim.b['is_cider_lsp_attached'] = 'no'
|
vim.b['is_cider_lsp_attached'] = 'no'
|
||||||
|
@ -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 * :lua require('google.comments').update_signs()
|
||||||
autocmd InsertLeave * :GoogleCommentsFetchComments
|
autocmd InsertLeave * :GoogleCommentsFetchComments
|
||||||
|
@ -35,7 +35,6 @@ Plug 'rcarriga/nvim-notify'
|
|||||||
Plug 'nathanaelkane/vim-indent-guides'
|
Plug 'nathanaelkane/vim-indent-guides'
|
||||||
Plug 'Konfekt/vim-scratchpad'
|
Plug 'Konfekt/vim-scratchpad'
|
||||||
Plug 'guns/xterm-color-table.vim'
|
Plug 'guns/xterm-color-table.vim'
|
||||||
Plug 'kyazdani42/nvim-web-devicons'
|
|
||||||
Plug 'mbbill/undotree'
|
Plug 'mbbill/undotree'
|
||||||
Plug 'tversteeg/registers.nvim', { 'branch': 'main' }
|
Plug 'tversteeg/registers.nvim', { 'branch': 'main' }
|
||||||
" Plug 'ryanoasis/vim-devicons'
|
" Plug 'ryanoasis/vim-devicons'
|
||||||
@ -131,6 +130,7 @@ 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' }
|
||||||
|
Plug 'kyazdani42/nvim-web-devicons'
|
||||||
|
|
||||||
" ONE LINERS ONLY
|
" ONE LINERS ONLY
|
||||||
set statusline=%{pathshorten(expand('%:f'))}
|
set statusline=%{pathshorten(expand('%:f'))}
|
||||||
|
27
vim/.vimrc
27
vim/.vimrc
@ -75,6 +75,8 @@ let g:clipboard = #{
|
|||||||
\ cache_enabled: 1,
|
\ cache_enabled: 1,
|
||||||
\ }
|
\ }
|
||||||
set shortmess=A
|
set shortmess=A
|
||||||
|
set modifiable
|
||||||
|
set omnifunc= completeopt=menuone,noinsert,noselect
|
||||||
|
|
||||||
set updatetime=100
|
set updatetime=100
|
||||||
|
|
||||||
@ -105,6 +107,7 @@ 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
|
source ~/.vim/prefs/google_comments.vim
|
||||||
|
lua require("google_comments")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
filetype plugin on " redundant?
|
filetype plugin on " redundant?
|
||||||
@ -143,16 +146,26 @@ endif
|
|||||||
set background=dark
|
set background=dark
|
||||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||||
|
|
||||||
" colorscheme quantum
|
|
||||||
let g:catppuccin_flavour = "macchiato" " latte, frappe, macchiato, mocha
|
|
||||||
colorscheme catppuccin
|
|
||||||
let g:airline_theme='quantum'
|
|
||||||
|
|
||||||
set modifiable
|
|
||||||
set omnifunc= completeopt=menuone,noinsert,noselect
|
|
||||||
|
|
||||||
let g:lsp_log_verbose = 1
|
let g:lsp_log_verbose = 1
|
||||||
let g:lsp_log_file = expand('~/vim-lsp.log')
|
let g:lsp_log_file = expand('~/vim-lsp.log')
|
||||||
|
|
||||||
"Don't ask to save when changing buffers (i.e. when jumping to a type definition)
|
"Don't ask to save when changing buffers (i.e. when jumping to a type definition)
|
||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
|
function! GenerateUnicode(first, last)
|
||||||
|
let i = a:first
|
||||||
|
while i <= a:last
|
||||||
|
if (i%256 == 0)
|
||||||
|
$put ='----------------------------------------------------'
|
||||||
|
$put =' 0 1 2 3 4 5 6 7 8 9 A B C D E F '
|
||||||
|
$put ='----------------------------------------------------'
|
||||||
|
endif
|
||||||
|
let c = printf('%04X ', i)
|
||||||
|
for j in range(16)
|
||||||
|
let c = c . nr2char(i) . ' '
|
||||||
|
let i += 1
|
||||||
|
endfor
|
||||||
|
$put =c
|
||||||
|
endwhile
|
||||||
|
endfunction
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
alias go=colorgo
|
alias go=colorgo
|
||||||
alias vim='nvim'
|
alias vim='nvim'
|
||||||
|
alias vimdiff='nvim -d'
|
||||||
# alias cat='bat'
|
# alias cat='bat'
|
||||||
alias ls='exa'
|
alias ls='exa'
|
||||||
alias mux='tmuxinator'
|
alias mux='tmuxinator'
|
||||||
|
Reference in New Issue
Block a user