Skip to content

Commit 6199785

Browse files
committed
chore(lsp): Add eslint
1 parent a9f42df commit 6199785

2 files changed

Lines changed: 24 additions & 9 deletions

File tree

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/default.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,21 @@ in {
176176
# This should be handled by npm packages as mismatches can lead to breakage
177177
package = null;
178178
};
179+
eslint = {
180+
enable = true;
181+
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"];
182+
onAttach.function =
183+
/*
184+
lua
185+
*/
186+
''
187+
function(client, bufnr)
188+
client.server_capabilities.documentFormattingProvider = false
189+
client.server_capabilities.documentRangeFormattingProvider = false
190+
client.server_capabilities.documentOnTypeFormattingProvider = false
191+
end
192+
'';
193+
};
179194
bashls.enable = true;
180195
clangd.enable = true;
181196
cmake.enable = true;

0 commit comments

Comments
 (0)