samhh / dotfiles

Configuring the universe with Nix.
49 stars 2 forks source link

ESLint in editor #406

Closed samhh closed 5 months ago

samhh commented 9 months ago

Relevant: https://github.com/helix-editor/helix/issues/7079#issuecomment-1555922822

No luck with this (config borrowed from the relevant project's VSCode ESLint config):

diff --git a/home/editor.nix b/home/editor.nix
index 15b3d80..5e94eac 100644
--- a/home/editor.nix
+++ b/home/editor.nix
@@ -58,6 +58,15 @@
           ];
         };

+        eslint = {
+          command = "vscode-eslint-language-server";
+          args = [ "--stdio" ];
+          config = {
+            overrideConfigFile = "eslint.config.mjs";
+            experimental.useFlatConfig = true;
+          };
+        };
+
         efm = {
           command = "efm-langserver";
           config.documentFormatting = true;
@@ -77,6 +86,8 @@
               name = "efm";
               only-features = [ "format" ];
             }
+
+            "eslint"
           ];
         }
       ];
samhh commented 5 months ago

https://github.com/samhh/dotfiles/commit/9cda00f37383eccc9908d1dc7b75b83e08bc6d27