Skip to content

Commit

Permalink
fix: command completion broken in neovim 0.9 (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Nov 10, 2023
1 parent a355a08 commit 64edff2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions lua/rustaceanvim/commands/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
9 changes: 3 additions & 6 deletions lua/rustaceanvim/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down

0 comments on commit 64edff2

Please sign in to comment.