-
Notifications
You must be signed in to change notification settings - Fork 45
make path of server binary configurable #493
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
base: main
Are you sure you want to change the base?
Conversation
@@ -147,6 +147,7 @@ you call this function with no values the defaults will be used: | |||
port = nil, -- The port of the Go server, which runs in the background, if omitted or `nil` the port will be chosen automatically | |||
log_path = vim.fn.stdpath("cache") .. "/gitlab.nvim.log", -- Log path for the Go server | |||
config_path = nil, -- Custom path for `.gitlab.nvim` file, please read the "Connecting to Gitlab" section | |||
bin = nil, -- Custom path to Go server binary, if not set the internal one is used. Only change if really needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could give a specific example, so instead of "Only change if really needed" you could say something like:
bin = nil, -- Custom path to Go server binary, if not set the internal one is used. Only change if really needed | |
bin = nil, -- Custom path to Go server binary, if not set the internal one is used. Useful if the directory of the plugin is read-only. |
But I'm also wondering, how you compile the server? Do you have to take the extra steps of cloning the repo to a different location? Wouldn't it be more user friendly to just customize the path where the server is supposed to be built, so that the user doesn't have to take any further steps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is part of a nix build, that complies the binary into another directory. The idea in nix is that the whole build/configuration is reproducable, therefore it marks a lot a direcories as read only and compliing some thing outside of the nix 'process' is not really desireable.
I am sure that there are more user friendly options to this issue but I did not see a good reason why the path should not be configurable. Plus it was an easy way to fix my problem.
In a lot of other plugins the path to a compliled executable is configurable as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine, I'm not familiar with nix
, so what you write makes perfect sense. I'd just make the docstring a little more explicit.
@harrisoncramer will have to look at this and decide if he wants to merge it or not.
Co-authored-by: Jakub F. Bortlík <[email protected]>
Please target the develop branch with this PR, see: https://github.com/harrisoncramer/gitlab.nvim/blob/main/.github/CONTRIBUTING.md I'm fine to merge this in as long as it doesn't impact regular usage. |
This pull request makes the path to the Go server binary configurable. If setting argument 'bin' is not 'nil' the compilation is skipped and the value of 'bin' is used to execute the Go server from.
I needed this to make it easier to use this plugin in my nix system, as the directory of the plugin is readonly in nix system the compilation fails.
Let me know whether you want met to change something.
Btw: Thanks for the work on this great plugin.