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

How do I stop OmniSharp from creating '~/.omnisharp' directory? #839

Closed
ztx-lyghters opened this issue May 15, 2023 · 3 comments
Closed

Comments

@ztx-lyghters
Copy link

ztx-lyghters commented May 15, 2023

I want OmniSharp to respect XDG_CONFIG_HOME. How can I permanently move ~/.omnisharp to either ~/.config or ~/.local/share?

@nickspoons
Copy link
Member

OmniSharp-vim doesn't use ~/.omnisharp by default, it uses $XDG_CACHE_HOME and falls back to $HOME/.cache, so usually installs the server to ~/.cache/omnisharp-vim/omnisharp-roslyn.

The OmniSharp-roslyn server does use ~/.omnisharp by default to read a global ~/.omnisharp/omnisharp.json config, but it is configurable (I am not exactly sure how, check that repo) and I don't think the directory is created automatically.

What do you have in your ~/.omnisharp directory?

@ztx-lyghters
Copy link
Author

ztx-lyghters commented May 16, 2023

What do you have in your ~/.omnisharp directory?

Nothing, it's empty, it just gets created every time I open any *.cs file in neovim. And roslyn server is indeed in ~/.cache/omnisharp-vim

@nickspoons
Copy link
Member

That directory is not being created by OmniSharp-vim, it's being created by OmniSharp-roslyn:

https://github.com/OmniSharp/omnisharp-roslyn/blob/master/src/OmniSharp.Host/Internal/ConfigurationBuilderExtensions.cs#L19

You can configure a different location using an 'OMNISHARPHOME' environment variable, see:

https://github.com/OmniSharp/omnisharp-roslyn/blob/master/src/OmniSharp.Host/Services/OmniSharpEnvironment.cs#L49

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

2 participants