vim-go completion stopped working after updating - go

I'm using neovim with coc.nvim and have been using vim-go and coc-go, and everything was working fine.
I have the habit of updating everything every couple of days, and I do that using the following commands:
:PlugUpgrade
:PlugUpdate
:GoUpdateBinaries
:CocUpdateSync
Recently after I did the update, the auto-completion for go files has stopped working.
Things I tried:
I thought there might be a conflict with coc-go, so I tried uninstalling it, but it didn't solve the issue
On my other computer, I opened a go file before and after running the update (without changing anything else), and auto-completion stopped working after the update
I tried cleaning up mod and bin directories in my GOPATH, and reinstalling everything, but still, it's not working.
When I open a go file, I see the message vim-go: initialized gopls, but I also see the following message
[coc.nvim]: Unhandled rejection: TypeError: Cannot read property 'workspaceFolders' of undefined
I thought this message is responsible for things being broken, but that's not the case: after digging a bit on the message, that message is coming from coc-go, but even when I uninstall coc-go, my auto-completion is still not working

This change helped me to fix the error -> https://github.com/josa42/coc-go/pull/89/commits/046eb6f8d2686b2317e15d58535435592b1eaa76
Find the extension.js file in coc's config folder. In my case, it is located in "$HOME/config/coc/extensions/node_modules/coc-go/lib" and replace these lines:
disableWorkspaceFolders: config.disable.workspaceFolders,
disableDiagnostics: config.disable.diagnostics,
disableCompletion: config.disable.completion,
with:
disableWorkspaceFolders: config.disableWorkspaceFolders,
disableDiagnostics: config.disableDiagnostics,
disableCompletion: config.disableCompletion,

Related

My vsc code disappeared and I have no idea why or where it's gone

I was working with discord.js last night and I ran a few commands in the terminal. The last command I wrote caused the name of the file at the top of the screen to be crossed out and turn red and I followed the path to where the file was and it was gone. I've checked the recycling bin and nothing was there. The file has left no traces and the project is gone. Is there any way that I can get the code back?
The commands I ran were -
npm update,
npm audit,
npm audit fix (the one that caused the file to disappear)
My file was also within the node_modules folder which probably explains why it disappeared when I ran those.
Any help is appreciated, thanks.
Yes, apparently this happens sometimes, especially when there is update on restart (see here https://github.com/microsoft/vscode/issues/52855). For some reason the software is moved to
C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\_
where <user> is your username.
If you start from there it goes as always. I didn't try any move or rename, just reinstalled the last version and everything went back to normal. This is first time happening to me, and according to most reports it doesn't happen often enough to be a problem, however a few users report it to have happened tens of time, that I understand being an annoyance.
If the file that got removed was inside the node_modules folder there's no problem. You can just remove the node_modules folder and run npm install . That will fix the problem.
If there is not package.json file in your project, you can still remove the node_modules folder but then you need to install every dependency manually like this: npm install <module_name>.

Apache Flink Installation 1.6.2 on Mac with Homebrew

I am trying to use Apache Flink for the first time for a school project, but I'm running into some trouble after installation. I have tried to follow the Quicksetup on the site, but I keep running into the same problem.
(https://ci.apache.org/projects/flink/flink-docs-stable/quickstart/setup_quickstart.html)
Console Output
The brew installation seems to work fine, this is where I ran into the first inconsistency however. Next the guide tells me to execute the following line
$ ./bin/start-cluster.sh # Start Flink
which doesn't work without installing a binary from here though
https://flink.apache.org/downloads.html
So I did that (I downloaded the Flink 1.6.2 with Hadoop 2.7 binary) and was then able to find the file and execute it. After doing this I'm supposed to go the the web frontend, and verify that a task is running. However when I go there nothing is shown.
Console Output
Web Dashbord
I started by executing the stop-cluster file, because for some reason I'm constantly getting the INFO Message
[INFO] 1 instance(s) of standalonesession are already running on Moritzs-MBP.fritz.box.
So far I have tried to to look into the flink-conf.yaml file which does set the numberOfTaskSlots to 1, so the problem does not seem to lie there. Otherwise I didn't really know where to look from there however and only tried to uninstall the and reinstall everything with no results however.
Sorry that the images are not shown, previously I had been able to fix all my code problems with existing posts and thus I can't directly post them yet. Any help would be much appreciated, thanks in advance,
Moritz
By using brew installation, the start-cluster.sh should be able to found in:
/usr/local/Cellar/apache-flink/1.6.2/libexec/bin
I'm not sure why start-cluster.sh isn't succeeding in starting up a taskmanager, but you can always (try to) start another one by hand with
$ ./bin/taskmanager.sh start

Error on PlugUpdate

I'm currently running on Mac with Neovim and Vim Plug.
Whenever I run the commend :PlugUpdate, I get the following error:
Error detected while processing function <SNR>2_job_handler:
line 19:
E121: Undefined variable: self
I've also tried to update the plugins one by one, and the error still comes up.
And no plugins are updated.
I've tried to update neovim to the latest version as well, yet the error still occur.
Does anyone know where the error comes from?
Turns out it was Vim Plug itself.
I had to run :PlugUpgrade to update Vim Plug, then run :PlugInstall to fix the errors.
Leaving this here for people who will have the same issue. :)

Failing to install mingw: mingw-get-gui: *** ERROR *** unexpected end of archive reading header record

I am now trying to install mingw for a couple of hours, however I keep on getting the following error message:
"install: gcc-c++-4.8.1-4-mingw32-bin.tar.lzma
installing gcc-c++-4.8.1-4-mingw32-bin.tar.lzma
mingw-get-gui: * ERROR * unexpected end of archive reading header record"
and cannot find any solution to my problem. I tried to reinstall 7zip, because I thought it may caused from that. I am trying to install gcc on a 32-bit Windows 7. I would be really happy for any suggestions.
Bye!
Even though this is an old question, I will post an answer, in case other users come across this again.
I encountered the same problem:
at first I did not notice that something went wrong with the installation/upgrade itself, because the graphical update manager showed a line like "everything went successful" ...
if I had bothered to look into the log details, I would have seen the error messesage mingw-get-gui: * ERROR * unexpected end of archive reading header record and immediately known, that something went wrong (its really misleading, to show a dialog saying that a task was completed successfully when there were errors!).
But pertaining to your problem (or at least this was, what caused mine):
Cause
most likely something went wrong, when the mentioned archive file was downloaded. Unfortunately, mingw-get seems to ignore download errors and continues as if nothing went wrong... thus the error message archive header record is invalid, because it is not really an archive file, but a text file containing the HTML error message.
To complicate things further, mingw-get caches these files and when you try to re-install the packages it uses these invalid, cached files.
Solution
One way of fixing this, would be to delete the cached files and then re-install the package.
The cached files should be at
<mingw directory>\var\cache\mingw-get\packages
e.g.
C:\MinGW\var\cache\mingw-get\packages
Side Note: if you "lost" the error message like me, and don't know, for which packages there was an error, you can search the cache directory for files which contain the HTML error message, e.g. a search term like <html> should work; also these files are quite small, but there may also be other valid packages with small file size to this is no unambiguous criterion
If you continue to get error messages * ERROR * unexpected end of archive reading header record with the mingw-get tool you could also try to download the file manually and place it in the folder for the cached packages.
For re-installing the packages you could use the graphical interface of mingw-get (e.g. remove and then install the package) or, for example the command line version
mingw-get --reinstall install <package name>
for mingw packages the <package name> is usually just the prefix of the file name (before the first version number), e.g. for
libiconv-1.14-3-mingw32-dev.tar.lzma
the package name would be libiconv. For msys packages the package name usually has the prefix msys-, e.g. something like msys-libopts
(you should be able to see if it's a mingw or a msys package by looking at the part of the file name that comes after the first version number, e.g. for libiconv-1.14-3-mingw32-dev.tar.lzma: ...3-mingw32-de...)

How do I get pathogen working on Windows?

Over the weekend I reengineered my .vim directory on OS X to use pathogen.vim. This worked perfectly and I checked everything into github once I finished.
Today, I pulled everything down to my Windows installation of vim and found out it doesn't work here.
The issue I'm encountering is that pathogen.vim doesn't load any plugins, and further, prevents loading anything else from my vimfiles directory (e.g., colorschemes). I've tried to debug it a little bit using vim -V. From what I can tell, pathogen.vim has a function called pathogen#glob_directories which is returning [] when it should be returning a list of all plugin directories. But I'm not really sure why this is happening.
Can someone help me figure out how to get pathogen working on Windows?
My .vim files on github and in particular, my .vimrc.
Here is the output of vim -V with various error reporing levels.
vim -Vlog
vim -V12log
vim -V15log

Resources