removed windows and linux split subdir

This commit is contained in:
Luka Jankovic 2026-02-03 23:43:22 +01:00
parent 83dda10fa8
commit 065b982734
280 changed files with 9053 additions and 426 deletions

1
.config/nvim/init.lua Normal file
View file

@ -0,0 +1 @@
require("config")

View file

@ -0,0 +1,28 @@
{
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
"deadcolumn.nvim": { "branch": "master", "commit": "92c86f10bfba2717ca2280e2e759b047135d5288" },
"dropbar.nvim": { "branch": "master", "commit": "d08bf6b5e2b3bf160050b0f991c1831bf05a7523" },
"git-messenger.vim": { "branch": "master", "commit": "fd124457378a295a5d1036af4954b35d6b807385" },
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lsp_signature.nvim": { "branch": "master", "commit": "0efb088dce050d38a3608ee69f80f2a62cf9849c" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "c953789db7fd28eafe5eb5659846d34b5024b3cc" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mini.icons": { "branch": "main", "commit": "efc85e42262cd0c9e1fdbf806c25cb0be6de115c" },
"nord.nvim": { "branch": "main", "commit": "07647ad23e5b7fc1599a841dcd8f173b9aeb0419" },
"nvim-lspconfig": { "branch": "master", "commit": "3f58aeca0c6ece8a9fb8782ea3fcb6024f285be3" },
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
"nvim-tree.lua": { "branch": "master", "commit": "037d89e60fb01a6c11a48a19540253b8c72a3c32" },
"nvim-treesitter": { "branch": "main", "commit": "4967fa48b0fe7a7f92cee546c76bb4bb61bb14d5" },
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"refactoring.nvim": { "branch": "master", "commit": "6784b54587e6d8a6b9ea199318512170ffb9e418" },
"stcursorword": { "branch": "main", "commit": "ab099f1682a0b251cda8f089d028a31426b83a06" },
"telescope-hierarchy.nvim": { "branch": "main", "commit": "85fb67112daf99f3918531558ee85a36c1891f91" },
"telescope-menufacture": { "branch": "main", "commit": "751aca3f022039874790024b3cf25d643e335612" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View file

@ -0,0 +1,3 @@
require('config.lazy')
require('config.rest')
require('config.lsp')

View file

@ -0,0 +1,8 @@
-- Remap Ctrl + h/j/k/l for pane movement
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', { noremap = true, silent = true })
-- Clear Highlights
vim.api.nvim_set_keymap('n', '<Esc>', ':noh<CR>', { noremap = true, silent = true })

View file

@ -0,0 +1,41 @@
-- 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 = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins_base" },
{ import = "plugins_lsp" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "nord" } },
-- automatically check for plugin updates
checker = { enabled = false },
change_detection = {
enabled = false,
notify = false,
},
})

View file

@ -0,0 +1,6 @@
vim.diagnostic.config({
virtual_lines = {
current_line = true,
}
})

View file

@ -0,0 +1,2 @@
require('config.settings')
require('config.keybinds')

View file

@ -0,0 +1,65 @@
-- Line numbers
vim.wo.number = true
-- Tabs
vim.o.expandtab = true
vim.o.smartindent = true
vim.o.tabstop = 4
vim.o.shiftwidth = 4
-- Clipboard
local function paste()
return {
vim.fn.split(vim.fn.getreg(""), "\n"),
vim.fn.getregtype(""),
}
end
vim.o.clipboard = "unnamedplus"
-- vim.g.clipboard = {
-- name = "OSC 52",
-- copy = {
-- ["+"] = require("vim.ui.clipboard.osc52").copy("+"),
-- ["*"] = require("vim.ui.clipboard.osc52").copy("*"),
-- },
-- paste = {
-- ["+"] = paste,
-- ["*"] = paste,
-- },
-- }
vim.api.nvim_exec(
[[
augroup YankHighlight
autocmd!
autocmd TextYankPost * silent! lua vim.highlight.on_yank()
augroup end
]],
false
)
-- Restore cursor
local restore_cursor_augroup = vim.api.nvim_create_augroup("restore_cursor_shape_on_exit", { clear = true })
vim.api.nvim_create_autocmd({ "VimLeave" }, {
group = restore_cursor_augroup,
desc = "restore the cursor shape on exit of neovim",
command = "set guicursor=a:ver20",
})
-- Horizontal Split Line
vim.opt.laststatus = 3
-- Padding around current line
vim.opt.scrolloff = 5
-- Highlight current line
vim.opt.cursorline = true
-- Column limit
vim.opt.colorcolumn = "80"
-- Set signcolumn to prevent lsp flickering
vim.opt.signcolumn = "yes"
-- Always show tabline
vim.opt.laststatus = 2

View file

@ -0,0 +1 @@
return { 'Bekaboo/deadcolumn.nvim' }

View file

@ -0,0 +1,6 @@
return {
{
"Bekaboo/dropbar.nvim",
version = "12.0.2"
}
}

View file

@ -0,0 +1,7 @@
return {
'rhysd/git-messenger.vim',
cmd = { 'GitMessenger' },
keys = {
{ "<leader>gm", "<cmd>GitMessenger<cr>", desc = "[G]it [M]essenger" },
},
}

View file

@ -0,0 +1,8 @@
return {
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup({
current_line_blame = true,
})
end,
}

View file

@ -0,0 +1,7 @@
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
---@module "ibl"
---@type ibl.config
opts = {},
}

View file

@ -0,0 +1,3 @@
return {
"echasnovski/mini.icons"
}

View file

@ -0,0 +1,9 @@
return {
"gbprod/nord.nvim",
lazy = false,
priority = 1000,
config = function()
require("nord").setup({})
vim.cmd.colorscheme("nord")
end,
}

View file

@ -0,0 +1,9 @@
return {
"kylechui/nvim-surround",
version = "*",
event = "VeryLazy",
config = function()
require("nvim-surround").setup({
})
end
}

View file

@ -0,0 +1,10 @@
return {
'nvim-tree/nvim-tree.lua',
config = function()
require("nvim-tree").setup()
end,
keys = {
{ "<M-n>", "<cmd>NvimTreeFindFileToggle<cr>", desc = "Toggle [N]vimTree" },
{ "<leader>nr", "<cmd>NvimTreeRefresh<cr>", desc = "[N]vimTree [R]efresh" },
}
}

View file

@ -0,0 +1,5 @@
return {
"nvim-treesitter/nvim-treesitter",
lazy = false,
build = ':TSUpdate'
}

View file

@ -0,0 +1,23 @@
return {
"ThePrimeagen/refactoring.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
lazy = false,
config = function()
require("refactoring").setup()
end,
keys = {
{
"<leader>xe",
"<cmd>Refactor extract <cr>",
desc = "Refactor Extract"
},
{
"<leader>xv",
"<cmd>Refactor extract_var <cr>",
desc = "Refactor Extract Variable"
},
}
}

View file

@ -0,0 +1,11 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup({
options = {
disabled_filetypes = { "NvimTree" },
},
})
end,
}

View file

@ -0,0 +1,5 @@
return {
"sontungexpt/stcursorword",
event = "VeryLazy",
config = true,
}

View file

@ -0,0 +1,70 @@
return {
"molecule-man/telescope-menufacture",
{
"nvim-telescope/telescope.nvim",
tag = "0.1.8",
dependencies = { "nvim-lua/plenary.nvim" },
event = "VimEnter",
config = function()
require("telescope").load_extension("menufacture")
local builtin = require("telescope.builtin")
vim.keymap.set(
"n",
"<leader>sf",
require("telescope").extensions.menufacture.find_files,
{ desc = "[S]earch [F]iles" }
)
vim.keymap.set(
"n",
"<leader>sg",
require("telescope").extensions.menufacture.live_grep,
{ desc = "[S]earch [G]rep" }
)
vim.keymap.set(
"n",
"<leader>sw",
require("telescope").extensions.menufacture.grep_string,
{ desc = "[S]earch [W]ord under cursor" }
)
vim.keymap.set("n", "<leader>/", function()
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
winblend = 20,
previewer = false,
}))
end, { desc = "[/] Fuzzily search in current buffer" })
vim.keymap.set("n", "<leader>ff", function()
require("telescope.builtin").lsp_document_symbols({ symbols = "function" })
end, { desc = "[F]ind [F]unction" })
end,
},
{
"jmacadie/telescope-hierarchy.nvim",
dependencies = {
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
},
keys = {
{ -- lazy style key map
-- Choose your own keys, this works for me
"<leader>si",
"<cmd>Telescope hierarchy incoming_calls<cr>",
desc = "LSP: [S]earch [I]ncoming Calls",
},
{
"<leader>so",
"<cmd>Telescope hierarchy outgoing_calls<cr>",
desc = "LSP: [S]earch [O]utgoing Calls",
},
},
opts = {},
config = function(_, opts)
require("telescope").setup(opts)
require("telescope").load_extension("hierarchy")
end,
},
}

View file

@ -0,0 +1,11 @@
return {
"akinsho/toggleterm.nvim",
cmd = "ToggleTerm",
keys = {
{ "<M-\\>", "<cmd>ToggleTerm</cr>", desc = "Toggle Terminal" },
},
version = "*",
opts = {
open_mapping = [[<M-\>]],
},
}

View file

@ -0,0 +1,14 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
}

View file

@ -0,0 +1,159 @@
return {
{
"mason-org/mason-lspconfig.nvim",
opts = {},
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
},
{
"ray-x/lsp_signature.nvim",
event = "VeryLazy",
opts = {},
config = function(_, opts)
require("lsp_signature").setup(opts)
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local bufnr = args.buf
local client = vim.lsp.get_client_by_id(args.data.client_id)
if vim.tbl_contains({ "null-ls" }, client.name) then -- blacklist lsp
return
end
require("lsp_signature").on_attach({
-- ... setup options here ...
}, bufnr)
end,
})
end,
},
{
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
opts = function()
local mason_reg = require("mason-registry")
local formatters = {}
local formatters_by_ft = {}
-- add diff langue vs filetype
local keymap = {
["c++"] = "cpp",
["c#"] = "cs",
}
-- add dif conform vs mason
local name_map = {
["cmakelang"] = "cmake_format",
["deno"] = "deno_fmt",
["elm-format"] = "elm_format",
["gdtoolkit"] = "gdformat",
["nixpkgs-fmt"] = "nixpkgs_fmt",
["opa"] = "opa_fmt",
["php-cs-fixer"] = "php_cs_fixer",
["ruff"] = "ruff_format",
["sql-formatter"] = "sql_formatter",
["xmlformatter"] = "xmlformat",
}
for _, pkg in pairs(mason_reg.get_installed_packages()) do
for _, type in pairs(pkg.spec.categories) do
-- only act upon a formatter
if type == "Formatter" then
-- if formatter doesn't have a builtin config, create our own from a generic template
if not require("conform").get_formatter_config(pkg.spec.name) then
-- the key of the entry to this table
-- is the name of the bare executable
-- the actual value may not be the absolute path
-- in some cases
local bin = next(pkg.spec.bin)
-- this should be replaced by a function
-- that quieries the configured mason install path
local prefix = vim.fn.stdpath("data") .. "/mason/bin/"
formatters[pkg.spec.name] = {
command = prefix .. bin,
args = { "$FILENAME" },
stdin = true,
require_cwd = false,
}
end
-- finally add the formatter to it's compatible filetype(s)
for _, ft in pairs(pkg.spec.languages) do
local ftl = string.lower(ft)
local ready = mason_reg.get_package(pkg.spec.name):is_installed()
if ready then
if keymap[ftl] ~= nil then
ftl = keymap[ftl]
end
if name_map[pkg.spec.name] ~= nil then
pkg.spec.name = name_map[pkg.spec.name]
end
formatters_by_ft[ftl] = formatters_by_ft[ftl] or {}
table.insert(formatters_by_ft[ftl], pkg.spec.name)
end
end
end
end
end
return {
formatters = formatters,
formatters_by_ft = formatters_by_ft,
}
end,
keys = {
{
"<leader>fm",
function()
require("conform").format({ async = true })
end,
mode = "",
desc = "Format buffer",
},
-- {
-- "<leader>ca",
-- function()
-- vim.lsp.buf.code_action()
-- end,
-- mode = "",
-- desc = "Code Action",
-- },
{
"<leader>rn",
function()
vim.lsp.buf.rename()
end,
mode = "",
desc = "[R]e[N]ame",
},
{
"gd",
function()
vim.lsp.buf.definition()
end,
mode = "",
desc = "[G]oto [D]efinition",
},
{
"gD",
function()
vim.lsp.buf.declaration()
end,
mode = "",
desc = "[G]oto [D]eclaration",
},
{
"<leader>ih",
function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({0}),{0})
end,
mode = "",
desc = "Toggle [I]nlay [H]ints"
}
},
},
}