nvim: fix inlay hint setup function signature
This commit is contained in:
parent
65c59c6ff1
commit
ce7ccba751
2 changed files with 5 additions and 5 deletions
|
@ -97,8 +97,8 @@
|
|||
#(telescope-builtin.lsp_dynamic_workspace_symbols telescope-dropdown)
|
||||
{:buffer bufnr :desc "LSP Workspace Symbols"})
|
||||
(keymap.set :n :<leader>th
|
||||
#(vim.lsp.inlay_hint.enable bufnr
|
||||
(not (vim.lsp.inlay_hint.is_enabled bufnr)))
|
||||
#(vim.lsp.inlay_hint.enable (not (vim.lsp.inlay_hint.is_enabled bufnr))
|
||||
{: bufnr})
|
||||
{:buffer bufnr :desc "Toggle Inlay Hints"})
|
||||
(keymap.set :n :<leader>lca
|
||||
#(telescope-builtin.lsp_code_actions telescope-dropdown)
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
aucmd vim.api.nvim_create_autocmd
|
||||
ns (vim.api.nvim_create_namespace :nifoc_lsp_float)]
|
||||
(fn setup-inlay-hint-toggle [bufnr]
|
||||
(aucmd :InsertEnter {:callback #(vim.lsp.inlay_hint.enable bufnr false)
|
||||
(aucmd :InsertEnter {:callback #(vim.lsp.inlay_hint.enable false {: bufnr})
|
||||
:buffer bufnr
|
||||
:group augroup})
|
||||
(aucmd :InsertLeave {:callback #(vim.lsp.inlay_hint.enable bufnr true)
|
||||
(aucmd :InsertLeave {:callback #(vim.lsp.inlay_hint.enable true {: bufnr})
|
||||
:buffer bufnr
|
||||
:group augroup}))
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
(navic.attach client bufnr))
|
||||
(when (client.supports_method :textDocument/inlayHint
|
||||
{: bufnr})
|
||||
(vim.lsp.inlay_hint.enable bufnr true)
|
||||
(vim.lsp.inlay_hint.enable true {: bufnr})
|
||||
(setup-inlay-hint-toggle bufnr))
|
||||
(diagnostic.maybe-enable-lsp client bufnr)))
|
||||
:group augroup
|
||||
|
|
Loading…
Reference in a new issue