I’m new in nvim
I want to install typescript-language-service on nvim
But can I not do that
Please see all my configs and say me What should I do
enter image description here
my configs/lspconfig.lua
-- EXAMPLE
local configs = require("configs.lspconfig")
local on_attach = configs.on_attach
local on_init = configs.on_init
local capabilities = configs.capabilities
local lspconfig = require "lspconfig"
local servers = { "html", "cssls", "clangd"}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_init = on_init,
on_attach = on_attach,
capabilities = capabilities,
}
end
--- typescript
lspconfig.tsserver.setup {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
}
-- Without the loop, you would have to manually set up each LSP
--
-- lspconfig.html.setup {
-- on_attach = on_attach,
-- capabilities = capabilities,
-- }
--
-- lspconfig.cssls.setup {
-- on_attach = on_attach,
-- capabilities = capabilities,
-- }
my custom/chadrc.lua :
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua
---@type ChadrcConfig
local M = {}
M.ui = {
theme = "onedark",
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
}
M.plugins = "custom.plugins"
return M
my custom/plugins.lua :
local plugins = {
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"lua-language-server",
"typescript-language-server",
"html-lsp",
"prettier",
"stylua"
},
},
},
-- In order to modify the `lspconfig` configuration:
{
"neovim/nvim-lspconfig",
config = function()
require("configs.lspconfig").defaults()
require "configs.lspconfig"
end,
},
}
return plugins
My Error Text in :MasonInstallAll :
???? typescript-language-server
▼ Displaying full log
Initialized npm root.
Installing npm package [email protected]…
spawn: npm failed with exit code 1 and signal 0.
enter image description here
I installed and removed manytime nvchad.
But can I not do that.
my nvim version is 10
My nvchad version is 2.5
AliAshooriyoon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.