Conversation
0d75b65 to
8259788
Compare
8259788 to
b38da6f
Compare
b38da6f to
fa30514
Compare
8b98f07 to
ba9ce8b
Compare
fa30514 to
aade359
Compare
aade359 to
25c8b76
Compare
25c8b76 to
c6e58f0
Compare
NotAShelf
left a comment
There was a problem hiding this comment.
Sorry for the delay, I've meant to reply much earlier but kept forgetting each time. Two little comments before we can get this merged.
c6e58f0 to
08caf4d
Compare
08caf4d to
82b0452
Compare
82b0452 to
f7e8894
Compare
f7e8894 to
bc7712d
Compare
NotAShelf
left a comment
There was a problem hiding this comment.
Just one blocker, LGTM afterwards.
| beancountLanguageServerWrapped = pkgs.writeShellScriptBin | ||
| "beancount-language-server" | ||
| '' | ||
| export PATH=$PATH:${pkgs.beancount}/bin | ||
| exec ${pkgs.beancount-language-server}/bin/beancount-language-server "$@" | ||
| ''; |
There was a problem hiding this comment.
The Vala module uses wrapProgram as follows:
(getExe (pkgs.symlinkJoin {
name = "vala-language-server-wrapper";
paths = [pkgs.vala-language-server];
meta.mainProgram = "vala-language-server-wrapper";
buildInputs = [pkgs.makeBinaryWrapper];
postBuild = ''
wrapProgram $out/bin/vala-language-server \
--prefix PATH : ${pkgs.uncrustify}/bin
'';
}))What you're using is not incorrect, but there are existing conventions that I'd rather prefer for their history of adoption and overall reliability. iirc writeShellScriptBin also pulls in another interpreter.
With makeBinaryWrapper we can also ensure better Darwin compatibility.
There was a problem hiding this comment.
Thanks for the guidance! I made the change but opted for a PATH suffix instead of a prefix. This ensures that existing configurations remain prioritized, as beancount allows users to install plugins. If the LSP uses a different version of beancount, it can cause diagnostic errors due to unknown features.
There was a problem hiding this comment.
Also, I think the existing Vala module cmd needs to be changed like so:
- meta.mainProgram = "vala-language-server-wrapper";
+ meta.mainProgram = "vala-language-server";Doing the current way wasn't successful as a drop in replacement for beancount-language-server during testing.
bc7712d to
558b497
Compare
558b497 to
1dc2b50
Compare
Create the `vim.languages.beancount` module using `bean-format` and `beancount-language-server`.
1dc2b50 to
48b7a34
Compare
Create the
vim.languages.beancountmodule usingbean-formatandbeancount-language-server.Current Issues
Thebeancount-language-servercurrently lacks an option to disable formatting. This results in documents being automatically formatted, even when the settingvim.languages.beancount.format.enableis set tofalse.I have opened an issue on the project's GitHub repository requesting the addition of a toggle for this behavior. Until this feature is implemented, users will experience automatic formatting regardless of their preferences. GitHub Issue #650.beancount-language-serveradded an option to disable the automatic formatting, though it's not clear to me how to enable that option... Until then, the language server will always format the document.Sanity Checking
nix fmt).#nix(default package).#maximal.#docs-html(manual, must build).#docs-linkcheck(optional, please build if adding links)x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwin