Compare commits

..

No commits in common. "2ed3dc3085c3e68ec7fa13cfa966318571bb4b0e" and "5d1d8aeaa61c0bcb63eac6f7d21349dd86a81c1e" have entirely different histories.

3 changed files with 44 additions and 41 deletions

View File

@ -7,10 +7,11 @@ return {
library = {
{ path = "luassert-types/library", words = { "assert" } },
{ path = "busted-types/library", words = { "describe" } },
{ path = "${3rd}/luv/library", words = { "vim%.uv", "vim%.loop" } },
{ path = "luvit-meta/library", words = { "vim%.uv", "vim%.loop" } },
},
},
dependencies = {
{ "Bilal2453/luvit-meta", lazy = true },
{ "LuaCATS/luassert", lazy = true },
{ "LuaCATS/busted", lazy = true },
},
@ -35,21 +36,9 @@ return {
},
"amarakon/nvim-cmp-lua-latex-symbols",
"mikavilpas/blink-ripgrep.nvim",
"moyiz/blink-emoji.nvim",
},
build = "nix run .#build-plugin",
config = function()
---@class CustomKindMapItem
---@field icon string
---@field hlgroup string
---@type table<string, CustomKindMapItem>
local custom_kind_map = {
Dadbod = { icon = "󰆼", hlgroup = "Dadbod" },
Emoji = { icon = "󰞅", hlgroup = "Emoji" },
Ripgrep = { icon = "", hlgroup = "Ripgrep" },
["lua-latex-symbols"] = { icon = "󰿈", hlgroup = "LatexSymbol" },
}
---@diagnostic disable-next-line: missing-fields
require("blink.cmp").setup({
-- 'default' for mappings similar to built-in completion
@ -118,21 +107,14 @@ return {
---@diagnostic disable-next-line: missing-fields
sources = {
default = {
"lazydev",
"lsp",
"path",
"snippets",
"buffer",
"ripgrep",
"emoji",
"dadbod",
},
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
ripgrep = {
module = "blink-ripgrep",
score_offset = -3,
@ -157,10 +139,6 @@ return {
cache = true,
},
},
emoji = {
module = "blink-emoji",
name = "Emoji",
},
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
},
},
@ -186,20 +164,8 @@ return {
components = {
kind_icon = {
text = function(ctx)
local cust_kind_item = custom_kind_map[ctx.source_name]
if cust_kind_item then
ctx.kind_icon = cust_kind_item.icon
end
return ctx.icon_gap .. ctx.kind_icon .. ctx.icon_gap
end,
highlight = function(ctx)
local cust_kind_item = custom_kind_map[ctx.source_name]
if cust_kind_item then
return "BlinkCmpKindCustom" .. cust_kind_item.hlgroup
end
return require("blink.cmp.completion.windows.render.tailwind").get_hl(ctx)
or ("BlinkCmpKind" .. ctx.kind)
end,
},
},
},

View File

@ -137,23 +137,23 @@ return {
{ "BlinkCmpKindInterface", { fg = colors.fujiWhite, bg = colors.waveRed, blend = 0 } },
{ "BlinkCmpKindColor", { fg = colors.fujiWhite, bg = colors.waveAqua2, blend = 0 } },
{ "BlinkCmpKindTypeParameter", { fg = colors.fujiWhite, bg = colors.waveAqua2, blend = 0 } },
{ "BlinkCmpKindCustomEmoji", { fg = colors.fujiWhite, bg = colors.boatYellow2, blend = 0 } },
{ "BlinkCmpKindCustomRipgrep", { fg = colors.fujiWhite, bg = colors.crystalBlue, blend = 0 } },
{ "BlinkCmpKindCustomDadbod", { fg = colors.fujiWhite, bg = colors.oniViolet, blend = 0 } },
{ "BlinkCmpKindCustomLatexSymbol", { fg = colors.fujiWhite, bg = colors.surimiOrange, blend = 0 } },
{ "CmpCustomSelectionColor", { bg = colors.sumiInk5, blend = 0 } },
{ "CmpCustomSelectionDadbodCompletion", { fg = colors.fujiWhite, bg = colors.oniViolet, blend = 0 } },
{ "CmpCustomSelectionGit", { fg = colors.fujiWhite, bg = colors.roninYellow, blend = 0 } },
{ "CmpCustomSelectionBuffer", { fg = colors.fujiWhite, bg = colors.springBlue, blend = 0 } },
{ "CmpCustomSelectionPath", { fg = colors.fujiWhite, bg = colors.autumnYellow, blend = 0 } },
{ "CmpCustomSelectionCalculator", { fg = colors.fujiWhite, bg = colors.waveBlue2, blend = 0 } },
{ "CmpCustomSelectionOrgmode", { fg = colors.fujiWhite, bg = colors.waveAqua1, blend = 0 } },
{ "CmpCustomSelectionEmoji", { fg = colors.fujiWhite, bg = colors.carpYellow, blend = 0 } },
{ "CmpCustomSelectionZsh", { fg = colors.fujiWhite, bg = colors.springGreen, blend = 0 } },
{ "CmpCustomSelectionCrates", { fg = colors.fujiWhite, bg = colors.roninYellow, blend = 0 } },
{ "CmpCustomSelectionDocker", { fg = colors.fujiWhite, bg = colors.springBlue, blend = 0 } },
{ "CmpCustomSelectionCmdHistory", { fg = colors.fujiWhite, bg = colors.waveBlue2, blend = 0 } },
{ "CmpCustomSelectionRipgrep", { fg = colors.fujiWhite, bg = colors.crystalBlue, blend = 0 } },
{ "CmpCustomSelectionNpm", { fg = colors.fujiWhite, bg = colors.peachRed, blend = 0 } },
{ "CmpCustomSelectionCommit", { fg = colors.fujiWhite, bg = colors.peachRed, blend = 0 } },
{ "CmpCustomSelectionSnippet", { fg = colors.fujiWhite, bg = colors.peachRed, blend = 0 } },
{ "CmpCustomSelectionLuaLatexSymbol", { fg = colors.fujiWhite, bg = colors.surimiOrange, blend = 0 } },
-- Telescope
{ "TelescopeNormal", { bg = colors.sumiInk2 } },

View File

@ -94,6 +94,42 @@ return {
{
"mrcjkb/rustaceanvim",
lazy = false,
init = function()
vim.g.rustaceanvim = {
dap = {
adapter = {
type = "server",
port = "${port}",
executable = {
command = "codelldb",
args = { "--port", "${port}" },
},
},
},
server = {
default_settings = {
["rust-analyzer"] = {
cargo = {
targetDir = "target/rust-analyzer/",
},
checkOnSave = true,
rustfmt = {
rangeFormatting = {
enable = true,
},
},
},
},
},
tools = {
enable_clippy = true,
executor = require("rustaceanvim.executors").termopen,
hover_actions = {
replace_builtin_hover = false,
},
},
}
end,
config = false,
},
{
@ -238,7 +274,8 @@ return {
},
event = { "BufReadPre", "BufNewFile" },
config = function()
local lsp_capabilities = require("blink.cmp").get_lsp_capabilities()
local lsp_capabilities =
require("blink.cmp").get_lsp_capabilities()
local db_timer = vim.uv.new_timer()
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)