Compare commits

..

4 commits

Author SHA1 Message Date
diniamo
6c697ca95d
Merge 4b3575a6d4 into 1166e8aa1d 2024-11-02 10:41:38 +01:00
diniamo
4b3575a6d4 languages/julia: add
Co-authored-by: raf <raf@notashelf.dev>
2024-11-02 10:41:33 +01:00
raf
1166e8aa1d
Merge branch 'main' into v0.7 2024-11-01 23:07:19 +00:00
ppenguin
8ff50562d7 fix markdown-preview config error
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
2024-10-30 12:03:39 +00:00
2 changed files with 9 additions and 9 deletions

View file

@ -77,6 +77,8 @@ in {
lsp = {
enable = mkOption {
type = bool;
default = config.vim.languages.enableLSP;
description = ''
Whether to enable Julia LSP support.
@ -86,22 +88,21 @@ in {
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
in {env}`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);
default = defaultServer;
description = "Julia LSP server to use";
};
package = mkOption {
description = ''
Julia LSP server package, null to use the Julia binary in PATH, or
Julia LSP server package, `null` to use the Julia binary in {env}`PATH`, or
the command to run as a list of strings.
'';
type = nullOr (either package (listOf str));

View file

@ -4,9 +4,8 @@
lib,
...
}: let
inherit (lib.strings) stringLength concatMapStringsSep;
inherit (lib.strings) concatMapStringsSep;
inherit (lib.modules) mkIf;
cfg = config.vim.utility.preview.markdownPreview;
in {
config = mkIf cfg.enable {
@ -19,8 +18,8 @@ in {
mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)];
mkdp_command_for_global = cfg.alwaysAllowPreview;
mkdp_open_to_the_world = cfg.broadcastServer;
mkdp_open_ip = mkIf (stringLength cfg.customIP > 0) cfg.customIP;
mkdp_port = mkIf (stringLength cfg.customPort > 0) cfg.customPort;
mkdp_open_ip = cfg.customIP;
mkdp_port = cfg.customPort;
};
};
}