Small changes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"luckasRanarison/tailwind-tools.nvim",
|
||||
name = "tailwind-tools",
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
--- @type LazyPluginSpec
|
||||
return {
|
||||
"pmizio/typescript-tools.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"dmmulroy/ts-error-translator.nvim",
|
||||
},
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local typescript_tools = require("typescript-tools")
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
local tserrortranslator = require("ts-error-translator")
|
||||
|
||||
local on_attach = require("taken.utils.on_attach")
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
local cwd = vim.fn.getcwd()
|
||||
local tsserver_path = cwd .. "/node_modules/.bin/tsserver"
|
||||
|
||||
local cmd = ""
|
||||
if vim.loop.fs_stat(tsserver_path) then
|
||||
cmd = tsserver_path
|
||||
else
|
||||
cmd = "typescript-language-server"
|
||||
end
|
||||
|
||||
typescript_tools.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
if cmd == "typescript-language-server" then
|
||||
vim.notify("Using global tsserver")
|
||||
end
|
||||
end,
|
||||
settings = {
|
||||
cmd = { cmd, "--stdio" },
|
||||
tsserver_file_preferences = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
quotePreference = "auto",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
tserrortranslator.setup()
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user