feat(nvim): support javascript/typescript LSP, lint, and formatting

This commit is contained in:
Michael Thomas 2024-01-22 11:11:10 -05:00
parent 04768bb6c9
commit e6aaf1627c
2 changed files with 10 additions and 0 deletions

View File

@ -20,5 +20,7 @@
ripgrep ripgrep
gnumake gnumake
gcc gcc
eslint_d
prettierd
]; ];
} }

View File

@ -6,6 +6,10 @@ return {
---@type lspconfig.options ---@type lspconfig.options
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
servers = { servers = {
---@diagnostic disable-next-line: missing-fields
tsserver = {},
---@diagnostic disable-next-line: missing-fields
eslint = {},
nil_ls = {}, nil_ls = {},
}, },
}, },
@ -49,6 +53,10 @@ return {
---@type table<string, conform.FormatterUnit[]> ---@type table<string, conform.FormatterUnit[]>
formatters_by_ft = { formatters_by_ft = {
nix = { "alejandra" }, nix = { "alejandra" },
javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
}, },
}, },
}, },