Declared a function in file utils.lua then reference it in file index.lua (only one buffer is file index.lua),
press command Lspsage finder, references is rendered in finer window, but when press command s (vsplit) is not work.
If open file utils.lua add it to buffer list, then press command Lspsage finder, keymap s can work.
Steps to reproduce
min.lua
local api = vim.api
api.nvim_command('set nu')
api.nvim_command('set relativenumber')
-- Plugins
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Example using a list of specs with the default options
vim.g.mapleader = ',' -- Make sure to set `mapleader` before lazy so your mappings are correct
require('lazy').setup({
{
'neovim/nvim-lspconfig',
config = function()
require('lspconfig').lua_ls.setup({})
require('lspconfig').gopls.setup({})
require('lspconfig').pyright.setup({})
end,
},
{
'williamboman/mason.nvim',
config = function()
require('mason').setup({})
end,
},
{ 'williamboman/mason-lspconfig.nvim' },
{
'glepnir/lspsaga.nvim',
event = 'BufRead',
config = function()
require('lspsaga').setup({
implement = { enable = true },
})
end,
dependencies = { { 'nvim-tree/nvim-web-devicons' }, { 'nvim-treesitter/nvim-treesitter' } },
},
})
exp/utils.lua
local M = {}
M.foo = function()
print('foo')
end
return M
exp/index.lua
local utils = require('exp.utils')
utils.foo()
Press command Lspsaga finder at exp/index.luafoo()
Describe the bug
Declared a function in file
utils.lua
then reference it in fileindex.lua
(only one buffer is fileindex.lua
), press commandLspsage finder
, references is rendered in finer window, but when press commands
(vsplit) is not work.If open file
utils.lua
add it to buffer list, then press commandLspsage finder
, keymaps
can work.Steps to reproduce
min.lua
exp/utils.lua
exp/index.lua
Press command
Lspsaga finder
atexp/index.lua
foo()
Expected behavior
Keymaps in
finder
window works normal.Neovim version (nvim -v)
v0.9.5
lspsaga commit
3112b7a
Terminal name/version
alacritty 0.14.0-dev (1b9131c7)