From afbf49f0a65a0ea77ecba455f17f592efe3089d8 Mon Sep 17 00:00:00 2001 From: Leander <80996591+m0ntagur@users.noreply.github.com> Date: Sat, 13 Aug 2022 00:27:04 +0200 Subject: Add files via upload --- lspconfig.lua | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lspconfig.lua (limited to 'lspconfig.lua') diff --git a/lspconfig.lua b/lspconfig.lua new file mode 100644 index 0000000..80950e3 --- /dev/null +++ b/lspconfig.lua @@ -0,0 +1,38 @@ +local status, lspconfig = pcall(require, 'lspconfig') +if (not status) then return end + + + +lspconfig.pyright.setup {} + +lspconfig.sumneko_lua.setup { + settings = { + Lua = { + diagnostics = { + -- get the language server to recognize the 'vim' globals + globals = { 'vim' } + }, + + workspace = { + libary = vim.api.nvim_get_runtime_file("", true) + } + } + } +} + +-- Diagnostic symbols in the sign column (gutter) +local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } +for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) +end + +vim.diagnostic.config({ + virtual_text = { + prefix = '●' + }, + update_in_insert = true, + float = { + source = "always", -- Or "if_many" + }, +}) -- cgit v1.3.1