mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 04:04:24 -05:00
Custom borders for hovering and diagnostics
This commit is contained in:
21
lua/utils/after.lua
Normal file
21
lua/utils/after.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local function rounded_border()
|
||||
return { '╭', '─', '╮', '│', '╯', '─', '╰', '│' }
|
||||
end
|
||||
|
||||
-- Buffer the original fuction
|
||||
local nvim_open_win = vim.api.nvim_open_win
|
||||
|
||||
-- Set color to a slight gray
|
||||
vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'None', fg = '#a0a0a0' })
|
||||
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'None' })
|
||||
|
||||
-- Border overwrite
|
||||
vim.api.nvim_open_win = function(buf, enter, opts)
|
||||
opts = opts or {}
|
||||
|
||||
if opts.border == nil then
|
||||
opts.border = rounded_border()
|
||||
end
|
||||
|
||||
return nvim_open_win(buf, enter, opts)
|
||||
end
|
||||
@@ -71,9 +71,10 @@ function M.get_lsp_servers()
|
||||
end
|
||||
|
||||
if vim.fn.executable("deno") == 1 then
|
||||
table.insert(servers, "denols")
|
||||
--table.insert(servers, "denols")
|
||||
table.insert(servers, "ts_ls")
|
||||
else
|
||||
warn_once("deno", "[mason] Skipping denols (deno not found)")
|
||||
warn_once("deno", "[mason] Skipping denols and tsserver (deno not found)")
|
||||
end
|
||||
|
||||
-- Only configure zig when in local environment
|
||||
|
||||
Reference in New Issue
Block a user