Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Completion within strings #369

Open
ibraheemdev opened this issue May 26, 2021 · 1 comment
Open

Completion within strings #369

ibraheemdev opened this issue May 26, 2021 · 1 comment

Comments

@ibraheemdev
Copy link

ibraheemdev commented May 26, 2021

paq 'nvim-lua/completion-nvim'

function on_attach(client, bufnr)
    require('completion').on_attach()
end

vim.o.completeopt = 'menuone,noselect'
vim.o.shortmess = o.shortmess .. 'c'

I'm running neovim 0.5 with the native LSP and rust-analyzer, and I am running into an issue where I am still getting autocomplete while typing withing double quoted strings. It seems to only occur within rust macro invocations:

2021-05-26_11-56

@ibraheemdev ibraheemdev changed the title Completion withing strings Completion within strings May 27, 2021
@ranjithshegde
Copy link
Contributor

ranjithshegde commented Jun 2, 2021

@ibraheemdev
if I understand you correctly, you do not want completion on strings?
if so then perhaps you could do something like this?

local chain_complete_list = {
rust = {
  string = {},
  comment = {},
  default = {
    {complete_items = {'lsp', 'snippet'}},
    },
 }
}

local on_attach = function(client,buffer)
  require'completion'.on_attach({
      chain_complete_list = chain_complete_list,
    })

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants