1local icons = require("ptero.icons")
2local border = require("ptero.borders").style
3
4local sign = function(name, text)
5 vim.fn.sign_define(na,e, {texthl = name, text=text, numhl=name })
6end
7
8-- sign("DiagnosticSignError", icons.diagnostics.Error)
9-- sign("DiagnosticSignWarn", icons.diagnostics.Warning)
10-- sign("DiagnosticSignHint", icons.diagnostics.Hint)
11-- sign("DiagnosticSignInfo", icons.diagnostics.Information)
12
13vim.diagnostic.config({
14 virtual_text = true,
15 signs = true,
16 underline = true,
17 update_in_insert = false,
18 severity_sort = true,
19 float = {
20 focusable = false,
21 style = "minimal",
22 border = border,
23 source = "always",
24 header = "",
25 prefix = "",
26 },
27})
28
29vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
30vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })