Commit ab0effe5 authored by Tim van Deurzen's avatar Tim van Deurzen

Update lsp-signature settings and LSP settings.

parent 6944de80
...@@ -188,34 +188,35 @@ lsp_config.efm.setup { ...@@ -188,34 +188,35 @@ lsp_config.efm.setup {
} }
} }
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( -- vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, { -- vim.lsp.diagnostic.on_publish_diagnostics, {
underline = true, -- underline = true,
virtual_text = { -- virtual_text = {
prefix = " » ", -- prefix = " » ",
spacing = 8, -- spacing = 8,
severity_limit = "Error", -- severity_limit = "Warning",
-- },
-- signs = true,
-- update_in_insert = true,
-- }
-- )
require('lsp_signature').on_attach({
bind = true, -- This is mandatory, otherwise border config won't get registered.
-- If you want to hook lspsaga or other signature handler, pls set to false
doc_lines = 4, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
-- set to 0 if you do not want any API comments be shown
-- This setting only take effect in insert mode, it does not affect signature help in normal
-- mode
hint_enable = true, -- virtual hint enable
hint_prefix = "↑ ", -- Panda for parameter
hint_scheme = "String",
use_lspsaga = false, -- set to true if you want to use lspsaga popup
handler_opts = {
border = "shadow" -- double, single, shadow, none
}, },
signs = true, decorator = {"`", "`"} -- decoractor can be `decorator = {"***", "***"}` `decorator = {"**", "**"}` `decorator = {"**_", "_**"}`
update_in_insert = true, -- `decorator = {"*", "*"} see markdown help for more details
} -- <u></u> ~ ~ does not supported by nvim
) })
do
local default_handler = vim.lsp.handlers["textdocument/publishdiagnostics"]
vim.lsp.handlers["textdocument/publishdiagnostics"] = function(err, method, result, client_id, bufnr, config)
default_handler(err, method, result, client_id, bufnr, config)
local diagnostics = vim.lsp.diagnostic.get_all()
local qflist = {}
for bufnr_, diagnostic in pairs(diagnostics) do
for _, d in ipairs(diagnostic) do
d.bufnr = bufnr_
d.lnum = d.range.start.line + 1
d.col = d.range.start.character + 1
d.text = d.message
table.insert(qflist, d)
end
end
vim.lsp.util.set_qflist(qflist)
end
end
...@@ -202,28 +202,8 @@ return require('packer').startup(function() ...@@ -202,28 +202,8 @@ return require('packer').startup(function()
use { use {
"ray-x/lsp_signature.nvim", "ray-x/lsp_signature.nvim",
config = function() -- config = function()
require('lsp_signature').on_attach({ -- end
bind = true, -- This is mandatory, otherwise border config won't get registered.
-- If you want to hook lspsaga or other signature handler, pls set to false
doc_lines = 2, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
-- set to 0 if you do not want any API comments be shown
-- This setting only take effect in insert mode, it does not affect signature help in normal
-- mode
hint_enable = true, -- virtual hint enable
hint_prefix = "🐼 ", -- Panda for parameter
hint_scheme = "String",
use_lspsaga = false, -- set to true if you want to use lspsaga popup
handler_opts = {
border = "shadow" -- double, single, shadow, none
},
decorator = {"`", "`"} -- decoractor can be `decorator = {"***", "***"}` `decorator = {"**", "**"}` `decorator = {"**_", "_**"}`
-- `decorator = {"*", "*"} see markdown help for more details
-- <u></u> ~ ~ does not supported by nvim
})
end
} }
use { use {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment