zioroboco / nu-ls.nvim

A null-ls source providing language server features for the nushell language in neovim
MIT License
15 stars 1 forks source link

Completing a subcommand re-inserts the parent command #11

Open zioroboco opened 1 year ago

zioroboco commented 1 year ago

Completing str tr results in str str trim (for example).

Instead, it should be removing any already-inserted partial match (i.e. the thing that the completion was generated against) from the result before inserting. I'm not sure if this is possible from the perspective of a null-ls completion source, because we're just returning lists of strings and not actually writing them to the buffer. 🤔

We could remove the partially completed parent command from the completion list as well, but I think that would make the actual command being suggested less obvious. Not sure if there's another option, though.