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