Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suda conflict with vim-go/coc.nvim when "navigate in golang lib src" #29

Closed
chaneyzorn opened this issue Jul 5, 2020 · 5 comments
Closed
Labels

Comments

@chaneyzorn
Copy link

chaneyzorn commented Jul 5, 2020

when navigating in golang lib src (such as suda:///usr/lib/go/src/time/time.go), lsp-server return the location, then vim emit a error:

neovim 0.4.3

vim-go: initialized gopls
vim-go: [definition] SUCCESS                                                                                                                                       
vim-go: [definition] SUCCESS
Error detected while processing function <SNR>192_on_stdout[1]..<SNR>192_neocb[58]..325[13]..327[26]..<SNR>190_definitionHandler:
line    2:
E909: Cannot index a special variable
Error detected while processing function <SNR>192_on_stdout[1]..<SNR>192_neocb[58]..325[13]..327[26]..<SNR>190_definitionHandler:
line    2:
E15: Invalid expression: a:msg[0]
Error detected while processing function <SNR>192_on_stdout[1]..<SNR>192_neocb[58]..325:
line   13:
E171: Missing :endif
Error detected while processing function <SNR>192_on_stdout[1]..<SNR>192_neocb:
line   58:
E170: Missing :endwhile

vim has similar output.

my suda config:

let g:suda_smart_edit = 1

disable suda or let g:suda_smart_edit = 0 can get rid of it.

a similar issue from vim-go may have a relationship:
fatih/vim-go#2504

should I report a issue to vim-go also?
thank you.

@lambdalisue
Copy link
Owner

Probably they should ignore contents on non file buffer such as suda:// or whatever while these are not file.

@chaneyzorn
Copy link
Author

chaneyzorn commented Jul 6, 2020

ok, I'll try to report the issue to vim-go. thank you.

fatih/vim-go#2949

@chaneyzorn
Copy link
Author

vim-go add a commit to fix the error output: fatih/vim-go#2951

but it likes that lsp-server not support non-file buffer, so "Go to symbol/declaration" just not work on suda:// buffer.

since vim-go close the issue, here closed too.

@lambdalisue
Copy link
Owner

but it likes that lsp-server not support non-file buffer, so "Go to symbol/declaration" just not work on suda:// buffer.

I think that the correct way to fix that error. Supporting suda:// is a bit different topic. You need to create a new feature request on vim-go side if you want to enable lsp-server on suda's buffer.

@chaneyzorn
Copy link
Author

Thank you, I'm not really want to issue a disturbance again. Maybe... , I'll create a pr by myself at another time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants