mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Added node support
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
dap = {
|
||||
enable = true;
|
||||
adapters.servers = {
|
||||
"pwa-node" = {
|
||||
host = "localhost";
|
||||
port = 8123;
|
||||
executable = {
|
||||
command = "${pkgs.vscode-js-debug}/bin/js-debug";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
require("dap").configurations.javascript = {
|
||||
{
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
program = "''${file}",
|
||||
cwd = "''${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
let
|
||||
# Read all files in the current directory
|
||||
files = builtins.readDir ./.;
|
||||
|
||||
# Filter out default.nix and non-.nix files
|
||||
nixFiles = builtins.filter
|
||||
(name: name != "default.nix" && builtins.match ".*\\.nix" name != null)
|
||||
(builtins.attrNames files);
|
||||
|
||||
# Create a list of import statements
|
||||
imports = map (name: ./. + "/${name}") nixFiles;
|
||||
in {
|
||||
# Import all configuration modules automatically
|
||||
imports = imports;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
plugins = {
|
||||
conform-nvim = {
|
||||
settings = {
|
||||
formatters_by_ft.javascript = ["prettier"];
|
||||
formatters_by_ft.typescript = ["prettier"];
|
||||
formatters_by_ft.javascriptreact = ["prettier"];
|
||||
formatters_by_ft.typescriptreact = ["prettier"];
|
||||
};
|
||||
};
|
||||
lsp.servers.ts-ls = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"javascript"
|
||||
"javascriptreact"
|
||||
"typescript"
|
||||
"typescriptreact"
|
||||
];
|
||||
extraOptions = {
|
||||
settings = {
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp.servers.eslint.enable = true;
|
||||
none-ls.sources.formatting.prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -175,8 +175,6 @@ in
|
||||
formatters_by_ft = {
|
||||
css = ["prettier"];
|
||||
html = ["prettier"];
|
||||
javascript = ["prettier"];
|
||||
javascriptreact = ["prettier"];
|
||||
json = ["prettier"];
|
||||
just = ["just"];
|
||||
lua = ["stylua"];
|
||||
@@ -185,8 +183,6 @@ in
|
||||
ruby = ["rubyfmt"];
|
||||
terraform = ["tofu_fmt"];
|
||||
tf = ["tofu_fmt"];
|
||||
typescript = ["prettier"];
|
||||
typescriptreact = ["prettier"];
|
||||
yaml = ["yamlfmt"];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user