Skip to content

Commit

Permalink
feat(typescript): Replace typescript.nvim with typescript-tools.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzaaft committed Nov 19, 2023
1 parent 20c1e94 commit fdb3ca3
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions lua/astrocommunity/pack/typescript/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,25 @@ return {
event = "BufRead package.json",
},
{
"jose-elias-alvarez/typescript.nvim",
ft = {
"typescript",
"typescriptreact",
"javascript",
"javascriptreact",
},
opts = function() return { server = require("astrolsp").lsp_opts "tsserver" } end,
},
{
"nvimtools/none-ls.nvim",
opts = function(_, opts)
opts.sources = utils.list_insert_unique(opts.sources, require "typescript.extensions.null-ls.code-actions")
"pmizio/typescript-tools.nvim",
dependencies = { "AstroNvim/astrolsp", opts = { handlers = { tsserver = false } } },
ft = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" },
opts = function()
-- get AstroLSP provided options like `on_attach` and `capabilities`
return require("astrocore").extend_tbl(require("astrolsp").lsp_opts "typescript-tools", {
settings = {
tsserver_file_preferences = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
})
end,
},
{
Expand Down

0 comments on commit fdb3ca3

Please sign in to comment.