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

relative = "cursor" didn't work #62

Closed
tristone13th opened this issue Feb 22, 2022 · 3 comments
Closed

relative = "cursor" didn't work #62

tristone13th opened this issue Feb 22, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tristone13th
Copy link

tristone13th commented Feb 22, 2022

Describe the bug
relative = "cursor" didn't work, however, the float window is centered in the editor

System information

  • OS: linux
  • Neovim version: 0.6.1
  • AerialInfo:
    Filetype: lua
    Configured backends:
    lsp (supported) (attached)
    treesitter (supported)
    markdown (not supported) [Filetype is not markdown]
    Show symbols: Class, Enum, Function, Interface, Module, Method, Struct
  • Aerial config:
function config:symbols()
	require("aerial").setup({
		default_direction = "float",

		float = {
			-- Controls border appearance. Passed to nvim_open_win
			border = "rounded",

			-- Enum: cursor, editor, win
			--   cursor - Opens float on top of the cursor
			--   editor - Opens float centered in the editor
			--   win    - Opens float centered in the window
			relative = "cursor",

			-- These control the height of the floating window.
			-- They can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
			-- min_height and max_height can be a list of mixed types.
			-- min_value = {8, 0.1} means "the greater of 8 rows or 10% of total"
			max_height = 0.9,
			height = nil,
			min_height = { 8, 0.1 },

			override = function(conf)
				-- This is the config that will be passed to nvim_open_win.
				-- Change values here to customize the layout
				return conf
			end,
		},

		filter_kind = {
			"Class",
			"Enum",
			"Function",
			"Interface",
			"Module",
			"Method",
			"Struct",
		},

		-- Run this command after jumping to a symbol (false will disable)
		post_jump_cmd = "normal! zz",
		close_on_select = true,

		lsp = {
			diagnostics_trigger_update = true,
			update_when_errors = true,
		},
	})
end

Screenshots
b567c7466ac414b738b3bc4129f453b

@tristone13th tristone13th added the bug Something isn't working label Feb 22, 2022
@JoseConseco
Copy link

JoseConseco commented Feb 22, 2022

I can confirm. Same issue. I think it worked ok yesterday.

@stevearc
Copy link
Owner

Apologies! Should be fixed now. The underlying issue was that when you set the config with nvim_open_win({relative = 'cursor'}) it comes back from nvim_get_config() as relative = 'win' :/

@JoseConseco
Copy link

work ok for me now .thx !

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

3 participants