From c006042ba347980181fbc91a50801d9f3ab69ff4 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Mon, 26 May 2025 19:04:30 +0200 Subject: [PATCH] Use new border option --- nvim/dot-config/nvim/lua/autocmds.lua | 9 ++------- nvim/dot-config/nvim/lua/options.lua | 5 ++++- nvim/dot-config/nvim/lua/plugins/blink.lua | 8 -------- nvim/dot-config/nvim/lua/plugins/telescope.lua | 17 ++++++++++++++++- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/nvim/dot-config/nvim/lua/autocmds.lua b/nvim/dot-config/nvim/lua/autocmds.lua index cab2462..753e98e 100644 --- a/nvim/dot-config/nvim/lua/autocmds.lua +++ b/nvim/dot-config/nvim/lua/autocmds.lua @@ -90,12 +90,7 @@ vim.api.nvim_create_autocmd("LspAttach", { ) -- Documentation - vim.keymap.set("n", "K", function() - vim.lsp.buf.hover({ border = window.border }) - end, { desc = "Hover Documentation" }) - -- vim.keymap.set("n", "", function() - -- vim.lsp.buf.signature_help({ border = border }) - -- end, { desc = "Signature Documentation" }) + -- vim.keymap.set("n", "", vim.lsp.buf.signature_help, { desc = "Signature Documentation" }) end, }) @@ -128,7 +123,7 @@ vim.api.nvim_create_autocmd("LspAttach", { end, }) --- Setup cursor hover symbol highlight +-- Disable lsp based syntax highlighting vim.api.nvim_create_autocmd("LspAttach", { callback = function(event) local client = vim.lsp.get_client_by_id(event.data.client_id) diff --git a/nvim/dot-config/nvim/lua/options.lua b/nvim/dot-config/nvim/lua/options.lua index 8a8813d..f40647c 100644 --- a/nvim/dot-config/nvim/lua/options.lua +++ b/nvim/dot-config/nvim/lua/options.lua @@ -1,5 +1,5 @@ local diagnostic = require("symbols.diagnostic") -local border = require("symbols.window").border +local window = require("symbols.window") -- Set highlight on search vim.o.hlsearch = true @@ -68,6 +68,9 @@ vim.o.list = true -- Fold settings vim.o.foldlevelstart = 99 +-- Windows borders +-- vim.o.winborder = window.border + -- LSP config vim.diagnostic.config({ severity_sort = true, diff --git a/nvim/dot-config/nvim/lua/plugins/blink.lua b/nvim/dot-config/nvim/lua/plugins/blink.lua index 202078f..cb9b840 100644 --- a/nvim/dot-config/nvim/lua/plugins/blink.lua +++ b/nvim/dot-config/nvim/lua/plugins/blink.lua @@ -1,4 +1,3 @@ -local window = require("symbols.window") return { "saghen/blink.cmp", -- optional: provides snippets for the snippet source @@ -56,9 +55,6 @@ return { documentation = { auto_show = true, auto_show_delay_ms = 0, - window = { - border = window.border, - }, }, menu = { auto_show = true, @@ -77,15 +73,11 @@ return { }, }, }, - border = window.border, }, }, signature = { enabled = true, - window = { - border = window.border, - }, trigger = { show_on_accept = true, show_on_insert = true, diff --git a/nvim/dot-config/nvim/lua/plugins/telescope.lua b/nvim/dot-config/nvim/lua/plugins/telescope.lua index 5f4336a..48c555f 100644 --- a/nvim/dot-config/nvim/lua/plugins/telescope.lua +++ b/nvim/dot-config/nvim/lua/plugins/telescope.lua @@ -1,4 +1,5 @@ -- https://github.com/nvim-telescope/telescope.nvim +local window = require("symbols.window") -- TODO: Ensure installed ripgrep return { "nvim-telescope/telescope.nvim", @@ -35,7 +36,7 @@ return { [""] = "move_selection_better", }, }, - borderchars = require("symbols.window").borderchars, + borderchars = window.borderchars, }, extensions = { ["ui-select"] = { @@ -44,6 +45,20 @@ return { }, }) + -- HACK: Workaround until new borders are fixed in telescope + vim.api.nvim_create_autocmd("User", { + pattern = "TelescopeFindPre", + callback = function() + vim.opt_local.winborder = "none" + vim.api.nvim_create_autocmd("WinLeave", { + once = true, + callback = function() + vim.opt_local.winborder = window.border + end, + }) + end, + }) + require("telescope").load_extension("fzf") require("telescope").load_extension("ui-select")