stuff
This commit is contained in:
@ -4,6 +4,8 @@ set-option -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CO
|
|||||||
set -g prefix C-a
|
set -g prefix C-a
|
||||||
bind C-a send-prefix
|
bind C-a send-prefix
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
set -g prefix `
|
set -g prefix `
|
||||||
bind-key ` send-prefix
|
bind-key ` send-prefix
|
||||||
|
|
||||||
|
@ -1,25 +1,12 @@
|
|||||||
-- Diagnostics
|
-- Diagnostics
|
||||||
require("trouble").setup({
|
require("trouble").setup({
|
||||||
position = "bottom", -- position of the list can be: bottom, top, left, right
|
|
||||||
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
|
|
||||||
icons = true, -- use devicons for filenames
|
|
||||||
mode = "document_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
|
||||||
-- fold_open = "", -- icon used for open folds
|
|
||||||
-- fold_closed = "", -- icon used for closed folds
|
|
||||||
group = true, -- group results by file
|
|
||||||
padding = true, -- add an extra new line on top of the list
|
|
||||||
indent_lines = true, -- add an indent guide below the fold icons
|
|
||||||
auto_open = false, -- automatically open the list when you have diagnostics
|
|
||||||
auto_close = true, -- automatically close the list when you have no diagnostics
|
|
||||||
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
|
|
||||||
signs = {
|
signs = {
|
||||||
-- icons / text used for a diagnostic
|
-- icons / text used for a diagnostic
|
||||||
error = ' ',
|
error = ' ',
|
||||||
warning = ' ',
|
warning = ' ',
|
||||||
hint = ' ',
|
hint = ' ',
|
||||||
information = ' ',
|
information = ' ',
|
||||||
other = "",
|
other = "?",
|
||||||
},
|
},
|
||||||
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
|
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
|
||||||
})
|
})
|
||||||
|
@ -23,16 +23,22 @@ if use_google() then
|
|||||||
default_config = {
|
default_config = {
|
||||||
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-cmp", "--forward_sync_responses" },
|
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-cmp", "--forward_sync_responses" },
|
||||||
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
||||||
root_dir = lspconfig.util.root_pattern("BUILD"),
|
-- root_dir = lspconfig.util.root_pattern("BUILD"),
|
||||||
|
root_dir = function(fname)
|
||||||
|
return string.match(fname, '(/google/src/cloud/[%w_-]+/[%w_-]+/google3/).+$')
|
||||||
|
end;
|
||||||
settings = {},
|
settings = {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
configs.analysislsp = {
|
configs.analysislsp = {
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = { '/google/bin/users/lerm/glint-ale/analysis_lsp/server', '--lint_on_save=false', '--max_qps=10', },
|
cmd = { '/google/bin/users/lerm/glint-ale/analysis_lsp/server', '--lint_on_save=false', '--max_qps=10' },
|
||||||
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
filetypes = { "c", "cpp", "java", "kotlin", "objc", "proto", "textproto", "go", "python", "bzl" },
|
||||||
root_dir = lspconfig.util.root_pattern('BUILD'),
|
-- root_dir = lspconfig.util.root_pattern('BUILD'),
|
||||||
|
root_dir = function(fname)
|
||||||
|
return string.match(fname, '(/google/src/cloud/[%w_-]+/[%w_-]+/google3/).+$')
|
||||||
|
end;
|
||||||
settings = {},
|
settings = {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -292,7 +298,26 @@ cmp.setup({
|
|||||||
sources = conditionalSources,
|
sources = conditionalSources,
|
||||||
|
|
||||||
sorting = {
|
sorting = {
|
||||||
comparators = { },
|
comparators = {
|
||||||
|
cmp.config.compare.offset,
|
||||||
|
cmp.config.compare.exact,
|
||||||
|
cmp.config.compare.score,
|
||||||
|
function(entry1, entry2)
|
||||||
|
local _, entry1_under = entry1.completion_item.label:find("^_+")
|
||||||
|
local _, entry2_under = entry2.completion_item.label:find("^_+")
|
||||||
|
entry1_under = entry1_under or 0
|
||||||
|
entry2_under = entry2_under or 0
|
||||||
|
if entry1_under > entry2_under then
|
||||||
|
return false
|
||||||
|
elseif entry1_under < entry2_under then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
cmp.config.compare.kind,
|
||||||
|
cmp.config.compare.sort_text,
|
||||||
|
cmp.config.compare.length,
|
||||||
|
cmp.config.compare.order,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
snippet = {
|
snippet = {
|
||||||
|
@ -17,7 +17,7 @@ local function isCiderLspAttached()
|
|||||||
if vim.b['is_cider_lsp_attached'] == 'yes' then
|
if vim.b['is_cider_lsp_attached'] == 'yes' then
|
||||||
return '✓'
|
return '✓'
|
||||||
else
|
else
|
||||||
return 'CiderLSP loading..'
|
return 'LSP..'
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return ''
|
return ''
|
||||||
@ -53,8 +53,8 @@ require('lualine').setup {
|
|||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = {'mode'},
|
||||||
lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached},
|
lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached, 'lsp_progress'},
|
||||||
lualine_c = {'filename', 'lsp_progress', getLightbulb},
|
lualine_c = {'filename', getLightbulb},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
||||||
'encoding',
|
'encoding',
|
||||||
|
@ -110,6 +110,12 @@ require('packer').startup(function(use)
|
|||||||
disable = not use_google(),
|
disable = not use_google(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'sso://googler@user/piloto/cmp-nvim-ciderlsp',
|
||||||
|
'sso://googler@user/kdark/ciderlsp-nvim',
|
||||||
|
disable = not use_google(),
|
||||||
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'sso://googler@user/chmnchiang/google-comments',
|
'sso://googler@user/chmnchiang/google-comments',
|
||||||
-- '/google/src/head/depot/google3/experimental/users/chmnchiang/neovim/google-comments',
|
-- '/google/src/head/depot/google3/experimental/users/chmnchiang/neovim/google-comments',
|
||||||
|
@ -2,7 +2,6 @@ source /usr/share/vim/google/glug/bootstrap.vim
|
|||||||
source /usr/share/vim/google/core.vim
|
source /usr/share/vim/google/core.vim
|
||||||
|
|
||||||
Plug 'vim-scripts/vcscommand.vim'
|
Plug 'vim-scripts/vcscommand.vim'
|
||||||
Plug 'sso://googler@user/piloto/cmp-nvim-ciderlsp'
|
|
||||||
|
|
||||||
let g:VCSCommandDisableMappings = 1
|
let g:VCSCommandDisableMappings = 1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user