all repos

init.lua @ 649e779

my nvim config
2 files changed, 9 insertions(+), 10 deletions(-)
updated lsp config
Author: flof-ik ss2316544@gmail.com
Committed at: 2022-02-24 22:21:20 +0200
Parent: 58ab6f4
M lua/fk/lsp/diagnostic.lua

@@ -1,8 +1,8 @@

return { - virtual_text = false, - update_in_insert = true, + virtual_text = true, + update_in_insert = false, underline = true, - severity_sort = true, + severity_sort = false, signs = { active = { { name = "DiagnosticSignError", text = "" },

@@ -12,7 +12,7 @@ { name = "DiagnosticSignInfo", text = "" },

}, }, float = { - focusable = false, + focusable = true, style = "minimal", border = "rounded", source = "always",
M lua/fk/lsp/init.lua

@@ -4,6 +4,10 @@ local M = {}

function M.setup() vim.diagnostic.config(diagnostic) + -- Diagnostics + for _, sign in ipairs(diagnostic.signs.active) do + vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) + end require("nvim-lsp-installer").on_server_ready(function(server) require "fk.lsp.null" -- null-ls setup

@@ -12,12 +16,7 @@ on_attach = on_attach,

capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()), } - -- set signs - for _, sign in ipairs(diagnostic.signs.active) do - vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) - end - - -- set server config him exists + -- setup server config if it exists local ok, server_opts = pcall(require, "fk.lsp.providers." .. server.name) if ok then opts = vim.tbl_deep_extend("force", opts, server_opts or {})