Skip to content
Snippets Groups Projects
Commit cbfd25c6 authored by iliya's avatar iliya
Browse files

feat: rounded corners floating windows, voloured ring on float window

parent 26b31551
No related branches found
No related tags found
No related merge requests found
-- local border = {
-- { "🭽", "FloatBorder" },
-- { "▔", "FloatBorder" },
-- { "🭾", "FloatBorder" },
-- { "▕", "FloatBorder" },
-- { "🭿", "FloatBorder" },
-- { "▁", "FloatBorder" },
-- { "🭼", "FloatBorder" },
-- { "▏", "FloatBorder" },
-- }
--
-- LSP settings (for overriding per client)
local handlers = {
-- ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }),
-- ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }),
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'rounded' }),
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = 'rounded' }),
}
-- [[ Configure LSP ]] -- [[ Configure LSP ]]
-- This function gets run when an LSP connects to a particular buffer. -- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr) local on_attach = function(_, bufnr)
...@@ -14,6 +32,11 @@ local on_attach = function(_, bufnr) ...@@ -14,6 +32,11 @@ local on_attach = function(_, bufnr)
-- focusable = true, -- focusable = true,
-- }, -- },
-- } -- }
--
--
--
--
--
local signs = { Error = "", Warn = "", Hint = "", Info = "" } local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type local hl = "DiagnosticSign" .. type
...@@ -114,6 +137,7 @@ mason_lspconfig.setup_handlers { ...@@ -114,6 +137,7 @@ mason_lspconfig.setup_handlers {
function(server_name) function(server_name)
require('lspconfig')[server_name].setup { require('lspconfig')[server_name].setup {
capabilities = capabilities, capabilities = capabilities,
handlers = handlers,
on_attach = on_attach, on_attach = on_attach,
settings = servers[server_name], settings = servers[server_name],
filetypes = (servers[server_name] or {}).filetypes, filetypes = (servers[server_name] or {}).filetypes,
......
vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=#ea9a97]]
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
-- [[ Highlight on yank ]] -- [[ Highlight on yank ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment