File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 The entirety of Julia is bundled with nvf, if you enable this
5252 option, since there is no way to provide only the LSP server.
5353
54- If you want to avoid that, you have to change
55- {option}`vim.lsp.servers.julials.cmd` to use
56- the Julia binary in {env}`PATH`, and add the `LanguageServer`
57- package to Julia in your devshells.
54+ Since the LSP server is a julia package that needs to be bundled
55+ within a Julia binary, there is no way for us to provide only the
56+ LSP server. By default, you'll just have to add the `LanguageServer`
57+ package to Julia in your devshells (or general environment), and be
58+ good to go.
5859
59- Check the source file of this option for the full `cmd`.
60+ If you want to have the entirety of Julia bundled within nvf, you can
61+ change {option}`vim.lsp.servers.presets.julia-languageserver.usePathBin`
62+ to `false` to have nvf bundle julia and the lsp.
6063 :::
6164 '' ;
6265 } ;
Original file line number Diff line number Diff line change 77 inherit ( lib . meta ) getExe ;
88 inherit ( lib . modules ) mkIf ;
99 inherit ( lib . nvim . types ) mkLspPresetEnableOption ;
10+ inherit ( lib . nvim . config ) mkBool ;
1011 inherit ( lib . generators ) mkLuaInline ;
1112 inherit ( lib . nvim . dag ) entryBefore ;
1213
1314 cfg = config . vim . lsp . presets . julia-languageserver ;
15+ julials_bin =
16+ if cfg . usePathBin
17+ then "julia"
18+ else getExe ( pkgs . julia-bin . withPackages [ "LanguageServer" ] ) ;
1419in {
1520 options . vim . lsp . presets . julia-languageserver = {
1621 enable = mkLspPresetEnableOption "julia-languageserver" "Julia" [ ] ;
22+ usePathBin = mkBool false ''
23+ use julia taken from PATH, instead of bundling it within nvf.
24+ You'll need to add "LanguageServer" to your Julia instance for this to work
25+ '' ;
1726 } ;
1827
1928 config = mkIf cfg . enable {
2332 root_markers = [ "Project.toml" "JuliaProject.toml" ] ;
2433 cmd = mkLuaInline ''
2534 {
26- '${ getExe ( pkgs . julia . withPackages [ "LanguageServer" ] ) } ',
35+ '${ julials_bin } ',
2736 '--startup-file=no',
2837 '--history-file=no',
2938 '-e',
You can’t perform that action at this time.
0 commit comments