stuff idk
This commit is contained in:
@ -45,7 +45,7 @@ return {
|
|||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
|
||||||
local conditionalSources = cmp.config.sources({
|
local conditionalSources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp", priority = 6 },
|
{ name = "nvim_lsp", priority = 100 },
|
||||||
{ name = "nvim_lsp_signature_help", priority = 6 },
|
{ name = "nvim_lsp_signature_help", priority = 6 },
|
||||||
{ name = "luasnip", priority = 7 },
|
{ name = "luasnip", priority = 7 },
|
||||||
{ name = "calc" },
|
{ name = "calc" },
|
||||||
@ -69,7 +69,7 @@ return {
|
|||||||
if use_google() then
|
if use_google() then
|
||||||
require("cmp_nvim_ciderlsp").setup()
|
require("cmp_nvim_ciderlsp").setup()
|
||||||
table.insert(conditionalSources, { name = "analysislsp" })
|
table.insert(conditionalSources, { name = "analysislsp" })
|
||||||
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 8 })
|
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 80 })
|
||||||
else
|
else
|
||||||
table.insert(conditionalSources, { name = "cmp_tabnine" })
|
table.insert(conditionalSources, { name = "cmp_tabnine" })
|
||||||
end
|
end
|
||||||
@ -160,20 +160,18 @@ return {
|
|||||||
|
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspkind.cmp_format({
|
format = lspkind.cmp_format({
|
||||||
with_text = true,
|
mode = "symbol_text",
|
||||||
|
before = function(entry, vim_item)
|
||||||
-- mode = "symbol_text",
|
if entry.source.name == "nvim_ciderlsp" then
|
||||||
-- before = function(entry, vim_item)
|
if entry.completion_item.is_multiline then
|
||||||
-- if entry.source.name == "nvim_ciderlsp" then
|
-- multi-line specific formatting here
|
||||||
-- if entry.completion_item.is_multiline then
|
vim_item.menu = " "
|
||||||
-- -- multi-line specific formatting here
|
else
|
||||||
-- vim_item.menu = " "
|
vim_item.menu = ""
|
||||||
-- else
|
end
|
||||||
-- vim_item.menu = ""
|
end
|
||||||
-- end
|
return vim_item
|
||||||
-- end
|
end,
|
||||||
-- return vim_item
|
|
||||||
-- end,
|
|
||||||
maxwidth = 50, -- half max width
|
maxwidth = 50, -- half max width
|
||||||
menu = {
|
menu = {
|
||||||
nvim_ciderlsp = "",
|
nvim_ciderlsp = "",
|
||||||
@ -188,8 +186,8 @@ return {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
experimental = {
|
experimental = {
|
||||||
|
native_menu = false,
|
||||||
ghost_text = true,
|
ghost_text = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -137,16 +137,18 @@ return {
|
|||||||
-- Here are all the options and their default values:
|
-- Here are all the options and their default values:
|
||||||
require("google.comments").setup({
|
require("google.comments").setup({
|
||||||
-- command = {'/google/bin/releases/editor-devtools/get_comments.par', '--full', '--json', "-x=''"},
|
-- 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 = {
|
command = {
|
||||||
"/google/bin/releases/editor-devtools/get_comments.par",
|
'stubby --output_json call blade:codereview-rpc CodereviewRpcService.GetComments "changelist_number: $(/google/data/ro/teams/fig/bin/vcstool pending-change-number)"',
|
||||||
"--json",
|
|
||||||
"--full",
|
|
||||||
"--noresolved",
|
|
||||||
"--cl_comments",
|
|
||||||
"--file_comments",
|
|
||||||
},
|
},
|
||||||
-- 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 = ' '})`.
|
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
|
||||||
-- See :help sign_define
|
-- See :help sign_define
|
||||||
-- The sign property passed to setup should be the 'ICON_NAME' in the define
|
-- The sign property passed to setup should be the 'ICON_NAME' in the define
|
||||||
|
@ -33,21 +33,15 @@ return {
|
|||||||
local lsp_status = require("lsp-status")
|
local lsp_status = require("lsp-status")
|
||||||
lsp_status.register_progress()
|
lsp_status.register_progress()
|
||||||
|
|
||||||
-- CiderLSP
|
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
|
||||||
-- Don't show the dumb matching stuff
|
-- Don't show the dumb matching stuff
|
||||||
vim.opt.shortmess:append("c")
|
vim.opt.shortmess:append("c")
|
||||||
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
|
|
||||||
vim.opt.spell = true
|
vim.opt.spell = true
|
||||||
vim.opt.spelllang = { "en_us" }
|
vim.opt.spelllang = { "en_us" }
|
||||||
vim.lsp.handlers["window/showMessage"] = function(_, result, ctx)
|
vim.lsp.handlers["window/showMessage"] = function(_, result, ctx)
|
||||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||||
local lvl = ({
|
local lvl = ({ "ERROR", "WARN", "INFO", "DEBUG" })[result.type]
|
||||||
"ERROR",
|
|
||||||
"WARN",
|
|
||||||
"INFO",
|
|
||||||
"DEBUG",
|
|
||||||
})[result.type]
|
|
||||||
notify({ result.message }, lvl, {
|
notify({ result.message }, lvl, {
|
||||||
title = "LSP | " .. client.name,
|
title = "LSP | " .. client.name,
|
||||||
timeout = 1000,
|
timeout = 1000,
|
||||||
@ -62,7 +56,7 @@ return {
|
|||||||
default_config = {
|
default_config = {
|
||||||
cmd = {
|
cmd = {
|
||||||
"/google/bin/releases/cider/ciderlsp/ciderlsp",
|
"/google/bin/releases/cider/ciderlsp/ciderlsp",
|
||||||
"--tooltag=nvim-cmp",
|
"--tooltag=nvim-lsp",
|
||||||
"--forward_sync_responses",
|
"--forward_sync_responses",
|
||||||
},
|
},
|
||||||
offset_encoding = "utf-8",
|
offset_encoding = "utf-8",
|
||||||
@ -177,20 +171,21 @@ return {
|
|||||||
require("lualine").refresh()
|
require("lualine").refresh()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
require("cmp_nvim_ciderlsp").setup({
|
||||||
|
multiline_summary_symbol = "…",
|
||||||
|
})
|
||||||
capabilities = require("cmp_nvim_ciderlsp").update_capabilities(capabilities)
|
capabilities = require("cmp_nvim_ciderlsp").update_capabilities(capabilities)
|
||||||
capabilities.workspace.codeLens = { refreshSupport = true }
|
capabilities.workspace.codeLens = { refreshSupport = true }
|
||||||
capabilities.workspace.diagnostics = { refreshSupport = true }
|
capabilities.workspace.diagnostics = { refreshSupport = true }
|
||||||
|
|
||||||
lspconfig.analysislsp.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
lspconfig.ciderlsp.setup({
|
lspconfig.ciderlsp.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = cider_on_attach,
|
on_attach = cider_on_attach,
|
||||||
handlers = cider_lsp_handlers,
|
handlers = cider_lsp_handlers,
|
||||||
})
|
})
|
||||||
|
lspconfig.analysislsp.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -4,7 +4,8 @@ return {
|
|||||||
lazy = false,
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_lines = { only_current_line = true },
|
-- virtual_lines = { only_current_line = true },
|
||||||
|
virtual_lines = true,
|
||||||
|
|
||||||
-- update_in_insert = true,
|
-- update_in_insert = true,
|
||||||
virtual_text = false,
|
virtual_text = false,
|
||||||
|
Reference in New Issue
Block a user