garymjr / garymjr/nvim-snippets
`utils.reload_file` appears to not work
- Dominant language
- Lua
- Stars
- 259
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
I tried setting up [`nvim-scissors`](https://github.com/chrisgrieser/nvim-scissors), which requires `nvim-snippets` as a dependency, and it looks like when I try creating/editing a snippet, the `reload_file` function throws an error:
https://github.com/chrisgrieser/nvim-scissors/issues/15#issuecomment-2416337361
This error message appears whenever I try creating or editing an existing snippet.
```sh
❯ nvim --version
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382
Run "nvim -V1 -v" for more info
```
I have configured `nvim-scissors` with `lazy.nvim` like:
```lua
return require("lazy").setup({
{
"chrisgrieser/nvim-scissors",
dependencies = { "nvim-telescope/telescope.nvim", "garymjr/nvim-snippets" },
},
})
```
I am then calling `.setup()` like this:
```lua
require("scissors").setup({
snippetDir = vim.fn.stdpath("config") .. "/snippets",
jsonFormatter = "jq",
})
```
`nvim/snippets/package.json`:
```json
{
"name": "my-snippets",
"contributes": {
"snippets": [
{
"language": "lua",
"path": "./lua.json"
},
]
}
}
```
`nvim/snippets/lua.json`
```json
{
"TODO": {
"body": "-- TODO: ${1:TODO}",
"prefix": "td"
}
}
```
My snippets are getting updated and saved, but it just looks like they're not getting reloaded whenever they change because `reload_file` isn't working
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting the utils.reload_file entry point and reproducing the error while creating or editing a snippet through nvim-scissors. Compare the saved nvim/snippets/lua.json with the reload behavior and verify that changes are picked up without restarting Neovim.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100