Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dotfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tim van Deurzen
dotfiles
Commits
ab0effe5
Commit
ab0effe5
authored
3 years ago
by
Tim van Deurzen
Browse files
Options
Downloads
Patches
Plain Diff
Update lsp-signature settings and LSP settings.
parent
6944de80
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
neovim/lua/lsp/init.lua
+31
-30
31 additions, 30 deletions
neovim/lua/lsp/init.lua
neovim/lua/plugins/init.lua
+2
-22
2 additions, 22 deletions
neovim/lua/plugins/init.lua
with
33 additions
and
52 deletions
neovim/lua/lsp/init.lua
+
31
−
30
View file @
ab0effe5
...
...
@@ -188,34 +188,35 @@ lsp_config.efm.setup {
}
}
vim
.
lsp
.
handlers
[
"textDocument/publishDiagnostics"
]
=
vim
.
lsp
.
with
(
vim
.
lsp
.
diagnostic
.
on_publish_diagnostics
,
{
underline
=
true
,
virtual_text
=
{
prefix
=
" » "
,
spacing
=
8
,
severity_limit
=
"Error"
,
-- vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
-- vim.lsp.diagnostic.on_publish_diagnostics, {
-- underline = true,
-- virtual_text = {
-- prefix = " » ",
-- spacing = 8,
-- 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
,
update_in_insert
=
true
,
}
)
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
decorator
=
{
"`"
,
"`"
}
-- decoractor can be `decorator = {"***", "***"}` `decorator = {"**", "**"}` `decorator = {"**_", "_**"}`
-- `decorator = {"*", "*"} see markdown help for more details
-- <u></u> ~ ~ does not supported by nvim
})
This diff is collapsed.
Click to expand it.
neovim/lua/plugins/init.lua
+
2
−
22
View file @
ab0effe5
...
...
@@ -202,28 +202,8 @@ return require('packer').startup(function()
use
{
"ray-x/lsp_signature.nvim"
,
config
=
function
()
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
=
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
-- config = function()
-- end
}
use
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment