mirror of https://github.com/LazyVim/starter
Merge branch 'main' into java-experiments
commit
c24bf328ef
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.coding.mini-surround",
|
||||
"lazyvim.plugins.extras.editor.mini-files"
|
||||
"lazyvim.plugins.extras.dap.core",
|
||||
"lazyvim.plugins.extras.lang.java",
|
||||
"lazyvim.plugins.extras.test.core"
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "2123"
|
||||
"NEWS.md": "6520"
|
||||
},
|
||||
"version": 3
|
||||
}
|
||||
"version": 6
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"extras": [
|
||||
<<<<<<< HEAD
|
||||
"lazyvim.plugins.extras.dap.core",
|
||||
"lazyvim.plugins.extras.lang.java",
|
||||
"lazyvim.plugins.extras.test.core"
|
||||
=======
|
||||
"lazyvim.plugins.extras.coding.mini-surround",
|
||||
"lazyvim.plugins.extras.editor.mini-files"
|
||||
>>>>>>> main
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "6520"
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
"version": 3
|
||||
=======
|
||||
"version": 6
|
||||
>>>>>>> main
|
||||
}
|
|
@ -1,19 +1,23 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
|
@ -27,7 +31,10 @@ require("lazy").setup({
|
|||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
|
|
|
@ -30,14 +30,6 @@ return {
|
|||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
@ -71,18 +63,6 @@ return {
|
|||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
|
@ -210,56 +190,4 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- this way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
"echasnovski/mini.files",
|
||||
opts = {
|
||||
windows = {
|
||||
width_nofocus = 20,
|
||||
width_focus = 50,
|
||||
width_preview = 100,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add parsers, without replacing the default ones
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"java",
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
"ysmb-wtsg/in-and-out.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<C-CR>",
|
||||
function()
|
||||
require("in-and-out").in_and_out()
|
||||
end,
|
||||
mode = "i",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
"jiaoshijie/undotree",
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
config = true,
|
||||
keys = { -- load the plugin only when using it's keybinding:
|
||||
{
|
||||
"<leader>uu",
|
||||
"<cmd>lua require('undotree').toggle()<cr>",
|
||||
desc = "Toggle UndoTree",
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue