Skip to content

Dead functions show_active_diagnostics_on_cursor_line and enable_inlay_hints defined but never called in nvim-lspconfig.lua #155

Description

@ooloth

Current state

lua/config/plugins/specs/nvim-lspconfig.lua defines two functions — show_active_diagnostics_on_cursor_line (lines ~97–105) and enable_inlay_hints (lines ~107–110) — whose only call sites are commented-out lines at ~136–137 (-- show_active_diagnostics_on_cursor_line() and -- enable_inlay_hints(event) with speculative notes "let's see if I miss this" and "toggle on with leader-ui"). No uncommented code calls either function. A reader encountering these definitions cannot tell whether they represent planned-but-deferred behaviour or abandoned experiments.

Ideal state

  • Both functions are deleted from the file, or
  • Their call sites are uncommented and the functions execute at the intended edge (the LspAttach autocmd callback); the speculative notes are removed.
  • No function definition exists in the file whose only call site is a comment.

Out of scope

  • Deciding whether inlay hints or cursor-line diagnostics are desirable features — that is a separate question from removing dead code

Starting points

  • lua/config/plugins/specs/nvim-lspconfig.lua lines ~97–137

QA plan

  1. Open lua/config/plugins/specs/nvim-lspconfig.lua — expect neither show_active_diagnostics_on_cursor_line nor enable_inlay_hints appears as a function definition.
  2. Run nvim --headless -c "qall" — expect a clean exit with no Lua errors.
  3. Open a file with an attached LSP server — expect diagnostics and inlay hints to behave consistently (not broken by the removal).

Done when

Neither show_active_diagnostics_on_cursor_line nor enable_inlay_hints is defined in nvim-lspconfig.lua.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions