diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ac2a97b..e77d4374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.23.1] - 2024-05-12 + +### Fixed + +- UI/Config: Don't override Neovim defaults in default `float_win_config`. + ## [4.23.0] - 2024-05-11 ### Added diff --git a/doc/rustaceanvim.txt b/doc/rustaceanvim.txt index 64436e3a..9da43f53 100644 --- a/doc/rustaceanvim.txt +++ b/doc/rustaceanvim.txt @@ -171,10 +171,12 @@ RustaceanExecutorOpts *RustaceanExecutorOpts* FloatWinConfig *FloatWinConfig* Fields: ~ - {open_split} ("horizontal"|"vertical") + {auto_focus?} (boolean) + {open_split?} ("horizontal"|"vertical") See: ~ |vim.lsp.util.open_floating_preview.Opts| + |vim.api.nvim_open_win| executor_alias *executor_alias* diff --git a/lua/rustaceanvim/config/check.lua b/lua/rustaceanvim/config/check.lua index 6ba776ed..41910d83 100644 --- a/lua/rustaceanvim/config/check.lua +++ b/lua/rustaceanvim/config/check.lua @@ -57,9 +57,6 @@ function M.validate(cfg) end local float_win_config = tools.float_win_config ok, err = validate('tools.float_win_config', { - border = { float_win_config.border, { 'table', 'string' } }, - max_height = { float_win_config.max_height, 'number', true }, - max_width = { float_win_config.max_width, 'number', true }, auto_focus = { float_win_config.auto_focus, 'boolean' }, open_split = { float_win_config.open_split, 'string' }, }) diff --git a/lua/rustaceanvim/config/init.lua b/lua/rustaceanvim/config/init.lua index 3c0a6c3b..124a404a 100644 --- a/lua/rustaceanvim/config/init.lua +++ b/lua/rustaceanvim/config/init.lua @@ -77,8 +77,10 @@ vim.g.rustaceanvim = vim.g.rustaceanvim ---@field bufnr? integer The buffer from which the executor was invoked. ---@class FloatWinConfig ----@field open_split 'horizontal' | 'vertical' +---@field auto_focus? boolean +---@field open_split? 'horizontal' | 'vertical' ---@see vim.lsp.util.open_floating_preview.Opts +---@see vim.api.nvim_open_win ---@alias executor_alias 'termopen' | 'quickfix' | 'toggleterm' | 'vimux' | 'neotest' diff --git a/lua/rustaceanvim/config/internal.lua b/lua/rustaceanvim/config/internal.lua index 3e132590..6f9cf45a 100644 --- a/lua/rustaceanvim/config/internal.lua +++ b/lua/rustaceanvim/config/internal.lua @@ -139,31 +139,9 @@ local RustaceanDefaultConfig = { --- options same as lsp hover ---@see vim.lsp.util.open_floating_preview + ---@see vim.api.nvim_open_win ---@type table Options applied to floating windows. float_win_config = { - - -- the border that is used for floating windows - ---@see vim.api.nvim_open_win() - ---@type string[][] | string - border = { - { '╭', 'FloatBorder' }, - { '─', 'FloatBorder' }, - { '╮', 'FloatBorder' }, - { '│', 'FloatBorder' }, - { '╯', 'FloatBorder' }, - { '─', 'FloatBorder' }, - { '╰', 'FloatBorder' }, - { '│', 'FloatBorder' }, - }, -- maybe: 'double', 'rounded', 'shadow', 'single', - - --- maximal width of floating windows. Nil means no max. - ---@type integer | nil - max_width = nil, - - --- maximal height of floating windows. Nil means no max. - ---@type integer | nil - max_height = nil, - --- whether the window gets automatically focused --- default: false ---@type boolean