all repos

init.lua @ 088c7f96263a2f2fde0afdb0d023aac9219ce592

my nvim config
1 files changed, 9 insertions(+), 9 deletions(-)
refactor(lsp): diagnostic
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2023-07-21 19:49:00 +0300
Parent: 63cb918
M lua/plugins/lsp/diagnostic.lua

@@ -1,6 +1,6 @@

-local M = {} +local diagnistic = {} -M.border = { +diagnistic.border = { { "", "FloatBorder" }, { "", "FloatBorder" }, { "", "FloatBorder" },

@@ -11,7 +11,7 @@ { "", "FloatBorder" },

{ "", "FloatBorder" }, } -M.diagnostic = { +diagnistic.diagnostic = { virtual_text = true, update_in_insert = false, underline = true,

@@ -27,21 +27,21 @@ },

float = { focusable = true, style = "minimal", - border = M.border, + border = diagnistic.border, source = "always", header = "", prefix = "", }, } -function M.setup() +function diagnistic.setup() vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = M.border, + border = diagnistic.border, }) - vim.diagnostic.config(M.diagnostic) - for _, sign in ipairs(M.diagnostic.signs.active) do + vim.diagnostic.config(diagnistic.diagnostic) + for _, sign in ipairs(diagnistic.diagnostic.signs.active) do vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text,

@@ -50,4 +50,4 @@ })

end end -return M +return diagnistic