allow for user to toggle lsp_diag underline (#221)
Co-authored-by: Patrick Artounian <patrick.artounian@insomniac.com>
This commit is contained in:
parent
24270e540b
commit
0e3a10f595
@ -539,7 +539,7 @@ By default load .env file in current directory, if you want to load other file,
|
||||
* GoGenReturn
|
||||
|
||||
create return value for current function
|
||||
e.g. if we have
|
||||
e.g. if we have
|
||||
```go
|
||||
func Foo() (int, error) {
|
||||
return 1, nil
|
||||
@ -638,6 +638,7 @@ require('go').setup({
|
||||
-- end
|
||||
-- to setup a table of codelens
|
||||
lsp_diag_hdlr = true, -- hook lsp diag handler
|
||||
lsp_diag_underline = true,
|
||||
-- virtual text setup
|
||||
lsp_diag_virtual_text = { space = 0, prefix = "" },
|
||||
lsp_diag_signs = true,
|
||||
|
@ -42,6 +42,7 @@ _GO_NVIM_CFG = {
|
||||
lsp_keymaps = true, -- true: use default keymaps defined in go/lsp.lua
|
||||
lsp_codelens = true,
|
||||
lsp_diag_hdlr = true, -- hook lsp diag handler
|
||||
lsp_diag_underline = true,
|
||||
-- virtual text setup
|
||||
lsp_diag_virtual_text = { space = 0, prefix = "" },
|
||||
lsp_diag_signs = true,
|
||||
|
@ -52,9 +52,9 @@ if nvim_0_6 then
|
||||
diag_hdlr = diag_hdlr_0_6
|
||||
end
|
||||
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(diag_hdlr, {
|
||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(diag_hdlr, {
|
||||
-- Enable underline, use default values
|
||||
underline = true,
|
||||
underline = _GO_NVIM_CFG.lsp_diag_underline,
|
||||
-- Enable virtual text, override spacing to 0
|
||||
virtual_text = _GO_NVIM_CFG.lsp_diag_virtual_text,
|
||||
-- Use a function to dynamically turn signs off
|
||||
|
Loading…
Reference in New Issue
Block a user