Initial commit
This commit is contained in:
4
lua/plugins/autotag.lua
Normal file
4
lua/plugins/autotag.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"windwp/nvim-ts-autotag",
|
||||
lazy = false
|
||||
}
|
||||
3
lua/plugins/lspconfig.lua
Normal file
3
lua/plugins/lspconfig.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig"
|
||||
}
|
||||
7
lua/plugins/luasnip.lua
Normal file
7
lua/plugins/luasnip.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
-- follow latest release.
|
||||
version = "v2.4", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
|
||||
-- install jsregexp (optional!).
|
||||
build = "make install_jsregexp"
|
||||
}
|
||||
73
lua/plugins/nvim-cmp.lua
Normal file
73
lua/plugins/nvim-cmp.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter", -- Only load when entering insert mode for performance
|
||||
dependencies = {
|
||||
-- Snippet engine (REQUIRED by cmp)
|
||||
{ "L3MON4D3/LuaSnip", dependencies = { "saadparwaiz1/cmp_luasnip" } },
|
||||
|
||||
-- Sources for completion
|
||||
"hrsh7th/cmp-nvim-lsp", -- LSP suggestions
|
||||
"hrsh7th/cmp-buffer", -- Buffer words
|
||||
"hrsh7th/cmp-path", -- File system paths
|
||||
"hrsh7th/cmp-cmdline", -- Command line completion (if you want it)
|
||||
|
||||
-- You can add more sources here, e.g., 'hrsh7th/cmp-vsnip', 'ray-x/cmp-treesitter'
|
||||
},
|
||||
config = function()
|
||||
-- Set up nvim-cmp
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - sets the snippet engine nvim-cmp uses
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(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(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept selected item.
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- Use <Tab> to jump to the next snippet placeholder
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
-- Use <S-Tab> to jump to the previous snippet placeholder
|
||||
elseif luasnip.jump_backward() then
|
||||
luasnip.jump_backward()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" }, -- LSP suggestions
|
||||
{ name = "luasnip" }, -- Snippet source
|
||||
}, {
|
||||
{ name = "buffer" }, -- Buffer words
|
||||
{ name = "path" }, -- File system paths
|
||||
}),
|
||||
})
|
||||
|
||||
-- Optional: Configure for command line completion
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
}
|
||||
11
lua/plugins/oil.lua
Normal file
11
lua/plugins/oil.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
|
||||
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
|
||||
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
|
||||
lazy = false,
|
||||
};
|
||||
6
lua/plugins/treesitter.lua
Normal file
6
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
lazy = false,
|
||||
branch = 'main',
|
||||
build = ':TSUpdate'
|
||||
}
|
||||
Reference in New Issue
Block a user