Closed M1Sports20 closed 1 year ago
Same error here:
[START][2023-03-29 06:45:57] LSP logging initiated [ERROR][2023-03-29 06:45:57] .../vim/lsp/rpc.lua:734 "rpc" "beancount-language-server" "stderr" "error: a value is required for '--stdio
' but none was supplied\n\nFor more information, try '--help'.\n"
The used configuration is:
require("lspconfig").beancount.setup({
init_options = {
journal_file = "/path/to/real/journal/file",
}
})
interesting, I will try to look at it tonight
DId this just happen recently? I did push an update in the last week or so
Yes it happened when I upgraded to the latest version.
I've seen the same thing with emacs. The workaround is just to pass any garbage argument after --stdio
when launching beancount-ls
.
Thanks @peterhoeg , I'm working around this with these custom options:
beancount = {
cmd = { "beancount-language-server", "--stdio", "asdf" },
init_options = {
journal_file = "<path to my beancount file>",
},
},
should be fixed with v1.3.1 I did yesterday, sorry i missed this one
I can confirm that works.
closing, if this is still an issue please reopen issue
@polarmutex - where's this v1.3.1? I could not find that version. I'm getting this same error for v1.3.0
Solution:
require('lspconfig').beancount.setup {
cmd = { "beancount-language-server", "--stdio", "something" },
init_options = {
journal_file = "/path/to/beancount/file",
};
};
should be able to find it on the releases page or pull from crates.io. i am not sure how you install lsp servers on your machine.
You mean here? The latest version is v1.3.0
I just do cargo install xxxxxx
Ah ok - you guys install straight from github! Thanks @peterhoeg
you guys install straight from github!
No, my distribution carries it: https://github.com/NixOS/nixpkgs/commit/98d2146331f49640ebb3e852e78cca0aa023e020
I haven’t installed anything directly from GH in years.
God damnit, I need to get into nix I see 😆 Thanks ahah
guess i missed uploading 1.3.1 to crates.io, should be there now
It seems the default options in nvim-lspconfig doesn't work with the latest beancount-lsp.
The latest version of beancount-lsp has argument --stdio The nvim-lspconfig doesn't provide an argument to --stdio resulting in the following error:
[ERROR][2023-03-25 15:41:44] .../vim/lsp/rpc.lua:733 "rpc" "beancount-language-server" "stderr" "error: a value is required for '--stdio ' but none was supplied\n\nFor more information, try '--help'.\n"
I of course can also override the default cmd provided by nvim-lspconfig, but I dont' know what is expected as an argument here.