removed nvim as submodule

This commit is contained in:
snarmph 2025-09-29 10:32:22 +02:00
parent 802e03c77e
commit 3a6b72a050
16 changed files with 727 additions and 1 deletions

31
nvim/lua/config/lazy.lua Normal file
View file

@ -0,0 +1,31 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
require("lazy").setup({
spec = {
-- import plugins
{ import = "plugins" },
},
install = { colorscheme = { "habamax" } },
checker = { enabled = false },
})

View file

@ -0,0 +1,16 @@
return {
"goolord/alpha-nvim",
dependencies = {
'nvim-tree/nvim-web-devicons',
"nvim-lua/plenary.nvim",
},
config = function()
local theta = require("alpha.themes.theta")
theta.config.layout[1].val = math.floor(vim.fn.winheight(0) * 0.2)
theta.file_icons.provider = "devicons"
theta.header.opts.hl = "CursorLineNr"
require("alpha").setup(
theta.config
)
end,
}

View file

@ -0,0 +1,22 @@
return {
"rebelot/kanagawa.nvim",
opts = {
colors = {
theme = {
all = {
ui = {
bg_gutter = "none",
},
},
},
},
overrides = function (colors)
local theme = colors.theme
return {
NormalFloat = { bg = "none" },
FloatBorder = { bg = "none" },
FloatTitle = { bg = "none" },
}
end
},
}

View file

@ -0,0 +1,51 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
local molokai = require "lualine.themes.molokai"
molokai.normal.c.bg = "#0A0A0A"
molokai.normal.c.fg = "#FD971F"
require("lualine").setup({
options = {
icons_enabled = true,
theme = molokai,
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = { 'filename', },
lualine_x = { 'searchcount', 'selectioncount', 'filetype', },
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
})
end,
}

53
nvim/lua/plugins/main.lua Normal file
View file

@ -0,0 +1,53 @@
return {
-- themes
{ "ntk148v/habamax.nvim", dependencies={ "rktjmp/lush.nvim" } },
{ "catppuccin/nvim", name = "catppuccin", },
-- { "tamelion/neovim-molokai" },
-- end themes
"folke/which-key.nvim",
"Pocco81/auto-save.nvim",
"neovim/nvim-lspconfig",
{
"L3MON4D3/LuaSnip",
version = "v2.*",
},
{
"mason-org/mason.nvim",
opts={
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
}
},
"RRethy/vim-illuminate",
"stevearc/conform.nvim",
"norcalli/nvim-colorizer.lua",
{
"gelguy/wilder.nvim",
opts = function()
local wilder = require("wilder")
wilder.set_option("renderer", wilder.popupmenu_renderer({
pumblend = 20,
}))
return {
modes = { ':', '/', '?' }
}
end
},
{
"zaldih/themery.nvim",
lazy = false,
config = function()
require("themery").setup({
themes = vim.fn.getcompletion("", "color"),
livePreview = true,
})
end
},
{ "junegunn/vim-easy-align" },
}

View file

@ -0,0 +1,61 @@
return {
"jake-stewart/multicursor.nvim",
branch = "1.0",
config = function()
local mc = require("multicursor-nvim")
mc.setup()
local set = vim.keymap.set
-- Add or skip cursor above/below the main cursor.
set({"n", "x"}, "<c-k>", function() mc.lineAddCursor(-1) end)
set({"n", "x"}, "<c-j>", function() mc.lineAddCursor(1) end)
set({"n", "x"}, "<leader>k", function() mc.lineSkipCursor(-1) end)
set({"n", "x"}, "<leader>j", function() mc.lineSkipCursor(1) end)
-- Add or skip adding a new cursor by matching word/selection
set({"n", "x"}, "<leader>n", function() mc.matchAddCursor(1) end)
set({"n", "x"}, "<leader>s", function() mc.matchSkipCursor(1) end)
set({"n", "x"}, "<leader>N", function() mc.matchAddCursor(-1) end)
set({"n", "x"}, "<leader>S", function() mc.matchSkipCursor(-1) end)
-- Add and remove cursors with control + left click.
set("n", "<c-leftmouse>", mc.handleMouse)
set("n", "<c-leftdrag>", mc.handleMouseDrag)
set("n", "<c-leftrelease>", mc.handleMouseRelease)
-- Disable and enable cursors.
set({"n", "x"}, "<c-q>", mc.toggleCursor)
-- Mappings defined in a keymap layer only apply when there are
-- multiple cursors. This lets you have overlapping mappings.
mc.addKeymapLayer(function(layerSet)
-- Select a different cursor as the main one.
layerSet({"n", "x"}, "<left>", mc.prevCursor)
layerSet({"n", "x"}, "<right>", mc.nextCursor)
-- Delete the main cursor.
layerSet({"n", "x"}, "<leader>x", mc.deleteCursor)
-- Enable and clear cursors using escape.
layerSet("n", "<esc>", function()
if not mc.cursorsEnabled() then
mc.enableCursors()
else
mc.clearCursors()
end
end)
end)
-- Customize how cursors look.
local hl = vim.api.nvim_set_hl
hl(0, "MultiCursorCursor", { reverse = true })
hl(0, "MultiCursorVisual", { link = "Visual" })
hl(0, "MultiCursorSign", { link = "SignColumn"})
hl(0, "MultiCursorMatchPreview", { link = "Search" })
hl(0, "MultiCursorDisabledCursor", { reverse = true })
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
hl(0, "MultiCursorDisabledSign", { link = "SignColumn"})
end
}

View file

@ -0,0 +1,146 @@
return {
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"onsails/lspkind.nvim",
},
opts = function()
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
local auto_select = true
return {
auto_brackets = {},
completion = {
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
},
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.none,
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({ select = auto_select }),
["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<S-CR>"] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
["<tab>"] = function(fallback)
local luasnip = require("luasnip")
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end,
}),
sources = cmp.config.sources(
{
{ name = "lazydev" },
{ name = "nvim_lsp" },
{ name = "path" },
},
{
{ name = "buffer" },
{ name = "cmdline" },
}
),
sorting = defaults.sorting,
}
end
-- opts = {
-- completion = {
-- winhighlight = "Normal:Pmenu,FloatBordeer:Pmenu,Search:None",
-- col_offset = -3,
-- side_padding = 0,
-- completeopt = "menu,menuone,noinsert,noselect",
-- },
-- formatting = {
-- fields = { "kind", "abbr", "menu" },
-- format = function(entry, vim_item)
-- local lspkind = require("lspkind")
-- local kind = lspkind.cmp_format({
-- mode = "symbol_text",
-- max_width = 50,
-- })(entry, vim_item)
-- local strings = vim.split(kind.kind, "%s", { trimempty = true })
-- kind.kind = " " .. (strings[1] or "") .. " "
-- kind.menu = " (" .. (strings[2] or "") .. ")"
--
-- return vim_item
-- -- return kind
-- end
-- },
-- },
}
-- opts = function()
-- vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
-- local cmp = require("cmp")
-- local defaults = require("cmp.config.default")()
-- local auto_select = true
-- return {
-- auto_brackets = {}, -- configure any filetype to auto add brackets
-- completion = {
-- completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
-- max_height = 10,
-- max_width = 80,
-- },
-- preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
-- mapping = cmp.mapping.preset.insert({
-- ["<C-b>"] = cmp.mapping.scroll_docs(-4),
-- ["<C-f>"] = cmp.mapping.scroll_docs(4),
-- ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
-- ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
-- ["<C-Space>"] = cmp.mapping.complete(),
-- ["<CR>"] = cmp.mapping.confirm({ select = auto_select }),
-- ["<C-y>"] = cmp.mapping.confirm({ select = true }),
-- ["<S-CR>"] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
-- ["<C-CR>"] = function(fallback)
-- cmp.abort()
-- fallback()
-- end,
-- ["<tab>"] = function(fallback)
-- local luasnip = require("luasnip")
-- if cmp.visible() then
-- cmp.select_next_item()
-- elseif luasnip.expand_or_jumpable() then
-- luasnip.expand_or_jump()
-- else
-- fallback()
-- end
-- end,
-- }),
-- sources = cmp.config.sources({
-- { name = "lazydev" },
-- { name = "nvim_lsp", },
-- { name = "path" },
-- }, {
-- { name = "buffer" },
-- }),
-- sorting = defaults.sorting,
-- formatting = {
-- format = function(entry, vim_item)
-- local label = vim_item.abbr
-- local truncated_label = vim.fn.strcharpart(label, 0, 20)
-- if truncated_label ~= label then
-- vim_item.abbr = truncated_label .. "..."
-- elseif string.len(label) < 20 then
-- local padding = string.rep(" ", 20 - string.len(label))
-- vim_item.abbr = label .. padding
-- end
-- return vim_item
-- end,
-- }
-- }
-- end,
-- main = "lazyvim.util.cmp",
-- }

22
nvim/lua/plugins/oil.lua Normal file
View file

@ -0,0 +1,22 @@
return {
'stevearc/oil.nvim',
opts = {
float = {
max_width = 80,
max_height = 20,
border = "rounded",
},
preview_win = {
update_on_cursor_moved = true,
preview_method = "fast_scratch",
},
delete_to_trash = true,
watch_for_changes = true,
},
dependencies = { { "echasnovski/mini.icons", opts = {} } },
lazy = false,
keys = {
{ "<leader>do", "<cmd>Oil --float<CR>", desc = "Open floating Oil" },
},
}

View file

@ -0,0 +1,26 @@
return {
'nvim-telescope/telescope.nvim',
version = false,
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {
defaults = {
path_display = { "smart" },
},
pickers = {
buffers = {
path_display = "short",
sort_mru = true,
ignore_current_buffer = true,
previewer = false,
layout_config = {
width = 80,
height = 10,
prompt_position = "top",
},
prompt_title = false,
results_title = false,
preview_title = false,
},
},
},
}

View file

@ -0,0 +1,15 @@
return {
"akinsho/toggleterm.nvim",
version = "*",
opts = {
direction = "float",
open_mapping = [[<c-\>]],
float_opts = {
border = "curved",
width = 80,
height = 20,
},
hide_numbers = true,
},
config = true,
}

View file

@ -0,0 +1,14 @@
return {
'nvim-treesitter/nvim-treesitter',
lazy = false,
branch = 'main',
build = ':TSUpdate',
opts = {
ensure_installed = { "lua", "vim", "json" },
highlight = { enable = true },
indent = { enable = true },
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
}