Skip to content

Commit 1127f69

Browse files
committed
Put icons on all language servers
1 parent ca39b86 commit 1127f69

10 files changed

Lines changed: 24 additions & 8 deletions

File tree

modules/exporters/typst/language_server_tinymist/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ in
2323
common.writeTextDirWithMetaAndPassthru tinymist.meta passthru "lib/codedown/language-servers/typst-${kernelName}-tinymist-language-server.yaml" (lib.generators.toYAML {} [{
2424
name = languageServerName;
2525
version = tinymist.version;
26+
icon = ../typst.png;
27+
icon_monochrome = ../typst.svg;
2628
extensions = ["typ"];
2729
notebook_suffix = ".typ";
2830
attrs = ["typst"];

modules/kernels/bash/language_server_bash/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ in
3939
common.writeTextDirWithMetaAndPassthru bashLanguageServerWithMan.meta passthru "lib/codedown/language-servers/bash-${kernelName}-bash-language-server.yaml" (lib.generators.toYAML {} [{
4040
name = languageServerName;
4141
version = bashLanguageServer.version;
42+
icon = ../bash-logo-128x128.png;
43+
icon_monochrome = ../gnubash-monochrome.svg;
4244
extensions = ["sh" "bash"];
4345
notebook_suffix = ".bash";
4446
attrs = ["bash"];

modules/kernels/cpp/language_server_clangd/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ in
4040
common.writeTextDirWithMetaAndPassthru clangd.meta passthru "lib/codedown/language-servers/cpp-${kernelName}-${languageServerName}.yaml" (lib.generators.toYAML {} [{
4141
name = languageServerName;
4242
version = clangd.version;
43+
icon = ../cplusplus.svg;
44+
icon_monochrome = ../cplusplus.svg;
4345
extensions = ["cpp" "hpp" "cxx" "hxx" "c" "h"];
4446
notebook_suffix = "";
4547
attrs = ["cpp"];

modules/kernels/python/language_servers/language_server_flake8/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ common.writeTextDirWithMetaAndPassthru python.pkgs.flake8.meta passthru "lib/cod
2828
version = python.pkgs.flake8.version;
2929
display_name = "Flake8";
3030
description = python.pkgs.flake8.meta.description;
31+
icon = ../../python-logo-64x64.png;
32+
icon_monochrome = ../../python-monochrome.svg;
3133
extensions = ["py"];
3234
notebook_suffix = ".py";
3335
kernel_name = kernelName;

modules/kernels/python/language_servers/language_server_microsoft/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ common.writeTextDirWithMetaAndPassthru python-language-server.meta passthru "lib
7878
version = python-language-server.version;
7979
display_name = "Python Language Server";
8080
description = python-language-server.meta.description;
81+
icon = ../../python-logo-64x64.png;
82+
icon_monochrome = ../../python-monochrome.svg;
8183
extensions = ["py"];
8284
notebook_suffix = ".py";
8385
kernel_name = kernelName;

modules/kernels/python/language_servers/language_server_palantir/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ common.writeTextDirWithMetaAndPassthru python.pkgs.python-language-server.meta p
5454
version = python.pkgs.python-language-server.version;
5555
display_name = "Python Language Server";
5656
description = python.pkgs.python-language-server.meta.description;
57+
icon = ../../python-logo-64x64.png;
58+
icon_monochrome = ../../python-monochrome.svg;
5759
extensions = ["py"];
5860
notebook_suffix = ".py";
5961
kernel_name = kernelName;

modules/kernels/python/language_servers/language_server_pycodestyle/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ common.writeTextDirWithMetaAndPassthru python.pkgs.pycodestyle.meta passthru "li
2929
version = python.pkgs.pycodestyle.version;
3030
display_name = "pycodestyle";
3131
description = python.pkgs.pycodestyle.meta.description;
32+
icon = ../../python-logo-64x64.png;
33+
icon_monochrome = ../../python-monochrome.svg;
3234
extensions = ["py"];
3335
notebook_suffix = ".py";
3436
kernel_name = kernelName;

modules/kernels/python/language_servers/language_server_pythonlsp/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ common.writeTextDirWithMetaAndPassthru python.pkgs.python-lsp-server.meta passth
5555
version = python.pkgs.python-lsp-server.version;
5656
display_name = "Python LSP Server";
5757
description = python.pkgs.python-lsp-server.meta.description;
58+
icon = ../../python-logo-64x64.png;
59+
icon_monochrome = ../../python-monochrome.svg;
5860
extensions = ["py"];
5961
notebook_suffix = ".py";
6062
kernel_name = kernelName;

modules/kernels/r/language-server-languageserver/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ common.writeTextDirWithMetaAndPassthru languageserver.meta passthru "lib/codedow
3030
version = languageserver.version;
3131
display_name = "";
3232
description = "An implementation of the Language Server Protocol for R";
33-
icon = null;
33+
icon = ../r-logo-64x64.png;
3434
icon_monochrome = ../r-monochrome.svg;
3535
extensions = ["r"];
3636
notebook_suffix = ".r";

tests/app/Spec/Tests/SampleEnvironments.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ validateLanguageServerConfig path obj = do
8787
case aesonLookup "name" obj of
8888
Just (A.String name) -> info [i|Checking language server config: #{name} (#{path})|]
8989
_ -> expectationFailure [i|Language server config missing 'name': #{path}|]
90-
-- If icon is present and non-null, icon_monochrome must also be present
9190
case aesonLookup "icon" obj of
92-
Just A.Null -> return ()
93-
Just _ -> case aesonLookup "icon_monochrome" obj of
94-
Nothing -> expectationFailure [i|Language server config has 'icon' but missing 'icon_monochrome': #{path}|]
95-
Just A.Null -> expectationFailure [i|Language server config has 'icon' but 'icon_monochrome' is null: #{path}|]
96-
Just _ -> return ()
97-
Nothing -> return ()
91+
Nothing -> expectationFailure [i|Language server config missing 'icon': #{path}|]
92+
Just A.Null -> expectationFailure [i|Language server config has null 'icon': #{path}|]
93+
Just _ -> return ()
94+
case aesonLookup "icon_monochrome" obj of
95+
Nothing -> expectationFailure [i|Language server config missing 'icon_monochrome': #{path}|]
96+
Just A.Null -> expectationFailure [i|Language server config has null 'icon_monochrome': #{path}|]
97+
Just _ -> return ()
9898

9999
validatePackage :: (MonadLoggerIO m, MonadFail m) => FilePath -> Text -> NixPackage -> m ()
100100
validatePackage envRoot attr (NixPackage {nixPackageMeta=(NixMeta {..}), ..}) = do

0 commit comments

Comments
 (0)