yegappan / lsp

Language Server Protocol (LSP) plugin for Vim9
MIT License
473 stars 57 forks source link

Includes are added twice with vsnip #522

Closed jclsn closed 2 weeks ago

jclsn commented 4 months ago

I have the following plugins added

Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/vim-vsnip-integ'
Plug 'rafamadriz/friendly-snippets'
Plug 'yegappan/lsp'

when I now select e.g. a printf() completion, #include <stdio.h> is added twice


#include <stdio.h>
#include <stdio.h>
int main(int argc, char *argv[])
{

    printf(const char *, ...)
    return 0;
}

my lsp configuration

let lspOpts = #{
        \   aleSupport: v:false,
        \   autoComplete: v:true,
        \   autoHighlight: v:true,
        \   autoHighlightDiags: v:true,
        \   autoPopulateDiags: v:true,
        \   completionMatcher: 'case',
        \   completionMatcherValue: 1,
        \   diagSignErrorText: 'ā—',
        \   diagSignHintText: 'šŸ’”',
        \   diagSignInfoText: 'šŸ’”',
        \   diagSignWarningText: 'šŸ’”',
        \   echoSignature: v:false,
        \   hideDisabledCodeActions: v:false,
        \   highlightDiagInline: v:true,
        \   hoverInPreview: v:true,
        \   ignoreMissingServer: v:false,
        \   keepFocusInDiags: v:true,
        \   keepFocusInReferences: v:true,
        \   completionTextEdit: v:true,
        \   diagVirtualTextAlign: 'above',
        \   noNewlineInCompletion: v:false,
        \   omniComplete: v:null,
        \   outlineOnRight: v:false,
        \   outlineWinSize: 20,
        \   semanticHighlight: v:false,
        \   showDiagInBalloon: v:false,
        \   showDiagInPopup: v:true,
        \   showDiagOnStatusLine: v:false,
        \   showDiagWithSign: v:true,
        \   showDiagWithVirtualText: v:false,
        \   showInlayHints: v:false,
        \   showSignature: v:true,
        \   snippetSupport: v:true,
        \   ultisnipsSupport: v:false,
        \   useBufferCompletion: v:false,
        \   usePopupInCodeAction: v:true,
        \   useQuickfixForLocations: v:false,
        \   vsnipSupport: v:true,
        \   bufferCompletionTimeout: 100,
        \   customCompletionKinds: v:false,
        \   completionKinds: {}
        \ }