Added typescript tools
This commit is contained in:
@@ -3,14 +3,15 @@ return {
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"folke/neodev.nvim",
|
||||
"pmizio/typescript-tools.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local neodev = require("neodev")
|
||||
local lspconfig = require("lspconfig")
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
|
||||
neodev.setup({})
|
||||
local typescript_tools = require("typescript-tools")
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
local opts = { noremap = true, silent = true, buffer = bufnr }
|
||||
@@ -54,6 +55,8 @@ return {
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
|
||||
neodev.setup({})
|
||||
|
||||
lspconfig["lua_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
@@ -69,12 +72,19 @@ return {
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig["html"].setup({
|
||||
typescript_tools.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
tsserver_file_preferences = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeCompletionsForModuleExports = true,
|
||||
quotePreference = "auto",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig["tsserver"].setup({
|
||||
lspconfig["html"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user