Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust Lsp_dynamic_workspace_symbols don't have match words highlight #2968

Open
xzbdmw opened this issue Mar 2, 2024 · 1 comment
Open

rust Lsp_dynamic_workspace_symbols don't have match words highlight #2968

xzbdmw opened this issue Mar 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@xzbdmw
Copy link

xzbdmw commented Mar 2, 2024

Description

截屏2024-03-03 01 30 12 unwrap is not highlighted in result list, because rust-analyzer have special #* meanings, the highlight info is lost.

Neovim version

NVIM v0.10.0-dev-6308+ga090d43d6
Build type: RelWithDebInfo
LuaJIT 2.1.1707061634
Run "nvim -V1 -v" for more info

Operating system and version

macos 14,2

Telescope version / branch / rev

main

checkhealth telescope

==============================================================================
telescope: health#telescope#check

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0 (rev 9b01a8f9ae)
- OK fd: found fd 8.7.1

===== Installed extensions ===== ~

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Telescope Extension: `neovim-project` ~
- No healthcheck provided

Telescope Extension: `smart_open` ~
- No healthcheck provided

Steps to reproduce

  1. open a rust project
  2. run lsp_dynamic_workspace_symbols
  3. type unwrap#*
  4. no highlight on result list

Expected behavior

unwrap is highligted

Actual behavior

no highlight

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('fzf')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
@xzbdmw xzbdmw added the bug Something isn't working label Mar 2, 2024
@jamestrew
Copy link
Contributor

Sorry I'm not fully understanding the issue.
Can you elaborate more on what you mean by

unwrap is not highlighted in result list, because rust-analyzer have special #* meanings, the highlight info is lost.

As far as the list of results is concerns, I'm getting the exact same results between telescope and neovim's builtin vim.lsp.buf.workspace_symbol() with the query unwrap#*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants