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

[lsp-references] Search field contain symbol right after open #3177

Open
michaelcarno opened this issue Jun 20, 2024 · 0 comments
Open

[lsp-references] Search field contain symbol right after open #3177

michaelcarno opened this issue Jun 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@michaelcarno
Copy link

michaelcarno commented Jun 20, 2024

Description

Problem appear when you try to use lsp reference search feature with angular 17-18 language server and tsserver installed with mason.
With angularls 16 it works fine.

Neovim version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068

Operating system and version

Windows 10

Telescope version / branch / rev

telescope 0.1.8 / c392f1b

checkhealth telescope

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

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

Checking external dependencies ~
- OK rg: found ripgrep 14.1.0 (rev e50df40a19)
- OK fd: found fd 10.1.0

Steps to reproduce

  1. install Mason
  2. Install mason lsp config
  3. Install angularls
  4. Install tsserver
  5. Open any angular project ts file
  6. Attach angularls to buffer
  7. Try to search references
  8. First attemp work fine, but second and other will show "A" simbol in input field right after open.

Expected behavior

Opened telescope lsp references window with empty search field

Actual behavior

First atemp will be fine, on second attempt telescoped lsp references window opened with symbol "A" inserted in search field

Minimal config

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
  vim.fn.system {
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  }
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  {
    "nvim-telescope/telescope.nvim",
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
    config = function()
      -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
      require("telescope").setup {}
    end,
  },
        {"williamboman/mason-lspconfig.nvim"},
  {
    "williamboman/mason.nvim",
    cmd = {
      "Mason",
      "MasonInstall",
      "MasonUninstall",
      "MasonUninstallAll",
      "MasonLog",
      "MasonUpdate", -- AstroNvim extension here as well
      "MasonUpdateAll", -- AstroNvim specific
    },
    opts = {
      ui = {
        icons = {
          package_installed = "",
          package_uninstalled = "",
          package_pending = "",
        },
      },
    },
    build = ":MasonUpdate",
  },

}

require("lazy").setup(plugins, {
  root = root .. "/plugins",
})
@michaelcarno michaelcarno added the bug Something isn't working label Jun 20, 2024
@michaelcarno michaelcarno changed the title [lsp-references] Input field contain symbol right after open [lsp-references] Search field contain symbol right after open Jun 20, 2024
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

1 participant