Git Product home page Git Product logo

Comments (4)

fannheyward avatar fannheyward commented on July 18, 2024

For problem 1, what's the output of :verbose imap <cr>?

For problem 2, clangd didn't support foldingRange that needed to do folding.

from coc.nvim.

Kaiser-Yang avatar Kaiser-Yang commented on July 18, 2024

For problem 1, what's the output of :verbose imap <cr>?

For problem 2, clangd didn't support foldingRange that needed to do folding.

The output of :verbose imap <CR> in a vimwiki file:
image

from coc.nvim.

fannheyward avatar fannheyward commented on July 18, 2024

Your <CR> mapping was conflict with auto-pairs. You can disable auto-pairs' mapping with let g:AutoPairsMapCR = 0.

from coc.nvim.

Kaiser-Yang avatar Kaiser-Yang commented on July 18, 2024

For problem 1, what's the output of :verbose imap <cr>?

For problem 2, clangd didn't support foldingRange that needed to do folding.

Your <CR> mapping was conflict with auto-pairs. You can disable auto-pairs' mapping with let g:AutoPairsMapCR = 0.

Thank you for your replies. I think it has nothing to do with auto-pairs's mapping, because when in other files (such as a C/C++ file) the auto-pairs' mapping is still here.

But, luckily, I think I've found the solution for the problem 2 throuth adding those at my configurations of vimwiki:

" close lists_return
let g:vimwiki_key_mappings = { 'lists_return': 0, }

" remap lists_return
autocmd FileType vimwiki inoremap <silent><buffer><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
              \: "\<C-]>\<Esc>:VimwikiReturn 3 5\<CR>"
autocmd FileType vimwiki inoremap <silent><buffer> <S-CR>
              \ <Esc>:VimwikiReturn 2 2<CR>

from coc.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.