129 lines
3.0 KiB
Lua
129 lines
3.0 KiB
Lua
return {
|
|
{ "Everblush/nvim", name = "everblush" },
|
|
{ "hrsh7th/vim-vsnip" },
|
|
{ "hrsh7th/cmp-nvim-lsp" },
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
config = function()
|
|
local cmp = require("cmp")
|
|
cmp.setup({
|
|
snippet = {
|
|
expand = function(args)
|
|
vim.fn["vsnip#anonymous"](args.body)
|
|
end,
|
|
},
|
|
mapping = cmp.mapping.preset.insert({
|
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
["<C-Space>"] = cmp.mapping.complete(),
|
|
["<C-e>"] = cmp.mapping.abort(),
|
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
}),
|
|
sources = cmp.config.sources({
|
|
{ name = "nvim_lsp" },
|
|
{ name = "vsnip" },
|
|
}, {
|
|
{ name = "buffer" },
|
|
}),
|
|
})
|
|
end,
|
|
},
|
|
|
|
{
|
|
"nvimdev/guard.nvim",
|
|
-- Builtin configuration, optional
|
|
dependencies = {
|
|
"nvimdev/guard-collection",
|
|
},
|
|
config = function()
|
|
local ft = require("guard.filetype")
|
|
ft("lua"):fmt("lsp"):append("stylua")
|
|
ft("typescript,javascript,typescriptreact"):fmt("prettierd"):lint("eslint_d")
|
|
end,
|
|
},
|
|
{
|
|
"nvim-telescope/telescope.nvim",
|
|
tag = "0.1.x",
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
},
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
build = ":TSUpdate",
|
|
config = function()
|
|
local configs = require("nvim-treesitter.configs")
|
|
|
|
configs.setup({
|
|
ensure_installed = { "lua", "javascript", "typescript", "html", "tsx" },
|
|
sync_install = false,
|
|
highlight = { enable = true },
|
|
indent = { enable = true },
|
|
})
|
|
end,
|
|
},
|
|
|
|
{
|
|
"nvim-neo-tree/neo-tree.nvim",
|
|
branch = "v3.x",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-tree/nvim-web-devicons",
|
|
"MunifTanjim/nui.nvim",
|
|
{
|
|
"s1n7ax/nvim-window-picker",
|
|
version = "2.*",
|
|
config = function()
|
|
require("neo-tree").setup({
|
|
update_focused_file = {
|
|
enable = true,
|
|
},
|
|
})
|
|
|
|
require("window-picker").setup({
|
|
filter_rules = {
|
|
include_current_win = false,
|
|
autoselect_one = true,
|
|
-- filter using buffer options
|
|
bo = {
|
|
-- if the file type is one of following, the window will be ignored
|
|
filetype = { "neo-tree", "neo-tree-popup", "notify" },
|
|
-- if the buffer type is one of following, the window will be ignored
|
|
buftype = { "terminal", "quickfix" },
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
},
|
|
config = function()
|
|
require("neo-tree").setup({
|
|
close_if_last_window = false,
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
dependencies = { "hrsh7th/cmp-nvim-lsp" },
|
|
config = function()
|
|
local lsp = require("lspconfig")
|
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
|
|
lsp.lua_ls.setup({
|
|
capabilities = capabilities,
|
|
settings = {
|
|
Lua = {
|
|
diagnostics = { globals = { "vim", "require" } },
|
|
workspace = {
|
|
-- Make the server aware of Neovim runtime files
|
|
library = vim.api.nvim_get_runtime_file("", true),
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
lsp.vtsls.setup({
|
|
capabilities = capabilities,
|
|
})
|
|
end,
|
|
},
|
|
}
|