mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 11:01:15 +00:00
Compare commits
2 commits
21c322671b
...
9288e83528
Author | SHA1 | Date | |
---|---|---|---|
|
9288e83528 | ||
|
45f58eddda |
2 changed files with 28 additions and 8 deletions
|
@ -192,9 +192,9 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
|||
- Add C# support under `vim.languages.csharp`, with support for both
|
||||
omnisharp-roslyn and csharp-language-server.
|
||||
|
||||
- Add Julia support under `vim.languages.julia`. Note that the entirety of
|
||||
Julia is bundled with nvf, if you enabled the module, since there is no way
|
||||
to provide only the LSP server.
|
||||
- Add Julia support under `vim.languages.julia`. Note that the entirety of Julia
|
||||
is bundled with nvf, if you enable the module, since there is no way to
|
||||
provide only the LSP server.
|
||||
|
||||
[Neovim documentation on `vim.cmd`]: https://neovim.io/doc/user/lua.html#vim.cmd()
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
}: let
|
||||
inherit (builtins) attrNames isList;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) either listOf package str enum;
|
||||
inherit (lib.types) either listOf package str enum bool nullOr;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
|
||||
|
@ -25,7 +26,7 @@
|
|||
then expToLua cfg.lsp.package
|
||||
else ''
|
||||
{
|
||||
"${cfg.lsp.package}/bin/julia",
|
||||
"${optionalString (cfg.lsp.package != null) "${cfg.lsp.package}/bin/"}julia",
|
||||
"--startup-file=no",
|
||||
"--history-file=no",
|
||||
"--eval",
|
||||
|
@ -75,7 +76,23 @@ in {
|
|||
};
|
||||
|
||||
lsp = {
|
||||
enable = mkEnableOption "Julia LSP support" // {default = config.vim.languages.enableLSP;};
|
||||
enable = mkOption {
|
||||
description = ''
|
||||
Whether to enable Julia LSP support.
|
||||
|
||||
::: {.note}
|
||||
The entirety of Julia is bundled with nvf, if you enable this
|
||||
option, since there is no way to provide only the LSP server.
|
||||
|
||||
If you want to avoid that, you have to change
|
||||
[](#opt-vim.languages.julia.lsp.package) to use the Julia binary
|
||||
in PATH (set it to `null`), and add the `LanguageServer` package to
|
||||
Julia in your devshells.
|
||||
:::
|
||||
'';
|
||||
type = bool;
|
||||
default = config.vim.languages.enableLSP;
|
||||
};
|
||||
server = mkOption {
|
||||
description = "Julia LSP server to use";
|
||||
type = enum (attrNames servers);
|
||||
|
@ -83,8 +100,11 @@ in {
|
|||
};
|
||||
|
||||
package = mkOption {
|
||||
description = "Julia LSP server package, or the command to run as a list of strings";
|
||||
type = either package (listOf str);
|
||||
description = ''
|
||||
Julia LSP server package, null to use the Julia binary in PATH, or
|
||||
the command to run as a list of strings.
|
||||
'';
|
||||
type = nullOr (either package (listOf str));
|
||||
default = servers.${cfg.lsp.server}.package;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue