Skip to content

Commit

Permalink
fix: tested with neovim 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
realeinherjar committed Sep 21, 2023
1 parent 04c1f54 commit a2f6892
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ vscode-langservers-extracted pyright lua-language-server`

## Tmux

Additinally you can use my tmux config to have a nice status bar.
Additionally you can use my tmux config to have a nice status bar.
They are located in `tmux.conf`.
13 changes: 6 additions & 7 deletions lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ return {
config = true,
},
},
opts = function(_, opts)
opts.inlay_hints.enabled = true
end,
config = function()
-- IMPORTANT: make sure to setup neodev BEFORE lspconfig
require("neodev").setup()
Expand Down Expand Up @@ -105,12 +102,14 @@ return {
vim.keymap.set("n", "<leader>cwl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, { desc = "[L]ist Folders" })
-- Enable inlay hints (depends on neovim 0.10)
if vim.lsp.inlay_hint then
vim.lsp.buf.inlay_hint(0, true) -- toggle on by default
-- Enable inlay hints
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client.supports_method("textDocument/inlayHint") then
vim.g.inlay_hints_visible = true
vim.lsp.inlay_hint(ev.buf, true)
-- set the keymap to toggle on/off
vim.keymap.set("n", "<leader>ch", function()
vim.lsp.inlay_hint(0, nil)
vim.lsp.inlay_hint(ev.buf, nil)
end, { desc = "Toggle Inlay [H]ints" })
end
end,
Expand Down

0 comments on commit a2f6892

Please sign in to comment.