diff --git a/CHANGELOG.md b/CHANGELOG.md index 67b7251f..52d0af3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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). +## [3.4.1] - 2023-11-10 + +## Fixed + +- Command completion broken in Neovim 0.9 [[#47](https://github.com/mrcjkb/rustaceanvim/issues/47)]. + ## [3.4.0] - 2023-11-01 ## Added diff --git a/lua/rustaceanvim/commands/init.lua b/lua/rustaceanvim/commands/init.lua index 71e71bf3..492f7f02 100644 --- a/lua/rustaceanvim/commands/init.lua +++ b/lua/rustaceanvim/commands/init.lua @@ -140,12 +140,9 @@ function M.create_rust_lsp_command() return config.tools.crate_graph.enabled_graphviz_backends or {} end if cmdline:match(match_start .. '%s+%w*$') then - return vim - .iter(commands) - :filter(function(command) - return command:find(arg_lead) ~= nil - end) - :totable() + return vim.tbl_filter(function(command) + return command:find(arg_lead) ~= nil + end, commands) end end, }) diff --git a/lua/rustaceanvim/lsp.lua b/lua/rustaceanvim/lsp.lua index 87ef27fd..4fd0039c 100644 --- a/lua/rustaceanvim/lsp.lua +++ b/lua/rustaceanvim/lsp.lua @@ -232,12 +232,9 @@ vim.api.nvim_create_user_command('RustAnalyzer', rust_analyzer_cmd, { 'stop', } if cmdline:match('^RustAnalyzer%s+%w*$') then - return vim - .iter(commands) - :filter(function(command) - return command:find(arg_lead) ~= nil - end) - :totable() + return vim.tbl_filter(function(command) + return command:find(arg_lead) ~= nil + end, commands) end end, })