Skip to content
Discussion options

You must be logged in to vote

Yeah. But the thing is cmp will try to merge all the configurations.

Can you try this one?

local lsp = require('lsp-zero').preset({
  name = 'lsp-compe',
  set_lsp_keymaps = { omit = { 'K' } },
  sign_icons = {
    error = '×',
    warn = '',
    hint = '»',
    info = '!'
  }
})

lsp.configure('rust_analyzer', {
  cmd_env = { CARGO_TARGET_DIR = vim.fn.expand('~/.build') },
})

lsp.setup()

vim.opt.completeopt = {'menu', 'menuone', 'noselect'}

local cmp = require('cmp')
local cmp_enabled = cmp.get_config().enabled

local cmp_config = lsp.defaults.cmp_config({
  enabled = function()
    if require('cmp.config.context').in_treesitter_capture('comment') == true
      or require('cmp.config…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@twiclo
Comment options

@VonHeikemen
Comment options

Answer selected by twiclo
@twiclo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants