Cider config
This commit is contained in:
@ -3,9 +3,8 @@ local nvim_lsp = require("lspconfig")
|
||||
local configs = require("lspconfig.configs")
|
||||
configs.ciderlsp = {
|
||||
default_config = {
|
||||
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-lsp", "--noforward_sync_responses",
|
||||
"--enable_semantic_tokens",
|
||||
"--relay_mode=true", "--hub_addr=blade:languageservices-staging" },
|
||||
cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-lsp", "--noforward_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'};
|
||||
filetypes = { "c", "cpp", "java", "kotlin", "proto", "textproto", "go", "python", "bzl" },
|
||||
root_dir = nvim_lsp.util.root_pattern("BUILD"),
|
||||
settings = {},
|
||||
@ -82,6 +81,7 @@ cmp.setup({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "path" },
|
||||
{ name = "vim_vsnip" },
|
||||
{ name = 'nvim_ciderlsp', priority = 9 },
|
||||
{ name = "buffer", keyword_length = 5 },
|
||||
},
|
||||
|
||||
@ -121,6 +121,7 @@ cmp.setup({
|
||||
with_text = true,
|
||||
maxwidth = 40, -- half max width
|
||||
menu = {
|
||||
nvim_ciderlsp = "(ﮧ)",
|
||||
buffer = "[buffer]",
|
||||
nvim_lsp = "[CiderLSP]",
|
||||
nvim_lua = "[API]",
|
||||
@ -181,17 +182,22 @@ local on_attach = function(client, bufnr)
|
||||
vim.api.nvim_command("augroup END")
|
||||
end
|
||||
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
capabilities.textDocument.codeAction = {
|
||||
codeActionLiteralSupport = {
|
||||
codeActionKind = {
|
||||
valueSet = {
|
||||
'', 'quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source', 'source.organizeImports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
capabilities.textDocument.publishDiagnostics['versionSupport'] = false
|
||||
|
||||
capabilities = require('cmp_nvim_ciderlsp').update_capabilities(capabilities)
|
||||
|
||||
-- capabilities.textDocument.codeAction = {
|
||||
-- codeActionLiteralSupport = {
|
||||
-- codeActionKind = {
|
||||
-- valueSet = {
|
||||
-- '', 'quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source', 'source.organizeImports'
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- capabilities.textDocument.publishDiagnostics['versionSupport'] = false
|
||||
|
||||
nvim_lsp.ciderlsp.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
|
@ -5,6 +5,8 @@ source /google/data/ro/projects/vigor/vigor.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'
|
||||
|
||||
if has('nvim') || has('patch-8.0.902')
|
||||
Plug 'mhinz/vim-signify'
|
||||
@ -185,3 +187,5 @@ nnoremap <leader>po :PiperOpenPath<CR>
|
||||
nnoremap <leader>ws :CorpWebCs <cword> <CR>
|
||||
" search in codesearch for the current file
|
||||
nnoremap <leader>wf :CorpWebCsFile<CR>
|
||||
|
||||
nmap <leader>rbs ss <leader>rb
|
||||
|
@ -39,6 +39,18 @@ 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',
|
||||
|
@ -108,7 +108,6 @@ lua << EOF
|
||||
require("treesitter")
|
||||
require("telescope_config")
|
||||
|
||||
|
||||
EOF
|
||||
source ~/.vim/prefs/cmp.vim
|
||||
if filereadable(expand("~/use_google"))
|
||||
|
Reference in New Issue
Block a user