This commit is contained in:
Christian Nieves
2025-01-24 19:10:02 +00:00
parent f815679d89
commit d0b81f87cb
9 changed files with 186 additions and 200 deletions

View File

@ -7,7 +7,7 @@ function M.setup(capabilities)
local configs = require("lspconfig.configs")
configs.ciderlsp = {
default_config = {
offset_encoding = "utf-16",
-- offset_encoding = "utf-16",
cmd = {
"/google/bin/releases/cider/ciderlsp/ciderlsp",
"--tooltag=nvim-lsp",
@ -51,11 +51,10 @@ function M.setup(capabilities)
vim.b["is_cider_lsp_attached"] = "no"
end
local cider_lsp_handlers = {
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
focusable = false,
}),
}
local cider_lsp_handlers = {}
-- cider_lsp_handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
-- focusable = false,
-- })
cider_lsp_handlers["$/syncResponse"] = function(_, result, ctx)
local first_fire = vim.b["is_cider_lsp_attached"] == "no"

View File

@ -8,11 +8,12 @@ return {
version = "*",
-- lazy.nvim will automatically load the plugin when it's required by blink.cmp
lazy = true,
cond = flags.blink,
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
opts = {
impersonate_nvim_cmp = use_google(), -- only cider needs this
impersonate_nvim_cmp = true,
debug = true,
},
cond = not use_google(),
},
{
"saghen/blink.cmp",
@ -20,10 +21,12 @@ return {
cond = flags.blink,
dependencies = {
"Exafunction/codeium.nvim",
"mikavilpas/blink-ripgrep.nvim",
"chrisgrieser/cmp-nerdfont",
"hrsh7th/cmp-emoji",
"hrsh7th/cmp-nvim-lsp",
"mikavilpas/blink-ripgrep.nvim",
"moyiz/blink-emoji.nvim",
"rafamadriz/friendly-snippets", -- optional: provides snippets for the snippet source
"saghen/blink.compat",
},
version = "v0.*", -- use a release tag to download pre-built binaries
-- build = 'cargo build --release',
@ -31,7 +34,9 @@ return {
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- stylua: ignore
keymap = {
preset = "none",
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-e>"] = { "hide", "fallback" },
["<CR>"] = { "accept", "fallback" },
@ -64,7 +69,9 @@ return {
end
return providerToEnable
end,
-- default = { "lsp" },
providers = {
lsp = { name = "LSP", module = "blink.cmp.sources.lsp", score_offset = 90 },
-- dont show LuaLS require statements when lazydev has items
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } },
ripgrep = {
@ -80,24 +87,38 @@ return {
additional_rg_options = {},
},
},
nvim_ciderlsp = {
name = "nvim_ciderlsp",
module = "blink.compat.source",
-- https://github.com/moyiz/blink-emoji.nvim
emoji = {
module = "blink-emoji",
name = "Emoji",
score_offset = 15, -- the higher the number, the higher the priority
opts = { insert = true }, -- Insert emoji (default) or complete its name
},
buganizer = {
name = "nvim_buganizer",
buffer = {
name = "Buffer",
enabled = true,
max_items = 3,
module = "blink.cmp.sources.buffer",
min_keyword_length = 4,
score_offset = 15, -- the higher the number, the higher the priority
},
-- compat sources
nerdfont = {
name = "nerdfont",
module = "blink.compat.source",
},
codeium = {
name = "codeium",
module = "blink.compat.source",
score_offset = 100,
},
emoji = {
name = "emoji",
nvim_ciderlsp = {
name = "nvim_ciderlsp",
module = "blink.compat.source",
score_offset = 100,
},
nerdfont = {
name = "nerdfont",
buganizer = {
name = "nvim_buganizer",
module = "blink.compat.source",
},
},
@ -105,6 +126,20 @@ return {
-- experimental signature help support
signature = { enabled = true },
completion = {
list = {
-- stylua: ignore
selection = {
preselect = function(ctx) return ctx.mode ~= 'cmdline' end,
auto_insert = function(ctx) return ctx.mode ~= 'cmdline' end,
},
},
documentation = {
auto_show = true,
},
-- Displays a preview of the selected item on the current line
ghost_text = {
enabled = true,
},
menu = {
draw = {
components = {
@ -123,16 +158,6 @@ return {
},
},
},
list = {
selection = {
preselect = function(ctx)
return ctx.mode ~= "cmdline"
end,
auto_insert = function(ctx)
return ctx.mode ~= "cmdline"
end,
},
},
trigger = {
show_on_x_blocked_trigger_characters = { "'", '"', "(", "{" },
},

View File

@ -1,4 +1,4 @@
local use_google = require("utils").use_googlecmp
local use_google = require("utils").use_google
local flags = require("utils").flags
return {

View File

@ -60,7 +60,7 @@ return {
-- end,
-- },
{
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
"ErichDonGubler/lsp_lines.nvim",
event = { "LspAttach" },
name = "lsp_lines.nvim",
config = function()

View File

@ -244,17 +244,11 @@ return {
name = "cmp-nvim-ciderlsp",
url = "sso://googler@user/piloto/cmp-nvim-ciderlsp",
event = "VimEnter",
dependencies = {
"hrsh7th/nvim-cmp",
},
},
{
name = "ciderlsp-nvim",
url = "sso://googler@user/kdark/ciderlsp-nvim",
event = "VimEnter",
dependencies = {
"hrsh7th/nvim-cmp",
},
},
-- {
-- name = "nvim_figtree",

View File

@ -2,17 +2,17 @@ local use_google = require("utils").use_google
local flags = require("utils").flags
return {
{
"ray-x/lsp_signature.nvim",
event = "VeryLazy",
opts = {
floating_window = true,
hint_prefix = "󰡱 ",
},
config = function(_, opts)
require("lsp_signature").setup(opts)
end,
},
-- {
-- "ray-x/lsp_signature.nvim",
-- event = "VeryLazy",
-- opts = {
-- floating_window = true,
-- hint_prefix = "󰡱 ",
-- },
-- config = function(_, opts)
-- require("lsp_signature").setup(opts)
-- end,
-- },
{
"kosayoda/nvim-lightbulb",
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
@ -89,6 +89,8 @@ return {
"neovim/nvim-lspconfig",
dependencies = {
"hrsh7th/nvim-cmp",
"saghen/blink.cmp",
"saghen/blink.compat",
"nvim-lua/lsp-status.nvim",
"VonHeikemen/lsp-zero.nvim",
},

View File

@ -1,35 +0,0 @@
return {
{
"danymat/neogen",
config = function()
require("neogen").setup({ snippet_engine = "luasnip" })
end,
},
{
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "<CurrentMajor>.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp",
},
{ "saadparwaiz1/cmp_luasnip" },
config = function()
local ls = require("luasnip")
vim.keymap.set({ "i" }, "<Tab>", function()
ls.expand()
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<Tab>", function()
ls.jump(1)
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<S-Tab>", function()
ls.jump(-1)
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-E>", function()
if ls.choice_active() then
ls.change_choice(1)
end
end, { silent = true })
end,
}

View File

@ -1,5 +1,6 @@
return {
"williamboman/mason-lspconfig.nvim",
cond = false,
dependencies = {
"williamboman/mason.nvim",
"Hoffs/omnisharp-extended-lsp.nvim",

View File

@ -1,6 +1,6 @@
local M = {
use_google_cache = nil,
flags = { blink = true },
flags = { blink = false },
}
function M.exec(command, args)