https://github.com/willothy/luahint
LSP inline hints for Lua, intended for use with Neovim.
https://github.com/willothy/luahint
Last synced: about 1 year ago
JSON representation
LSP inline hints for Lua, intended for use with Neovim.
- Host: GitHub
- URL: https://github.com/willothy/luahint
- Owner: willothy
- Created: 2023-05-31T05:48:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-31T12:41:03.000Z (about 3 years ago)
- Last Synced: 2025-03-30T22:24:33.158Z (over 1 year ago)
- Language: Rust
- Size: 31.3 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# luahint
LSP inline hints for Lua, intended for use with Neovim.
Now that inline hints are working in Neovim nightly, I figured I'd attempt to build an LSP-adjacent project. Luahint provides inline parameter hints via LSP, and potentially more in the future. It's a work in progress right now, but here's a screenshot:

## Goals
- [x] Basic function parameter hints
- [ ] Index entire runtime (currently only indexes single file)
- [ ] Table function parameter hints
- [ ] Method parameter hints
- [ ] Metamethod parameter hints
- [ ] Emmylua type hints
## Installation
With `lazy.nvim`
```lua
{
"willothy/luahint",
build = "cargo install --path=./",
config = true
-- or opts = { ... }
}
```
## Configuration
Luahint comes with the following defaults:
```lua
{
-- string[] | string
-- Autocommands that should trigger a refresh
update = {
"CursorHold",
"CursorHoldI",
"InsertLeave",
"TextChanged",
},
-- boolean
-- Whether to enable the plugin at startup
enabled_at_startup = true,
-- fun(): string
-- Function to determine the root directory of the project
root_dir = vim.fn.getcwd,
}
```
## Usage
```lua
local hints = require("luahint")
-- show the hints
hints.show()
-- hide the hints
hints.hide()
-- toggle the hints
hints.toggle()
```