Summary
This article provides a guide on configuring LSP inlay hints for certain programming languages in Neovim using the inlay-hints.nvim plugin.
Abstract
The article "Neovim for Beginners — LSP Inlay Hints" is a guide on configuring LSP inlay hints for programming languages that support this feature in Neovim. The guide uses the inlay-hints.nvim plugin and provides instructions on how to install it using packer.nvim. The article also covers the configuration of settings for the sumneko_lua, gopls, and tsserver language servers. Additionally, the article includes code snippets for attaching to the language server in the on_attach method and configuring inlay hints for Rust in the lua/config/lsp/installer.lua file. The article concludes with examples of inlay hints for Rust, Lua, Go, and Typescript, and suggests alternative plugins to try.
Bullet points
- The article is part of the "Neovim for Beginners" series.
- The Neovim configuration files are available in a GitHub repository.
- The
inlay-hints.nvim plugin is used to configure LSP inlay hints.
- The plugin is installed using
packer.nvim.
- The settings for the
sumneko_lua, gopls, and tsserver language servers are configured.
- Code is added to attach to the language server in the
on_attach method.
- Inlay hints for Rust are configured in the
lua/config/lsp/installer.lua file.
- Examples of inlay hints for Rust, Lua, Go, and Typescript are provided.
- Alternative plugins to try are suggested.
- The article is part of a series on learning Neovim the practical way.