diff options
| author | pml68 <tutorialmester@gmail.com> | 2024-05-20 21:53:48 +0200 |
|---|---|---|
| committer | pml68 <tutorialmester@gmail.com> | 2024-05-20 21:53:48 +0200 |
| commit | fa500847efc9c1201b87812fd8893a3fbaffac60 (patch) | |
| tree | a12861ca6114a0d5840f1ed9a68b937fc402270d /lua | |
| parent | feat: change nvim-highlight-colors render mode to 'virtual' (diff) | |
| download | nvim-fa500847efc9c1201b87812fd8893a3fbaffac60.tar.gz | |
feat: add remap for toggling inlay hints
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/pml68/remap.lua | 9 | ||||
| -rw-r--r-- | lua/pml68/settings.lua | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lua/pml68/remap.lua b/lua/pml68/remap.lua index 1d72477..eb37b9e 100644 --- a/lua/pml68/remap.lua +++ b/lua/pml68/remap.lua @@ -61,6 +61,15 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) vim.keymap.set({ 'n', 'x' }, '<S-f>', '<cmd>lua vim.lsp.buf.format({async = true})<CR>', opts) vim.keymap.set('n', 'gc', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) + -- u/Blan_11 + vim.keymap.set('n', '<leader>lh', function() + local ok = pcall(vim.lsp.inlay_hint.enable, vim.lsp.inlay_hint.is_enabled()) + if ok then + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) + else + vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled()) + end + end, { silent = true }) end }) diff --git a/lua/pml68/settings.lua b/lua/pml68/settings.lua index 27c20d5..6b71b1f 100644 --- a/lua/pml68/settings.lua +++ b/lua/pml68/settings.lua @@ -19,8 +19,6 @@ vim.o.incsearch = true vim.o.clipboard = "unnamedplus" -vim.o.termguicolors = true - vim.opt.whichwrap:append "<>[]hl" vim.g.netrw_browse_split = 0 |
