diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-07-24 20:46:17 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-07-24 20:46:35 +0200 |
| commit | cde37f523581cecfe8cd708f964f2d34934c6907 (patch) | |
| tree | 9a00b820274677763b56fb68c648647d10d0e295 /after/plugin/lsp.lua | |
| parent | 4acd2329872ccc4a2c32b2777201461d254098b4 (diff) | |
| download | nvim-conf-cde37f523581cecfe8cd708f964f2d34934c6907.tar.gz nvim-conf-cde37f523581cecfe8cd708f964f2d34934c6907.zip | |
Update config to mason, lsp lines, remove old plugins
Diffstat (limited to 'after/plugin/lsp.lua')
| -rw-r--r-- | after/plugin/lsp.lua | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 8b8d1b2..d025ad1 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -1,14 +1,18 @@ local telescope_mapper = require("alpha.telescope.mappings") -local filetype_attach = setmetatable({ - go = function(_) +local format_on_save = function(_) vim.cmd([[ augroup lsp_buf_format au! BufWritePre <buffer> - autocmd BufWritePre <buffer> :lua vim.lsp.buf.formatting_sync() + autocmd BufWritePre <buffer> :lua vim.lsp.buf.format({ async = true }) augroup END ]]) - end, + end + +local filetype_attach = setmetatable({ + go = format_on_save, + php = format_on_save, + lua = format_on_save, gdscript = function(_) end, }, { @@ -42,12 +46,12 @@ local function on_attach(client) filetype_attach[filetype](client) end -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, -}) +-- 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 |