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

add environment variable like TERM=xterm #360

Closed
as3mbus opened this issue Apr 24, 2018 · 8 comments
Closed

add environment variable like TERM=xterm #360

as3mbus opened this issue Apr 24, 2018 · 8 comments

Comments

@as3mbus
Copy link

as3mbus commented Apr 24, 2018

according to issue #356 i would need an environment variable of TERM=xterm in order to start the omnisharp server.
so is there anyway to add those environment variable so i could successfully launch ominsharp server every time i launch vim for .cs file ?

@nickspoons
Copy link
Member

nickspoons commented Apr 24, 2018

As discussed in #356, the environment variable is required to work around a bug in mono which has already been fixed so should be available soon - mono/mono#6752. So I don't think it makes sense to update OmniSharp-vim to deal with this temporary issue.

Edit 2018-05-02: Don't try this, doesn't work

As a stop-gap until the updated mono becomes available, you could patch your OmniSharp-vim by adding the following line to autoload/OmniSharp/util.vim at line 85:

let command = insert(command, 'TERM=xterm')

@as3mbus
Copy link
Author

as3mbus commented May 3, 2018

thank you for fast help as usual. i was sick a week ago so i couldn't reply
there are some several error upon launching vim on it's own before launching omnisharp manually.
should i update this comment or just create another issue ?

@nickspoons
Copy link
Member

I don't really know what you mean? Are they omnisharp errors?

In any case, if the above workaround works for you, then yes, close this issue and open a new one for unrelated problems.

@as3mbus
Copy link
Author

as3mbus commented May 3, 2018

hmm i don't really know but i think it's vim script related since it doesn't seem to show up if i launch omnisharp manually before opening .cs file

the following image is error message that i got from opening a .cs file with vim on my project diretory.
image

here are another error that i encounter when trying to use omni completion.
image

error message above also shown in the following case :

  1. using omni completion without launching the omnisharp server first. (in this case the error shows every time i tried to use omni completion)
  2. using omni completion for the first time after launching omnisharp server manually beforehand ( in this case the error message only show at the first time i tried to use omni completion. after displaying every error message the omni completion works fine as usual.)

as an additional information :
without your workaround the error in the first image doesn't shows up and it work just fine even without launching the omnisharp server beforehand. But still the 2nd image error still show up for the first time alike in 2nd case.

the only plugin i installed in my vim is :

  • vim plug
  • vim dispatch
  • omnisharp vim

i hope my description is clear enough.

@nickspoons
Copy link
Member

Yes you're right, that workaround I described above doesn't work, sorry.

@as3mbus
Copy link
Author

as3mbus commented May 3, 2018

it's okay. your fast response already helped me giving interest in this.
I myself doesn't understand much about vim and C# so i could only offer information.
i would like to add some wiki entry if my issue here are resolved.

@aaferrari
Copy link

@nickspoons, and what if the command variable is assigned in this way?
let command = insert(command, 'env TERM=xterm')

@nickspoons
Copy link
Member

The referenced mono bug has been fixed and backported, so I'm closing this issue.

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

No branches or pull requests

3 participants