nvimdev / nvimdev/lspsaga.nvim
Floating window position configuration (win_config) options not taking effect in lazyvim
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
I'm using lspsaga with lazyvim and I'm trying to customize the floating window positions by overriding the win_config for the definition and finder windows. However, despite my settings, the window positions remain at their default locations.
Environment:
- lspsaga version: 6063935
- lazyvim for plugin management
- Neovim version: NVIM v0.10.4
Steps to Reproduce:
- Add the following configuration to your lazyvim plugin configuration file (e.g.,
~/.config/nvim/lua/plugins/lspsaga.lua):
return {
{
"nvimdev/lspsaga.nvim",
event = "LspAttach",
config = function()
require("lspsaga").setup({
ui = {
border = "rounded",
},
definition = {
win_config = {
relative = "editor",
anchor = "NW", -- intended position: top left corner
row = 2,
col = 2,
width = 80,
height = 20,
},
},
finder = {
win_config = {
relative = "editor",
anchor = "NW",
row = 2,
col = 2,
width = 80,
height = 20,
},
},
})
end,
keys = {
{ "<leader>pd", "<cmd>Lspsaga peek_definition<CR>", desc = "Peek Definition" },
{ "<leader>pr", "<cmd>Lspsaga finder<CR>", desc = "Peek References" },
},
},
}
- Launch Neovim and trigger the
peek_definitionorfindercommands. - Observe that the floating window positions do not change as configured.
Expected Behavior:
The floating windows (for definition and finder) should appear at the specified positions (anchor = NW, row = 2, col = 2, etc.).
Actual Behavior:
The floating windows still appear in the default positions, ignoring my custom win_config settings.
Additional Information:
- I have confirmed that my configuration file is correctly loaded by lazyvim.
- Based on the [current default settings in init.lua](https://github.com/nvimdev/lspsaga.nvim/blob/6063935cf68de9aa6dd79f8e1caf5df0a9385de3/lua/lspsaga/init.lua#L138), it seems these options should be overridable.
- Is there a new method to customize the window positions, or are these options being overridden by some internal logic in the current version?
Thank you for your help!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the default window configuration in lua/lspsaga/init.lua at the linked definition near line 138. Trace how the definition and finder commands consume win_config, then verify why the supplied relative, anchor, row, col, width, and height values are not applied. Done means both floating windows honor the configured positions when triggered in Neovim.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100