aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/nvim/lua/plugins/completion.lua
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:18 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:18 +0100
commitd00bf2cb2d5087164fa509a4f20a2be62a519044 (patch)
treee788986ca341fa7a9d7327b48c58d2e0c0c43115 /dot_config/nvim/lua/plugins/completion.lua
parent9b2af4dd6c73ea57cc921f41120db7a2700e806d (diff)
downloaddotfiles-d00bf2cb2d5087164fa509a4f20a2be62a519044.tar.gz
dotfiles-d00bf2cb2d5087164fa509a4f20a2be62a519044.tar.bz2
dotfiles-d00bf2cb2d5087164fa509a4f20a2be62a519044.zip
refactor: restructure to chezmoi source state
Rename home/ contents to chezmoi naming conventions: - dot_ prefix for dotfiles and dot-dirs - private_dot_ for .gnupg and .ssh directories - private_ for 0600 files (nym.pub) - executable_ for scripts in .local/bin and display-toggle.sh - symlink_ for mimeapps.list symlink
Diffstat (limited to 'dot_config/nvim/lua/plugins/completion.lua')
-rw-r--r--dot_config/nvim/lua/plugins/completion.lua86
1 files changed, 86 insertions, 0 deletions
diff --git a/dot_config/nvim/lua/plugins/completion.lua b/dot_config/nvim/lua/plugins/completion.lua
new file mode 100644
index 0000000..df24a5d
--- /dev/null
+++ b/dot_config/nvim/lua/plugins/completion.lua
@@ -0,0 +1,86 @@
+require("blink.compat").setup({})
+
+require("blink.cmp").setup({
+ keymap = {
+ preset = "cmdline",
+ ["<CR>"] = { "accept", "fallback" },
+ },
+ appearance = {
+ use_nvim_cmp_as_default = true,
+ },
+ completion = {
+ menu = {
+ draw = {
+ columns = { { "kind_icon" }, { "label", gap = 1 } },
+ components = {
+ label = {
+ text = function(ctx)
+ return require("colorful-menu").blink_components_text(ctx)
+ end,
+ highlight = function(ctx)
+ return require("colorful-menu").blink_components_highlight(ctx)
+ end,
+ },
+ },
+ },
+ },
+ list = {
+ selection = {
+ preselect = function()
+ return not require("blink.cmp").snippet_active({ direction = 1 })
+ end,
+ },
+ },
+ documentation = { auto_show = true },
+ },
+ signature = {
+ enabled = true,
+ trigger = {
+ enabled = true,
+ show_on_keyword = true,
+ show_on_insert = true,
+ },
+ },
+ sources = {
+ default = { "lazydev", "lsp", "copilot", "snippets", "path", "buffer" },
+ per_filetype = {
+ ["dap-repl"] = { "dap" },
+ },
+ providers = {
+ path = {
+ opts = {
+ get_cwd = vim.fn.getcwd,
+ },
+ },
+ copilot = {
+ name = "copilot",
+ module = "blink-copilot",
+ score_offset = 100,
+ async = true,
+ },
+ lazydev = {
+ name = "LazyDev",
+ module = "lazydev.integrations.blink",
+ score_offset = 100,
+ },
+ dap = { name = "dap", module = "blink.compat.source" },
+ },
+ },
+})
+
+require("blink.pairs").setup({
+ mappings = {
+ disabled_filetypes = {},
+ },
+ highlights = {
+ groups = {
+ "BlinkIndentOrange",
+ "BlinkIndentViolet",
+ "BlinkIndentBlue",
+ "BlinkIndentRed",
+ "BlinkIndentCyan",
+ "BlinkIndentYellow",
+ "BlinkIndentGreen",
+ },
+ },
+})