autocomplete always adds $0 at the end when using mini.completion #394
-
Have you read the docs and searched existing issues?
Neovim version (nvim -v)v0.9.1 Operating system/versionUbuntu 23.10 Output of :checkhealth rustaceanvimrustaceanvim: require("rustaceanvim.health").check()
Checking for Lua dependencies ~
- OK [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap) installed.
Checking external dependencies ~
- OK rust-analyzer: found rust-analyzer 1.78.0 (9b00956 2024-04-29)
- OK Cargo: found cargo 1.78.0 (54d8815d0 2024-03-26)
- OK rustc: found rustc 1.78.0 (9b00956e5 2024-04-29)
Checking config ~
- OK No errors found in config.
Checking for conflicting plugins ~
- OK No conflicting plugins detected.
Checking for tree-sitter parser ~
- OK tree-sitter parser for Rust detected. How to reproduce the issuerequire("mini.completion").setup{}
# and then just try any function with completion
fn main() {
let var = std::env::*Tab*
} Expected behaviourfn main() { Actual behaviourfn main() { The minimal config used to reproduce this issue.-- [[ lazy.lua ]]
return require('lazy').setup({
{
-- Awesome lightweight overall life improvement collection of plugins
{ 'echasnovski/mini.nvim', version = false },
-- Rust support
{ 'mrcjkb/rustaceanvim', version = '^4',
lazy = false, -- This plugin is already lazy
}
})
require("mini.completion").setup{}
-- and minimal rustacean config |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I did create an issue with mini.completion first, but they said it is lsp fault, and I experience this only with rust LSP I'm not even sure it's even a bug or am I just stoopid and don't know how LSPs work in general, but any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
Hey 👋 this plugin doesn't do anything related to autocompletion, but it does register the capablilty mini.completion doesn't have snippet support, so you need to disable it, by setting vim.g.rustaceanvim.server.capabilities.textDocument.completion.completionItem.snippetSupport = false See also: I will push a hotfix to make sure rustaceanvim only enables snippet support for Neovim >= 0.10. |
Beta Was this translation helpful? Give feedback.
-
thank you for quick response and explanation! |
Beta Was this translation helpful? Give feedback.
Hey 👋
this plugin doesn't do anything related to autocompletion, but it does register the capablilty
textDocument.completion.completionItem.snippetSupport = true
by default.Most completion plugins have snippet support, and Neovim 0.10 (nightly) has native snippet support.
So this feels like a sane default to me.
mini.completion doesn't have snippet support, so you need to disable it, by setting
See also:
:h rustaceanvim.config
.I will push a hotfix to make sure rustaceanvim only enables snippet support for Neovim >= 0.10.