From de3cecce41860a2a3877401fdc60be811032eac4 Mon Sep 17 00:00:00 2001 From: Jannik Donker Date: Thu, 18 Jun 2026 12:15:32 +0200 Subject: [PATCH] blink update --- lua/keymaps.lua | 3 +++ lua/plugins.lua | 15 ++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index dfca736..864d06e 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -18,6 +18,9 @@ map("n", "K", function() vim.lsp.buf.hover({ max_width = 80 }) end, map("n", "gf", function() require("conform").format({ lsp_format = "fallback" }) end, { desc = "LSP: format buffer" }) +map("x", "gs", + function() require("conform").format({ lsp_format = "fallback" }) end, + { desc = "LSP: format selection" }) map("n", "gd", vim.lsp.buf.definition, { desc = "LSP: go to definition" }) map("n", "gD", vim.lsp.buf.declaration, { desc = "LSP: go to declaration" }) diff --git a/lua/plugins.lua b/lua/plugins.lua index 32ce096..c9c0d27 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -9,7 +9,8 @@ vim.pack.add({ { src = "https://github.com/neovim/nvim-lspconfig" }, { src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" }, { src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects", version = "main" }, - { src = "https://github.com/Saghen/blink.cmp", version = "v1.7.0" }, + { src = "https://github.com/Saghen/blink.cmp" }, + { src = "https://github.com/saghen/blink.lib" }, { src = "https://github.com/mason-org/mason.nvim" }, { src = "https://github.com/nvim-lualine/lualine.nvim.git" }, { src = "https://github.com/chomosuke/typst-preview.nvim" }, @@ -48,6 +49,13 @@ require("mini.jump2d").setup({ mappings = { start_jumping = "j" }, }) +local cmp = require('blink.cmp') +cmp.build():pwait() +cmp.setup({ + keymap = { + preset = "super-tab" } +}) + local prettier = { "prettierd", "prettier", stop_after_first = true } require("conform").setup({ formatters_by_ft = { @@ -67,8 +75,7 @@ require("conform").setup({ formatters = { prettier = { prepend_args = { "--tab-width", "4", "--use-tabs", "false" } }, prettierd = { env = { PRETTIERD_DEFAULT_CONFIG = vim.fn.expand("~/.config/nvim/.prettierrc.json") } }, - }, - format_on_save = { timeout_ms = 2000, lsp_format = "fallback" }, + } }) require("render-markdown").setup({ @@ -197,8 +204,6 @@ vim.keymap.set("x", "cs", function() silicon_shot(false) end, require("lualine").setup({ options = { theme = "gruvbox_dark" } }) -require("blink.cmp").setup({ keymap = { preset = "super-tab" } }) - -- Treesitter (main branch: no configs.setup; install parsers manually) require("nvim-treesitter").install({ "lua", "vim", "vimdoc", "bash", "c", "cpp", "rust", "python",