mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-27 21:41:29 +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
|
- Add C# support under `vim.languages.csharp`, with support for both
|
||||||
omnisharp-roslyn and csharp-language-server.
|
omnisharp-roslyn and csharp-language-server.
|
||||||
|
|
||||||
- Add Julia support under `vim.languages.julia`. Note that the entirety of
|
- Add Julia support under `vim.languages.julia`. Note that the entirety of Julia
|
||||||
Julia is bundled with nvf, if you enabled the module, since there is no way
|
is bundled with nvf, if you enable the module, since there is no way to
|
||||||
to provide only the LSP server.
|
provide only the LSP server.
|
||||||
|
|
||||||
[Neovim documentation on `vim.cmd`]: https://neovim.io/doc/user/lua.html#vim.cmd()
|
[Neovim documentation on `vim.cmd`]: https://neovim.io/doc/user/lua.html#vim.cmd()
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,9 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) attrNames isList;
|
inherit (builtins) attrNames isList;
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
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.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.strings) optionalString;
|
||||||
inherit (lib.nvim.types) mkGrammarOption;
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
inherit (lib.nvim.lua) expToLua;
|
inherit (lib.nvim.lua) expToLua;
|
||||||
|
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
then expToLua cfg.lsp.package
|
then expToLua cfg.lsp.package
|
||||||
else ''
|
else ''
|
||||||
{
|
{
|
||||||
"${cfg.lsp.package}/bin/julia",
|
"${optionalString (cfg.lsp.package != null) "${cfg.lsp.package}/bin/"}julia",
|
||||||
"--startup-file=no",
|
"--startup-file=no",
|
||||||
"--history-file=no",
|
"--history-file=no",
|
||||||
"--eval",
|
"--eval",
|
||||||
|
@ -75,7 +76,23 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
lsp = {
|
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 {
|
server = mkOption {
|
||||||
description = "Julia LSP server to use";
|
description = "Julia LSP server to use";
|
||||||
type = enum (attrNames servers);
|
type = enum (attrNames servers);
|
||||||
|
@ -83,8 +100,11 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "Julia LSP server package, or the command to run as a list of strings";
|
description = ''
|
||||||
type = either package (listOf str);
|
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;
|
default = servers.${cfg.lsp.server}.package;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue