diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-02-26 12:35:42 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-02-26 12:35:42 +0100 |
| commit | 3ea96709fcd2c76200bdfb8e0de9739caa108d17 (patch) | |
| tree | 7f87cc1213b45e1477e4bcae9daa2a915d36aab3 /lua | |
| parent | 4436aa839848958eab53487c1db1bb1d00c444e0 (diff) | |
| download | nvim-conf-3ea96709fcd2c76200bdfb8e0de9739caa108d17.tar.gz nvim-conf-3ea96709fcd2c76200bdfb8e0de9739caa108d17.zip | |
set spaces for go, update lsp config for diagnostic
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/alpha/lsp.lua | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lua/alpha/lsp.lua b/lua/alpha/lsp.lua index 5133edf..aa06eb3 100644 --- a/lua/alpha/lsp.lua +++ b/lua/alpha/lsp.lua @@ -53,15 +53,18 @@ lsp_installer.on_server_ready(function(server) vim.cmd [[ do User LspAttachBuffers ]] end) -require "lspconfig".efm.setup { - init_options = {documentFormatting = true}, - settings = { - rootMarkers = {".git/"}, - languages = { - blade = { - {formatCommand = "blade-formatter --stdin", formatStdin = true} - }, - json = {} - } + +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, { + underline = true, + update_in_insert = false, + virtual_text = { spacing = 2, prefix = "●" }, + severity_sort = true, } -} +) + +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 |