vim-illuminate icon indicating copy to clipboard operation
vim-illuminate copied to clipboard

bug: LSP provider doesn't handle multibyte strings

Open kiyoon opened this issue 6 months ago • 1 comments

Describe the bug

Note that the line without Korean characters (id_) is highlighted correctly.

Image

The treesitter and regex provider works correctly.

To Reproduce

Install basedpyright and vim-illuminate. Use the example code.

class 클래스(Base):  # noqa: N801
    __tablename__ = "Table"
    id_: Mapped[int] = mapped_column(primary_key=True)
    클래스ID: Mapped[int] = mapped_column()
    한글: Mapped[str] = mapped_column()
    한글2: Mapped[str] = mapped_column()
    테스트: Mapped[int] = mapped_column()

nvim -u repro.lua example.py

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
	spec = {
		{
			"RRethy/vim-illuminate",
			config = function()
				require("illuminate").configure({
					providers = {
						"lsp",
						"treesitter",
						"regex",
					},
				})
			end,
		},
		{
			"neovim/nvim-lspconfig",
		},
	},
})

vim.lsp.enable("basedpyright")

Output from :IlluminateDebug

buf_should_illuminate 1 true
config {
  case_insensitive_regex = false,
  delay = 100,
  disable_keymaps = false,
  filetype_overrides = {},
  filetypes_allowlist = {},
  filetypes_denylist = { "dirbuf", "dirvish", "fugitive" },
  large_file_cutoff = 10000,
  min_count_to_highlight = 1,
  modes_allowlist = {},
  modes_denylist = {},
  providers = { "lsp", "treesitter", "regex" },
  providers_regex_syntax_allowlist = {},
  providers_regex_syntax_denylist = {},
  under_cursor = true
}
started true
provider table: 0x01035f42e0 lsp
`termguicolors` true

kiyoon avatar Aug 12 '25 01:08 kiyoon

Image Similar issue

scc02 avatar Sep 26 '25 03:09 scc02