From ce7ccba751490439133f889c773695bfd7689efa Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sat, 20 Apr 2024 19:13:41 +0200 Subject: [PATCH] nvim: fix inlay hint setup function signature --- home/config/nvim/nifoc/keymap.fnl | 4 ++-- home/config/nvim/plugins/lsp.fnl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/home/config/nvim/nifoc/keymap.fnl b/home/config/nvim/nifoc/keymap.fnl index 46e4c8a..b590c9e 100644 --- a/home/config/nvim/nifoc/keymap.fnl +++ b/home/config/nvim/nifoc/keymap.fnl @@ -97,8 +97,8 @@ #(telescope-builtin.lsp_dynamic_workspace_symbols telescope-dropdown) {:buffer bufnr :desc "LSP Workspace Symbols"}) (keymap.set :n :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 :lca #(telescope-builtin.lsp_code_actions telescope-dropdown) diff --git a/home/config/nvim/plugins/lsp.fnl b/home/config/nvim/plugins/lsp.fnl index 7cbafaa..c2cdfbb 100644 --- a/home/config/nvim/plugins/lsp.fnl +++ b/home/config/nvim/plugins/lsp.fnl @@ -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