stuff
This commit is contained in:
9
config/.ripgreprc
Normal file
9
config/.ripgreprc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# add gdscript type
|
||||||
|
--type-add
|
||||||
|
gd:*.{gd,gdscript}*
|
||||||
|
|
||||||
|
# Search hidden files / directories (e.g. dotfiles) by default
|
||||||
|
--hidden
|
||||||
|
|
||||||
|
# Because who cares about case!?
|
||||||
|
--smart-case
|
@ -1,38 +1,96 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
local flags = require("utils").flags
|
local flags = require("utils").flags
|
||||||
|
local kind_icons = {
|
||||||
|
-- LLM Provider icons
|
||||||
|
claude = "",
|
||||||
|
openai = "",
|
||||||
|
codestral = "",
|
||||||
|
gemini = "",
|
||||||
|
nvim_ciderlsp = "",
|
||||||
|
Groq = "",
|
||||||
|
Openrouter = "",
|
||||||
|
Ollama = "",
|
||||||
|
["Llama.cpp"] = "",
|
||||||
|
Deepseek = "",
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"saghen/blink.compat",
|
"milanglacier/minuet-ai.nvim",
|
||||||
-- use the latest release, via version = '*', if you also use the latest release for blink.cmp
|
config = function()
|
||||||
version = "*",
|
require("minuet").setup({
|
||||||
-- lazy.nvim will automatically load the plugin when it's required by blink.cmp
|
provider = "gemini",
|
||||||
lazy = true,
|
provider_options = {
|
||||||
cond = flags.blink,
|
gemini = {
|
||||||
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
|
optional = {
|
||||||
opts = {
|
generationConfig = {
|
||||||
impersonate_nvim_cmp = true,
|
maxOutputTokens = 256,
|
||||||
debug = true,
|
},
|
||||||
},
|
safetySettings = {
|
||||||
},
|
{
|
||||||
{
|
-- HARM_CATEGORY_HATE_SPEECH,
|
||||||
"saghen/blink.cmp",
|
-- HARM_CATEGORY_HARASSMENT
|
||||||
lazy = false, -- lazy loading handled internally
|
-- HARM_CATEGORY_SEXUALLY_EXPLICIT
|
||||||
cond = flags.blink,
|
category = "HARM_CATEGORY_DANGEROUS_CONTENT",
|
||||||
dependencies = {
|
-- BLOCK_NONE
|
||||||
"chrisgrieser/cmp-nerdfont",
|
threshold = "BLOCK_ONLY_HIGH",
|
||||||
"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",
|
},
|
||||||
},
|
-- Your configuration options here
|
||||||
version = "v0.*", -- use a release tag to download pre-built binaries
|
virtualtext = {
|
||||||
-- build = 'cargo build --release',
|
auto_trigger_ft = {},
|
||||||
|
keymap = {
|
||||||
|
-- accept whole completion
|
||||||
|
accept = "<A-A>",
|
||||||
|
-- accept one line
|
||||||
|
accept_line = "<A-a>",
|
||||||
|
-- accept n lines (prompts for number)
|
||||||
|
-- e.g. "A-z 2 CR" will accept 2 lines
|
||||||
|
accept_n_lines = "<A-z>",
|
||||||
|
-- Cycle to prev completion item, or manually invoke completion
|
||||||
|
prev = "<A-[>",
|
||||||
|
-- Cycle to next completion item, or manually invoke completion
|
||||||
|
next = "<A-]>",
|
||||||
|
dismiss = "<A-e>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"saghen/blink.compat",
|
||||||
|
-- use the latest release, via version = '*', if you also use the latest release for blink.cmp
|
||||||
|
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 = true,
|
||||||
|
debug = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
lazy = false, -- lazy loading handled internally
|
||||||
|
cond = flags.blink,
|
||||||
|
dependencies = {
|
||||||
|
"chrisgrieser/cmp-nerdfont",
|
||||||
|
"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',
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
---@module 'blink.cmp'
|
||||||
---@type blink.cmp.Config
|
---@type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = "none",
|
preset = "none",
|
||||||
@ -49,104 +107,110 @@ return {
|
|||||||
["<S-Up>"] = { "scroll_documentation_up", "fallback" },
|
["<S-Up>"] = { "scroll_documentation_up", "fallback" },
|
||||||
["<S-Down>"] = { "scroll_documentation_down", "fallback" },
|
["<S-Down>"] = { "scroll_documentation_down", "fallback" },
|
||||||
},
|
},
|
||||||
sources = {
|
appearance = {
|
||||||
default = function(ctx)
|
use_nvim_cmp_as_default = true,
|
||||||
local providerToEnable = {
|
nerd_font_variant = "normal",
|
||||||
"lsp",
|
kind_icons = kind_icons,
|
||||||
"path",
|
},
|
||||||
"snippets",
|
sources = {
|
||||||
"ripgrep",
|
default = function(ctx)
|
||||||
"emoji",
|
local providerToEnable = {
|
||||||
"nerdfont",
|
"lsp",
|
||||||
"buffer",
|
"path",
|
||||||
}
|
"snippets",
|
||||||
if use_google() then
|
"ripgrep",
|
||||||
table.insert(providerToEnable, "nvim_ciderlsp")
|
"emoji",
|
||||||
table.insert(providerToEnable, "buganizer")
|
"nerdfont",
|
||||||
else
|
"buffer",
|
||||||
table.insert(providerToEnable, "codeium")
|
}
|
||||||
end
|
if use_google() then
|
||||||
return providerToEnable
|
table.insert(providerToEnable, "nvim_ciderlsp")
|
||||||
end,
|
table.insert(providerToEnable, "buganizer")
|
||||||
-- default = { "lsp" },
|
else
|
||||||
providers = {
|
table.insert(providerToEnable, "minuet")
|
||||||
lsp = { name = "LSP", module = "blink.cmp.sources.lsp", score_offset = 90 },
|
end
|
||||||
-- dont show LuaLS require statements when lazydev has items
|
return providerToEnable
|
||||||
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } },
|
end,
|
||||||
ripgrep = {
|
providers = {
|
||||||
module = "blink-ripgrep",
|
lsp = { name = "LSP", module = "blink.cmp.sources.lsp", score_offset = 90 },
|
||||||
name = "Ripgrep",
|
-- dont show LuaLS require statements when lazydev has items
|
||||||
-- the options below are optional, some default values are shown
|
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } },
|
||||||
---@module "blink-ripgrep"
|
ripgrep = {
|
||||||
---@type blink-ripgrep.Options
|
module = "blink-ripgrep",
|
||||||
opts = {
|
name = "Ripgrep",
|
||||||
prefix_min_len = 3,
|
-- the options below are optional, some default values are shown
|
||||||
context_size = 5,
|
---@module "blink-ripgrep"
|
||||||
max_filesize = "1M",
|
---@type blink-ripgrep.Options
|
||||||
additional_rg_options = {},
|
opts = {
|
||||||
},
|
prefix_min_len = 3,
|
||||||
},
|
context_size = 5,
|
||||||
-- https://github.com/moyiz/blink-emoji.nvim
|
max_filesize = "1M",
|
||||||
emoji = {
|
additional_rg_options = {},
|
||||||
module = "blink-emoji",
|
},
|
||||||
name = "Emoji",
|
},
|
||||||
score_offset = 15, -- the higher the number, the higher the priority
|
-- https://github.com/moyiz/blink-emoji.nvim
|
||||||
opts = { insert = true }, -- Insert emoji (default) or complete its name
|
emoji = {
|
||||||
},
|
module = "blink-emoji",
|
||||||
buffer = {
|
name = "Emoji",
|
||||||
name = "Buffer",
|
score_offset = 15, -- the higher the number, the higher the priority
|
||||||
enabled = true,
|
opts = { insert = true }, -- Insert emoji (default) or complete its name
|
||||||
max_items = 3,
|
},
|
||||||
module = "blink.cmp.sources.buffer",
|
buffer = {
|
||||||
min_keyword_length = 4,
|
name = "Buffer",
|
||||||
score_offset = 15, -- the higher the number, the higher the priority
|
enabled = true,
|
||||||
},
|
max_items = 3,
|
||||||
-- compat sources
|
module = "blink.cmp.sources.buffer",
|
||||||
nerdfont = {
|
min_keyword_length = 4,
|
||||||
name = "nerdfont",
|
score_offset = 15, -- the higher the number, the higher the priority
|
||||||
module = "blink.compat.source",
|
},
|
||||||
},
|
-- compat sources
|
||||||
codeium = {
|
nerdfont = {
|
||||||
name = "codeium",
|
name = "nerdfont",
|
||||||
module = "blink.compat.source",
|
module = "blink.compat.source",
|
||||||
score_offset = 100,
|
},
|
||||||
},
|
minuet = {
|
||||||
nvim_ciderlsp = {
|
name = "minuet",
|
||||||
name = "nvim_ciderlsp",
|
module = "minuet.blink",
|
||||||
module = "blink.compat.source",
|
score_offset = 100, -- Gives minuet higher priority among suggestions
|
||||||
score_offset = 100,
|
},
|
||||||
},
|
nvim_ciderlsp = {
|
||||||
buganizer = {
|
name = "nvim_ciderlsp",
|
||||||
name = "nvim_buganizer",
|
module = "blink.compat.source",
|
||||||
module = "blink.compat.source",
|
score_offset = 100,
|
||||||
},
|
},
|
||||||
},
|
buganizer = {
|
||||||
},
|
name = "nvim_buganizer",
|
||||||
-- experimental signature help support
|
module = "blink.compat.source",
|
||||||
signature = { enabled = true },
|
},
|
||||||
completion = {
|
},
|
||||||
list = {
|
},
|
||||||
|
-- experimental signature help support
|
||||||
|
signature = { enabled = true },
|
||||||
|
completion = {
|
||||||
|
-- Recommended to avoid unnecessary request
|
||||||
|
trigger = { prefetch_on_insert = false },
|
||||||
|
list = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
selection = {
|
selection = {
|
||||||
preselect = function(ctx) return ctx.mode ~= 'cmdline' end,
|
preselect = function(ctx) return ctx.mode ~= 'cmdline' end,
|
||||||
auto_insert = function(ctx) return ctx.mode ~= 'cmdline' end,
|
auto_insert = function(ctx) return ctx.mode ~= 'cmdline' end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
auto_show = true,
|
auto_show = true,
|
||||||
},
|
},
|
||||||
-- Displays a preview of the selected item on the current line
|
-- Displays a preview of the selected item on the current line
|
||||||
ghost_text = {
|
ghost_text = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
},
|
},
|
||||||
trigger = {
|
trigger = {
|
||||||
show_on_x_blocked_trigger_characters = { "'", '"', "(", "{" },
|
show_on_x_blocked_trigger_characters = { "'", '"', "(", "{" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- allows extending the providers array elsewhere in your config
|
-- allows extending the providers array elsewhere in your config
|
||||||
-- without having to redefine it
|
-- without having to redefine it
|
||||||
opts_extend = { "sources.default" },
|
opts_extend = { "sources.default" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -165,5 +165,6 @@ export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
|||||||
|
|
||||||
|
|
||||||
source ~/.bash_profile
|
source ~/.bash_profile
|
||||||
|
export RIPGREP_CONFIG_PATH=$HOME/.ripgreprc
|
||||||
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
Reference in New Issue
Block a user