nvim-configs/plugins/tsdev.lua

46 lines
1.4 KiB
Lua
Raw Normal View History

2024-10-06 13:13:53 +08:00
return {
{
"pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
opts = {},
config = function()
require('typescript-tools').setup({})
end
},{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
config = function()
require('cmp').setup({
completion = {
keyword_length = 1,
max_item_count = 6
},
sources = {
{ name = "nvim_lsp", keyword_length = 1, max_item_count = 6 },
{ name = "buffer", keyword_length = 1, max_item_count = 6 },
{ name = "path", keyword_length = 1, max_item_count = 6 },
}
})
end
},{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "tsx", "typescript", "javascript", "html" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
}
}