0

I am using spf13 and I want to use omnisharp so I installed (and build) it as explained. Now I donrt how to integrate it with spf13.

It seems there already are something which handle "omni completion" but I also want issue tracker.

spf13 .vimrc:

    " PIV {
        let g:DisableAutoPHPFolding = 0
        let g:PIVAutoClose = 0
    " }

    " Misc {
        let g:NERDShutUp=1
        let b:match_ignorecase = 1
    " }

    " OmniComplete {
        " To disable omni complete, add the following to your .vimrc.before.local file:
        "   let g:spf13_no_omni_complete = 1
        if !exists('g:spf13_no_omni_complete')
            if has("autocmd") && exists("+omnifunc")
                autocmd Filetype *
                    \if &omnifunc == "" |
                    \setlocal omnifunc=syntaxcomplete#Complete |
                    \endif
            endif

            hi Pmenu  guifg=#000000 guibg=#F8F8F8 ctermfg=black ctermbg=Lightgray
            hi PmenuSbar  guifg=#8A95A7 guibg=#F8F8F8 gui=NONE ctermfg=darkcyan ctermbg=lightgray cterm=NONE
            hi PmenuThumb  guifg=#F8F8F8 guibg=#8A95A7 gui=NONE ctermfg=lightgray ctermbg=darkcyan cterm=NONE

            " Some convenient mappings
            inoremap <expr> <Esc>      pumvisible() ? "\<C-e>" : "\<Esc>"
            inoremap <expr> <CR>       pumvisible() ? "\<C-y>" : "\<CR>"
            inoremap <expr> <Down>     pumvisible() ? "\<C-n>" : "\<Down>"
            inoremap <expr> <Up>       pumvisible() ? "\<C-p>" : "\<Up>"
            inoremap <expr> <C-d>      pumvisible() ? "\<PageDown>\<C-p>\<C-n>" : "\<C-d>"
            inoremap <expr> <C-u>      pumvisible() ? "\<PageUp>\<C-p>\<C-n>" : "\<C-u>"

            " Automatically open and close the popup menu / preview window
            au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
            set completeopt=menu,preview,longest
        endif
    " }

So I want to fully integrated in vim too.

Katsu
  • 1,868
  • 4
  • 19
  • 28

1 Answers1

1

Omnisharp doesn't perform omnicompletion by itself. It just provides the omnifunc that you can use to plug into whatever completion mechanism you like (YCM, Neocomplete, supertab) etc.

I've never used spf13 but I would imagine that all you would need is

autocmd FileType cs setlocal omnifunc=OmniSharp#Complete

as it looks as if spf13 has it's own omnicompletion system. If that doesn't work, try Ctrl-X, Ctrl-O to trigger omnicompletion manually.

jasoni
  • 816
  • 5
  • 12
  • Thank you. Actually the issue is not about completion but build (F5/OmniSharpBuildAsync). Here is the new post: http://stackoverflow.com/questions/24429994/omnisharp-command-not-recognized – Katsu Jun 26 '14 at 16:58