Code Monkey home page Code Monkey logo

Comments (13)

fannheyward avatar fannheyward commented on June 3, 2024

I use 'gd' to jump to definition which worked fine initially, then I ctrl-o jump back and try gd on a different function then it reports "buffer 1 not create" and refuse to jump

Tested with vim 9.1 and latest coc.nvim with clangd, can't reproduce.

it works well but jump to declaration instead of definition, is the default gd jump to declarations?

How do you set your gd mapping? coc.nvim didn't set default gd.

coc.nvim requests to language server, handle the jumping with locations, before jumping to the document buffer that created and attached. The buffer 1 not created means the buffer is not created.

[attach] - receive notification: detach

It's strange that coc.nvim received detach event to detach the buffer.

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

I used the default suggestion in coc.nvim github:
nmap gd (coc-definition)
nmap gy (coc-type-definition)
nmap gi (coc-implementation)
nmap gr (coc-references)
this has been a while, and it occurs to me on various languages and is always reproducible, I don't know how to debug this and not sure if it's caused by something else.

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

it's very odd, I just tried to change .vimrc, it works without issues, I can recover the original .vimrc, it still works, now not sure what is going on, but it works for the moment.

from coc.nvim.

fannheyward avatar fannheyward commented on June 3, 2024

occurs to me on various languages

What's the language server?

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

when it happens it seems to be LSP irrelevant, I tested clangd and tsserver

from coc.nvim.

fannheyward avatar fannheyward commented on June 3, 2024

Needs a way to reproduce to debug the issue.

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

will try to find it out, it just came back, not sure if .vimrc caused it since changing .vimrc does make some difference, need check more closely, thanks.

from coc.nvim.

fannheyward avatar fannheyward commented on June 3, 2024

Try to bisect your vimrc

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

did that before, so far the pattern is:
while in the bisect, when my vimrc halves to a certain size(this varies, today's it's the first 700 line), 'gd' starts to fully work, now if I copy the original failed .vimrc, it still works, in short, when it starts to work, there is no more issues for the day. I'm going to try logout/reboot and see if that changes anything.

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

bisected to certain lines it starts to work, then it keeps working, even after I copy the original .vimrc back, or after a logout/login, or after a reboot, it keeps working and never dies, this is truly odd.

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

might be my own problem as I could not reproduce it on another ubuntu 22.04 laptop, but it occurs on my ubuntu 22.04 desktop

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024
## versions

vim version: VIM - Vi IMproved 9.0 9000749
node version: v20.12.2
coc.nvim version: 0.0.82-d1568d56 2023-09-29 19:43:34 +0800
coc.nvim directory: /home/userx/.vim/plugged/coc.nvim
term: dumb
platform: linux

## Log of coc.nvim

2024-04-24T22:13:27.606 WARN (pid:6859) [commands] - Command prettier.createConfigFile already registered
2024-04-24T22:13:27.606 WARN (pid:6859) [commands] - Command prettier.openOutput already registered
2024-04-24T22:13:27.606 WARN (pid:6859) [commands] - Command prettier.forceFormatDocument already registered
2024-04-24T22:13:27.606 WARN (pid:6859) [commands] - Command prettier.formatFile already registered
2024-04-24T22:13:27.650 INFO (pid:6859) [plugin] - coc.nvim initialized with node: v20.12.2 after 411
2024-04-24T22:13:27.658 INFO (pid:6859) [services] - LanguageClient clangd state change: stopped => starting
2024-04-24T22:13:27.663 INFO (pid:6859) [language-client-index] - Language server "clangd" started with 6920
2024-04-24T22:13:27.671 INFO (pid:6859) [services] - LanguageClient clangd state change: starting => running
2024-04-24T22:13:27.675 INFO (pid:6859) [services] - service clangd started
2024-04-24T22:13:27.909 INFO (pid:6859) [core-watchman] - watchman watching project: /home/userx/devel/notes
2024-04-24T22:13:29.407 INFO (pid:6859) [attach] - receive notification: jumpDefinition []
2024-04-24T22:13:31.050 INFO (pid:6859) [attach] - receive notification: detach []
2024-04-24T22:13:32.447 INFO (pid:6859) [attach] - receive notification: jumpDefinition []
2024-04-24T22:13:32.451 ERROR (pid:6859) [attach] - Error on notification jumpDefinition Error: Buffer 1 not created.
    at FE.getAttachedDocument (/home/userx/.vim/plugged/coc.nvim/build/index.js:194:3344)
    at $y.getCurrentState (/home/userx/.vim/plugged/coc.nvim/build/index.js:277:34038)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Iy.request (/home/userx/.vim/plugged/coc.nvim/build/index.js:265:5418)
    at async Iy.gotoDefinition (/home/userx/.vim/plugged/coc.nvim/build/index.js:265:6886)
    at async Gy.cocAction (/home/userx/.vim/plugged/coc.nvim/build/index.js:277:46159)
    at async EventEmitter.<anonymous> (/home/userx/.vim/plugged/coc.nvim/build/index.js:277:47778)
2024-04-24T22:13:39.508 INFO (pid:6859) [attach] - receive notification: showInfo []

now this shows up on both of my ubuntu 22.04, it comes and goes, most of the time it's there. so far I could not track down its root cause, it occurs randomly.

from coc.nvim.

laoshaw avatar laoshaw commented on June 3, 2024

I removed most of my plugins and configuration tweaks, with only coc.nvim and a few must-have plugs, so far there is no issue

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.