Skip to content

Conversation

@DOD-101
Copy link
Contributor

@DOD-101 DOD-101 commented Sep 24, 2025

Using vim.fn.sign_define for diagnostic signs is deprecated.

Description

This commit will still fall back on those deprecated sign definitions,
if the new ones created via vim.diagnostic.config() are not defined.

This code is largely taken from #3146
with minor adjustments to actually make it work this time.

Please include a summary of the change and which issue is fixed. Please also
include relevant motivation and context

Related to this issue: #3464 (they ended up using vim.fn.sign_define)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration

  1. Setup vim.diagnostic
vim.diagnostic.config({
	signs = { text = { "󰅚", "󰀪", "󰌶", "" } }
})
  1. Setup an LSP to get diagnostic messages
  2. Open diagnostic picker

Configuration:

  • Neovim version (nvim --version):
NVIM v0.11.3
Build type: Release
LuaJIT 2.1.1741730670
  • Operating system and version:
NixOS 25.11 (Xantusia) x86_64
Linux 6.12.41

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

Copy link
Member

@Conni2461 Conni2461 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, also tested and works. thanks :)

Using vim.fn.sign_define for diagnostic signs is deprecated.

This commit will still fall back on those deprecated sign definitions,
if the new ones created via `vim.diagnostic.config()` are not defined.

This code is largely taken from
nvim-telescope#3146
with minor adjustments to actually make it work this time.
@Conni2461 Conni2461 force-pushed the fix-diagnostic-config branch from 5597965 to 95b2ee0 Compare November 5, 2025 22:27
@Conni2461 Conni2461 merged commit 71ef4dc into nvim-telescope:master Nov 5, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants