update:nvim

This commit is contained in:
sankalp committed 2024-03-25 14:37:19 +05:45
1 parent 099013eefb
commit 877320b7e4
8 files changed
+75 -40

No files matched your search

@@ -26,7 +26,7 @@ end
return {
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "plugins.extras.lang.json-extended" },
{
"williamboman/mason.nvim",
opts = function(_, opts)
@@ -146,6 +146,7 @@ return {
},
keys = {
{ "<leader>ct", ft = { "typescript", "typescriptreact" }, "<cmd>TSC<cr>", desc = "Type Check" },
{ "<leader>xy", ft = { "typescript", "typescriptreact" }, "<cmd>TSCOpen<cr>", desc = "Type Check Quickfix" },
},
ft = {
"typescript",
@@ -12,6 +12,25 @@ return {
opts = {
servers = {
volar = {},
tsserver = {},
},
setup = {
tsserver = function(_, opts)
local mason_registry = require("mason-registry")
local vue_language_server_path = mason_registry.get_package("vue-language-server"):get_install_path()
.. "/node_modules/@vue/language-server"
opts.init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = vue_language_server_path,
languages = { "vue" },
},
},
}
opts.filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" }
end,
},
},
},