Compare commits

...

2 Commits

4 changed files with 33 additions and 18 deletions

View File

@ -90,12 +90,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
) )
-- Documentation -- Documentation
vim.keymap.set("n", "K", function() -- vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, { desc = "Signature Documentation" })
vim.lsp.buf.hover({ border = window.border })
end, { desc = "Hover Documentation" })
-- vim.keymap.set("n", "<C-k>", function()
-- vim.lsp.buf.signature_help({ border = border })
-- end, { desc = "Signature Documentation" })
end, end,
}) })
@ -128,7 +123,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
end, end,
}) })
-- Setup cursor hover symbol highlight -- Disable lsp based syntax highlighting
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd("LspAttach", {
callback = function(event) callback = function(event)
local client = vim.lsp.get_client_by_id(event.data.client_id) local client = vim.lsp.get_client_by_id(event.data.client_id)

View File

@ -1,5 +1,5 @@
local diagnostic = require("symbols.diagnostic") local diagnostic = require("symbols.diagnostic")
local border = require("symbols.window").border local window = require("symbols.window")
-- Set highlight on search -- Set highlight on search
vim.o.hlsearch = true vim.o.hlsearch = true
@ -68,6 +68,9 @@ vim.o.list = true
-- Fold settings -- Fold settings
vim.o.foldlevelstart = 99 vim.o.foldlevelstart = 99
-- Windows borders
vim.o.winborder = window.border
-- LSP config -- LSP config
vim.diagnostic.config({ vim.diagnostic.config({
severity_sort = true, severity_sort = true,

View File

@ -1,4 +1,3 @@
local window = require("symbols.window")
return { return {
"saghen/blink.cmp", "saghen/blink.cmp",
-- optional: provides snippets for the snippet source -- optional: provides snippets for the snippet source
@ -21,7 +20,17 @@ return {
["<C-d>"] = { "scroll_documentation_down" }, ["<C-d>"] = { "scroll_documentation_down" },
["<CR>"] = { "accept", "fallback" }, ["<CR>"] = { "accept", "fallback" },
["<Esc>"] = { "cancel", "fallback" }, ["<Esc>"] = {
function(cmp)
if cmp.is_visible() then
cmp.cancel()
if cmp.get_selected_item_idx() ~= nil then
return true
end
end
end,
"fallback",
},
["<Tab>"] = { "select_next", "snippet_forward", "fallback" }, ["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" }, ["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
@ -56,9 +65,6 @@ return {
documentation = { documentation = {
auto_show = true, auto_show = true,
auto_show_delay_ms = 0, auto_show_delay_ms = 0,
window = {
border = window.border,
},
}, },
menu = { menu = {
auto_show = true, auto_show = true,
@ -77,15 +83,11 @@ return {
}, },
}, },
}, },
border = window.border,
}, },
}, },
signature = { signature = {
enabled = true, enabled = true,
window = {
border = window.border,
},
trigger = { trigger = {
show_on_accept = true, show_on_accept = true,
show_on_insert = true, show_on_insert = true,

View File

@ -1,4 +1,5 @@
-- https://github.com/nvim-telescope/telescope.nvim -- https://github.com/nvim-telescope/telescope.nvim
local window = require("symbols.window")
-- TODO: Ensure installed ripgrep -- TODO: Ensure installed ripgrep
return { return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
@ -35,7 +36,7 @@ return {
["<S-Tab>"] = "move_selection_better", ["<S-Tab>"] = "move_selection_better",
}, },
}, },
borderchars = require("symbols.window").borderchars, borderchars = window.borderchars,
}, },
extensions = { extensions = {
["ui-select"] = { ["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("fzf")
require("telescope").load_extension("ui-select") require("telescope").load_extension("ui-select")