stuff idk

This commit is contained in:
Christian Nieves
2023-07-28 19:43:17 +00:00
parent 7586fdd3a4
commit d40aad6717
4 changed files with 202 additions and 206 deletions

View File

@ -45,7 +45,7 @@ return {
local cmp = require("cmp")
local conditionalSources = cmp.config.sources({
{ name = "nvim_lsp", priority = 6 },
{ name = "nvim_lsp", priority = 100 },
{ name = "nvim_lsp_signature_help", priority = 6 },
{ name = "luasnip", priority = 7 },
{ name = "calc" },
@ -69,7 +69,7 @@ return {
if use_google() then
require("cmp_nvim_ciderlsp").setup()
table.insert(conditionalSources, { name = "analysislsp" })
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 8 })
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 80 })
else
table.insert(conditionalSources, { name = "cmp_tabnine" })
end
@ -160,20 +160,18 @@ return {
formatting = {
format = lspkind.cmp_format({
with_text = true,
-- mode = "symbol_text",
-- before = function(entry, vim_item)
-- if entry.source.name == "nvim_ciderlsp" then
-- if entry.completion_item.is_multiline then
-- -- multi-line specific formatting here
-- vim_item.menu = "  "
-- else
-- vim_item.menu = ""
-- end
-- end
-- return vim_item
-- end,
mode = "symbol_text",
before = function(entry, vim_item)
if entry.source.name == "nvim_ciderlsp" then
if entry.completion_item.is_multiline then
-- multi-line specific formatting here
vim_item.menu = "  "
else
vim_item.menu = ""
end
end
return vim_item
end,
maxwidth = 50, -- half max width
menu = {
nvim_ciderlsp = "",
@ -188,8 +186,8 @@ return {
},
}),
},
experimental = {
native_menu = false,
ghost_text = true,
},
})

View File

@ -137,16 +137,18 @@ return {
-- Here are all the options and their default values:
require("google.comments").setup({
-- command = {'/google/bin/releases/editor-devtools/get_comments.par', '--full', '--json', "-x=''"},
-- stubby = true,
stubby = true,
-- command = {
-- "/google/bin/releases/editor-devtools/get_comments.par",
-- "--json",
-- "--full",
-- "--noresolved",
-- "--cl_comments",
-- "--file_comments",
-- },
command = {
"/google/bin/releases/editor-devtools/get_comments.par",
"--json",
"--full",
"--noresolved",
"--cl_comments",
"--file_comments",
'stubby --output_json call blade:codereview-rpc CodereviewRpcService.GetComments "changelist_number: $(/google/data/ro/teams/fig/bin/vcstool pending-change-number)"',
},
-- 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

View File

@ -33,21 +33,15 @@ return {
local lsp_status = require("lsp-status")
lsp_status.register_progress()
-- CiderLSP
vim.opt.completeopt = { "menu", "menuone", "noselect" }
-- Don't show the dumb matching stuff
vim.opt.shortmess:append("c")
vim.opt.completeopt = { "menu", "menuone", "noselect" }
vim.opt.spell = true
vim.opt.spelllang = { "en_us" }
vim.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]
local lvl = ({ "ERROR", "WARN", "INFO", "DEBUG" })[result.type]
notify({ result.message }, lvl, {
title = "LSP | " .. client.name,
timeout = 1000,
@ -62,7 +56,7 @@ return {
default_config = {
cmd = {
"/google/bin/releases/cider/ciderlsp/ciderlsp",
"--tooltag=nvim-cmp",
"--tooltag=nvim-lsp",
"--forward_sync_responses",
},
offset_encoding = "utf-8",
@ -177,20 +171,21 @@ return {
require("lualine").refresh()
end
end
require("cmp_nvim_ciderlsp").setup({
multiline_summary_symbol = "",
})
capabilities = require("cmp_nvim_ciderlsp").update_capabilities(capabilities)
capabilities.workspace.codeLens = { refreshSupport = true }
capabilities.workspace.diagnostics = { refreshSupport = true }
lspconfig.analysislsp.setup({
capabilities = capabilities,
})
lspconfig.ciderlsp.setup({
capabilities = capabilities,
on_attach = cider_on_attach,
handlers = cider_lsp_handlers,
})
lspconfig.analysislsp.setup({
capabilities = capabilities,
})
end
end,
},

View File

@ -4,7 +4,8 @@ return {
lazy = false,
config = function()
vim.diagnostic.config({
virtual_lines = { only_current_line = true },
-- virtual_lines = { only_current_line = true },
virtual_lines = true,
-- update_in_insert = true,
virtual_text = false,