File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
lua/rustaceanvim/commands Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
66The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
77and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
88
9+ ## [ Unreleased]
10+
11+ ### Fixed
12+
13+ - LSP: Support completions for ` RustLsp ` with selection ranges.
14+
915## [ 4.25.0] - 2024-06-16
1016
1117### Added
Original file line number Diff line number Diff line change @@ -332,17 +332,17 @@ function M.create_rust_lsp_command()
332332 bang = true ,
333333 desc = ' Interacts with the rust-analyzer LSP client' ,
334334 complete = function (arg_lead , cmdline , _ )
335- local commands = cmdline :match (' ^ ' .. rust_lsp_cmd_name .. ' !' ) ~= nil
335+ local commands = cmdline :match (" ^['<,'>]* " .. rust_lsp_cmd_name .. ' !' ) ~= nil
336336 -- bang!
337337 and tbl_keys_by_value_filter (function (command )
338338 return command .bang == true
339339 end , rustlsp_command_tbl )
340340 or vim .tbl_keys (rustlsp_command_tbl )
341- local subcmd , subcmd_arg_lead = cmdline :match (' ^ ' .. rust_lsp_cmd_name .. ' [!]*%s(%S+)%s(.*)$' )
341+ local subcmd , subcmd_arg_lead = cmdline :match (" ^['<,'>]* " .. rust_lsp_cmd_name .. ' [!]*%s(%S+)%s(.*)$' )
342342 if subcmd and subcmd_arg_lead and rustlsp_command_tbl [subcmd ] and rustlsp_command_tbl [subcmd ].complete then
343343 return rustlsp_command_tbl [subcmd ].complete (subcmd_arg_lead )
344344 end
345- if cmdline :match (' ^ ' .. rust_lsp_cmd_name .. ' [!]*%s+%w*$' ) then
345+ if cmdline :match (" ^['<,'>]* " .. rust_lsp_cmd_name .. ' [!]*%s+%w*$' ) then
346346 return vim .tbl_filter (function (command )
347347 return command :find (arg_lead ) ~= nil
348348 end , commands )
You can’t perform that action at this time.
0 commit comments