initial commit

This commit is contained in:
2025-10-14 12:29:46 +02:00
parent 0439bb0ff7
commit 903704e4d7
99 changed files with 8495 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
vim.api.nvim_create_autocmd({ 'TextYankPost' }, {
desc = "Highlight when yanking",
group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})

View File

@@ -0,0 +1,44 @@
local lib = require('lib.window')
local command = function(name, callback)
vim.api.nvim_create_user_command(name, callback, {})
end
command('Settings', function()
local path = vim.fn.expand('~/.config/dotfiles/homes/quirinecker/.config/nvim')
lib.new_window(path, 'Settings')
end)
command('TransparencyFix', function()
require('lualine').setup(require('plugins.lualine').opts)
end)
command('MavenStartCommand', function()
local Path = require("plenary.path")
local cwd = Path:new(vim.fn.getcwd()):absolute()
local baseName = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":t")
if vim.fn.filereadable(cwd .. "/pom.xml") ~= 1 then
vim.notify("No pom.xml found in current directory", vim.log.levels.ERROR)
return
end
if not baseName:match(".java$") then
vim.notify("Current buffer is not a java file", vim.log.levels.ERROR)
return
end
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
local className = baseName:gsub(".java", "")
local packageName = ""
for _, line in ipairs(lines) do
if line:match("^package ") then
local value = vim.split(line, " ")[2]
packageName = value:gsub(";", "")
end
end
vim.fn.setreg("+", "mvn exec:java -Dexec.mainClass=" .. packageName .. "." .. className)
vim.notify("Copied Start Command to Clipboard", vim.log.levels.INFO)
end)

View File

@@ -0,0 +1,6 @@
require('config.settings')
require('config.keymap')
require('config.commands')
require('config.setup')
require('config.lazy')
require('config.autocommands')

View File

@@ -0,0 +1,44 @@
local keymap = vim.keymap.set
keymap({ 'v', 'n' }, ' ', '', {})
local function vn_map(map, action)
keymap({ 'v', 'n' }, map, action)
end
-- splitting
-- Clipboard
vn_map('<leader>y', [["+y]])
keymap('n', '<leader>yy', [["+yy]])
vn_map('<leader>op', [[o<Esc>"+p]])
vn_map('<leader>p', [["+p]])
vn_map('<leader>cl', ':bd <cr>')
vn_map('<leader>ss', ':w <cr>')
vn_map('<leader>sq', ':wq <cr>')
vn_map('<leader>sc', ':w <cr> :bd <cr>')
-- Quickfix List
vim.keymap.set('n', '<alt>n', ':cnext<cr>')
vim.keymap.set('n', '<alt>p', ':cprevious<cr>')
-- Terminal
vim.keymap.set('n', '<leader>tt', function()
os.execute("kitty")
end)
-- Copy Path to clipboard
vim.keymap.set('n', '<leader>yrp', function()
local path = vim.fn.expand("%:p")
local relative_path = vim.fn.fnamemodify(path, ":~:.")
vim.fn.setreg("+", relative_path)
vim.notify('Copied "' .. relative_path .. '" to the clipboard!')
end)
vim.keymap.set('n', '<leader>yap', function()
local path = vim.fn.expand("%:p")
vim.fn.setreg("+", path)
vim.notify('Copied "' .. path .. '" to the clipboard!')
end)

View File

@@ -0,0 +1,6 @@
-- require('lazy').setup("plugins")
require('lazy').setup({
spec = {
{import = "plugins.spec"},
}
})

View File

@@ -0,0 +1,35 @@
-- Mapleader
vim.g.mapleader = ' '
-- Colors
vim.opt.termguicolors = true
-- tabsize
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4
vim.opt.expandtab = true
-- Line Wrap
vim.opt.wrap = false
-- Searching
vim.opt.hlsearch = false
vim.opt.incsearch = true
-- Line Numbering
vim.opt.number = true
vim.opt.relativenumber = true
-- Other
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.colorcolumn = "120"
vim.opt.smartindent = true
-- Disabling Netrw
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Tabline
vim.opt.showtabline = 1

View File

@@ -0,0 +1,12 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)

View File

@@ -0,0 +1 @@
package com.example.demo;