Skip to content

:FindIdentifier{Definition,Declaration} fails with internal Lua error when identifier is not found #15

@edwintorok

Description

@edwintorok

They work when the identifier can be found, but e.g. if you typo the name (or don't type the full name), then you get an internal Lua error:

Invalid response from server.
Error executing Lua callback: ...onfig/nvim/pack/nvim/start/ocaml.nvim/lua/ocaml/init.lua:255: attempt to index local 'parsed' (a nil value)
stack traceback:
        ...onfig/nvim/pack/nvim/start/ocaml.nvim/lua/ocaml/init.lua:255: in function 'with_server'
        ...onfig/nvim/pack/nvim/start/ocaml.nvim/lua/ocaml/init.lua:247: in function 'find_identifier_decl'
        ...onfig/nvim/pack/nvim/start/ocaml.nvim/lua/ocaml/init.lua:324: in function <...onfig/nvim/pack/nvim/start/ocaml.nvim/lua/ocaml/init.lua
:323>

Would be nice to get an actual error message instead, because this error is indistinguishable from a plugin bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions